[TIMOB-19884] iOS: Debug crash when setting breakpoint in alloy model response
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-12-14T03:23:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.2.0 |
Components | iOS |
Labels | TCSupportTriage, alloy, debugger-ios, user_experience, validate |
Reporter | Jason Kotchoff |
Assignee | Chee Kiat Ng |
Created | 2015-02-03T21:19:44.000+0000 |
Updated | 2016-02-16T23:22:22.000+0000 |
Description
When setting a titanium studio breakpoint in an alloy model response from a sync adapter that fetches remote content, titanium 3.5.0 crashes in iOS.
Here is an example alloy project that fetches remote content using a custom alloy model adapter:
https://github.com/jkotchoff/alloytest
When run in 'debug mode' in Titanium Studio, setting a breakpoint in the alloy model response will crash the app with SDK 3.5.0 and iOS
ie.
https://github.com/jkotchoff/alloytest/blob/master/app/controllers/index.js#L7
A debug point here works fine in SDK 3.4.1 on iOS and it works fine in Android (SDK 3.4.1 or 3.5.0).
This makes debugging titanium apps that render content from a remote server impossible in 3.5.0 on iOS.
Attachments
File | Date | Size |
---|---|---|
iosdebugger_notworking_4.0GA.log | 2015-07-27T14:15:53.000+0000 | 15476 |
iosdebugger_working_3.4.1GA.log | 2015-07-27T14:15:53.000+0000 | 15853 |
wluu_chuck_norris.crash | 2015-11-30T23:00:31.000+0000 | 329454 |
wluu_circular.crash | 2015-11-30T23:00:31.000+0000 | 328931 |
Note, just before running this test project, you may want to make a single web browser request to: http://sinatra-api-demo.herokuapp.com/endpoint.json in order to spin up the server because heroku will spin it down if it hasn't been hit in awhile and then the http request from titanium may time out.
[~kkolipaka] Can you take a look into this ?
Please find the attached logs.
Any news on this?
This looks like the same thing reported in AC-297. That bug has info as to how to reproduce this issue in 2 lines of code.
The titanium debugger crashes whenever it tries to send message through debugger connection:
[~sdavenport] This ticket doesn't duplicates any other ticket. We still need to investigate the root cause causing the crash of debugging.
The core of the issue as we discovered is that the debugger cannot seem to handle circular references in object graphs. If you create a new Appcelerator mobile project and inside the index.js add these two lines of code before $.index.open() you can reproduce the issue easily: var a = {b:{c:1}}; a.b.d=a; Set a breakpoint on the second line above and then when you hit it, step over and the app being debugged will crash.
I have a contractor working on a time sensitive application and he is completely stopped by this issue. I'm not getting very good information from Appcelerator on this issue. We have 10 minutes of work to do but are unable to use Appcelerator studio to do this work. Hours and hours of time have been lost already. We chose this platform for its flexibility of deployment. We are not seeing that advantage anymore. Can we please get some traction on this issue? We are about 1 week from being forced to move to another platform. If we leave, we won't ever be back. Please be sure to reference back to the AC-297 which is the ticket that we had been watching.
I am still able to reproduce this issue with the current GA stack. I was able to reproduce with [~mannyp] test case and the original reported bug, which both generated similar crash reports seen by [~pinnamuri]; see [^wluu_circular.crash] for [~mannyp] test case and see [^wluu_chuck_norris.crash] for the original reported bug. Tested on: Appcelerator Studio, build: 4.4.0.201511241829 Appc CLI NPM: 4.2.2 Appc CLI Core: 5.1.0 Arrow: 1.3.22 SDK: 5.1.1.GA Node: v4.2.2 OS: El Capitan (10.11.1) Xcode: 7.1.1 Devices: iphone simulator (9.1)
Possible valid data point: from what I'm gathering so far, it looks like the debugger cannot handle relatively large JSON objects. In TIMOB-20017 and this original reported bug, the requested JSON do not have any circular reference, but are relatively large if you were to print them out. And in [~mannyp]'s test case, I think that a circular reference JSON is inherently large.
Closing ticket as fixed. Verified that [~mannyp]'s test case and the original reported test case does not crash if you set a breakpoint on the specified lines. Tested on: Appcelerator Studio, build: 4.5.0.201602132419 Appc CLI NPM: 4.2.3-2 Appc CLI Core: 5.2.0-265 Arrow: 1.7.27 SDK: 5.2.0.v20160216091337 Node: v4.2.4 OS: El Capitan (10.11.3)