GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-08-23T20:09:30.000+0000 |
Affected Version/s | Release 2.1.1, Release 3.0.0 |
Fix Version/s | Sprint 2012-16 API, Release 3.0.0 |
Components | Android |
Labels | core, qe-testadded |
Reporter | Evgenii Tcarev |
Assignee | Josh Roesslein |
Created | 2012-07-19T12:17:55.000+0000 |
Updated | 2012-09-05T13:22:47.000+0000 |
Application crashes with out of memory error. On some occasions the ed "runtime error" is displayed, other times, the "application has stopped unexpectedly" dialog is shown.
The screenshots of each are attached. Logcat output is also attached.
This is a regression it doesn't occur on SDK 2.1.0
Steps to reproduce:
1) Launch Kitchen Sink > Platform > XHR > XML Properties.
2)
Tap back button on the phone.
3) Repeat 1 and 2 steps 10 times.
Result:
1) The application crashes.
Expected Result:
1) The application shouldn't crash.
This actually looks like a memory leak caused by us not releasing our persistent handles (aka references) to the V8 function callbacks (ex: onload, ondatastream). The bug probably has existed for some time now (possibly back to 1.8), but only came forth in this test case due to us fixing the decoding to always return something when you access "responseText". Since the label is referenced inside the callbacks, it would never get collected and neither would the response text/data it references.
Memory leaks have all been fixed in master. Test case no longer crashes due to out of memory.
Tested as fixed: SDK-version 2.2.0.v20120904103252 Titanium Studio, builds: 2.1.2.201208301612, 2.2.0.v20120904103252 Devices: iPone4 version 5.0.1 Nexus Android tablet version 4.1.1