[TIMOB-14393] Android: JS proxies are prematurely cleaned up when dalvik gc is triggered
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-06-01T22:58:56.000+0000 |
Affected Version/s | Release 3.1.1 |
Fix Version/s | Release 4.1.0 |
Components | Android |
Labels | supportTeam |
Reporter | Allen Yeung |
Assignee | Pedro Enrique |
Created | 2013-06-26T18:46:16.000+0000 |
Updated | 2017-03-31T22:22:36.000+0000 |
Description
Attachments
File | Date | Size |
---|---|---|
S4_logs.txt | 2014-03-22T00:16:21.000+0000 | 49042 |
This just hit us (SDK 3.2.0) and is rather horrendous and insidious, because it is not consistently reproducible and is difficult to diagnose (for us it manifests itself as a crash, but it's a native crash and thus is not caught by ACRA for example). It also makes one extremely paranoid, because if one cannot count on the JavaScript scope pattern, then basically the app is a ticking time bomb. In our case the problem happened to be a View created in a closure in a CommonJS module, with the View (being a simple red border used for error display) added or removed to/from another view when an error is detected or not. (Yes, now that we know the cause, we can work around it by using another technique, but like I said, what other semi-reproducible similar problems lurk?) We only caught this after upgrading to SDK 3.2.0; not reported when we used 3.1.1; it might be due to something changing about GC itself (speculation).
This causes major headaches for my app, lots of crash reports and no easy fix without a major refactoring.
PR: https://github.com/appcelerator/titanium_mobile/pull/6887
To test, use this code, run on emulator for consistent results
Closing ticket as fixed, if there are any problems, please file a new ticket.