openGeeksLab / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

iOS new vm builds crash with EXC_BAD_ACCESS ( possible POJO Array memory issue? ) #1397

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Only applies to new iOS vm.
Does not crash on Android, simulator, or old iOS vm.

Crash is intermittent, and reproducibility is variable - some devices crash 
with regular frequency, some do not.  Cannot seem to reproduce the crash on 
XCode simulators at all, only on physical devices.

Crash occurs in several different lines/places, but the common element appears 
to be operations on Java Object arrays (gcMarkObject/gcMarkArrayObject, 
function calls which return the array, object_wait, etc.).

In every case, the iOS implementation's of the array or the array's parent 
appears to be wrong in one or more ways...

For instance,

In one crash,
the the array member's _codenameOneParentClsReference.markFunction is pointing 
at a class__java_lang_String object in one crash, not a function.

In another crash, _codenameOneParentClsReference.clsName = "char[]" and the 
_codenameOneParentClsReference.primitiveType = 1 (true), when the actual class 
of the parent object is one of the app's POJO classes (which contains the 
returned array), not a char[].

See attached for XCode screenshots of 2 different crashes.

Original issue reported on code.google.com by mallo...@gmail.com on 15 Mar 2015 at 11:54

Attachments:

GoogleCodeExporter commented 8 years ago
These crashes happen after the memory was released. We just fixed an issue of 
this type with threads and its rather impossible to know what caused it without 
a test case.
We need to "trace" all mark operations to see why something wasn't marked. As 
you can guess this creates a lot of overhead that sometimes results in a crash 
not being reproducible while observed... That's why the test case must be as 
simple as possible.

Original comment by shai.almog on 16 Mar 2015 at 4:38

GoogleCodeExporter commented 8 years ago
It appears this bug has been fixed by this check-in:  
https://code.google.com/p/codenameone/source/detail?r=2222

Feel free to close.

Original comment by mallo...@gmail.com on 26 Mar 2015 at 4:58

GoogleCodeExporter commented 8 years ago

Original comment by shai.almog on 27 Mar 2015 at 5:41