Titanium JIRA Archive
Appcelerator Community (AC)

[AC-797] iOS crashes by "NSRangeException" error on controller's argument

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2016-02-14T04:38:24.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsEXC_BAD_ACCESS, crash, ios
Reporteremanuele de cupis
AssigneeSharif AbuDarda
Created2016-02-05T16:51:47.000+0000
Updated2016-03-08T07:37:04.000+0000

Description

I face reproducible crashes on iOS device (iPhone 6). I achieved to isolate the javascript piece of code that causes crashes, however I think it could be a framework's bug as it raises error at memory access level. Here is the code: I have a widget with multiple controllers - it's a typical list/item structure, let's call the files as myWidget/controllers/widget.js and myWidget/controllers/item.js. In widget.js file I run Widget.createController('item', {foo: 'bar'}); thus the code from the item.js file is required and executed. *_Sometimes_* during the execution of my app, in which my widget is required in several different places, the arguments variable inside the item.js controller happen to be erroneously instantiated, causing the app to crash at the first reference to such variable. By investigating in logs, the crash is related to a bad access to memory: a NSRangeException error is raised, resulting in a EXC_BAD_ACCESS memory fault and consequently an app crash. I attach both the error log in console and the crash report in xcode. I hope this story results clear and helpful, please let me know if I can do anything to help. Thanks

Attachments

FileDateSize
console.txt2016-02-05T16:35:01.000+00002535
crash.txt2016-02-05T16:35:02.000+000090308

Comments

  1. Sharif AbuDarda 2016-02-08

    Hello, Can you provide a full test code and steps to reproduce the issue that you are having? We will try to regenerate the issue in out environment. Please be more descriptive as possible Also please provide the full environment info in where you are generating the issue. Thanks.

JSON Source