Random string or crash on iOS

68 views
Skip to first unread message

Piotr

unread,
May 18, 2015, 3:30:56 PM5/18/15
to codenameone...@googlegroups.com

I try to find out problem with crashed or random problem on iOS program.
The program is working perfectly on simulator.
I manage to prepare test case witch show the problem but only in case of compile source code locally (on simulator or really phone).
Code compiled on CN1 server is working, but in whole program crashes in similar way.

I try to simplify test case but anything I try to change problem disappear.

Program should print out ten time the same root path for example:
6 root:file://Users/ftest/Library/Developer/CoreSimulator/Devices/4AA0C5AA-88D5-4F13-B63D-6273A99E8264/data/Containers/Bundle/Application/9803879D-17B6-46BA-9B0B-6B7362CB3D85/TestAppLogger.app/FMap/

but sometimes it print out path with ramdom text on the end:
9 root:file://Users/ftest/Library/Developer/CoreSimulator/Devices/4AA0C5AA-88D5-4F13-B63D-6273A99E8264/data/Containers/Bundle/Application/9803879D-17B6-46BA-9B0B-6B7362CB3D85/TestAppLogger.app/崔Ā䈿 텐

or just crashes with EXC_BAD_ACCESS in java_lang_String_getChars___int_int_char_1ARRAY_int

https://drive.google.com/open?id=0B_J2xdfDrOC8YmRMZzBEa1FFdzg&authuser=0

Shai Almog

unread,
May 18, 2015, 11:57:16 PM5/18/15
to codenameone...@googlegroups.com, sym...@zubek.com.pl
Compilation is a difficult process which is why we only support the build servers.

Piotr

unread,
May 19, 2015, 3:19:46 AM5/19/15
to codenameone...@googlegroups.com, sym...@zubek.com.pl
But it is not problem of compilation it is problem of your implementation. Maybe it is not allowed to use static variable for more than one class?
The main problem is that something happen that memory from static variable is overwritten by other data, and for sure it is not problem of compilation.

How I write in first post I manage to create test project where problem can be seen on local build but for whole application the same problem is on code build on your server.
I thing the problem is not appeared on server build because it is work faster and it is happen less often. In whole program there is more threads more log message and the situation happen more often. Maybe your gc is not mutlithread safe? But why use gc for static variable?

How can I find problem if problem is inside your code?
I can see only that the same code sometimes is working sometime is not working and of course on java emulator everything is working perfectly.

Shai Almog

unread,
May 19, 2015, 10:16:35 AM5/19/15
to codenameone...@googlegroups.com, sym...@zubek.com.pl
Since our code is open source and you are so sure its a problem on our side feel free to find the issue. The entire code of the GC, the VM etc. is all 100% open source and you can also see the entire commit history in the github project.
If you can narrow this down to a test case that reproduces in server builds we can track it down (with an issue in the issue tracker).

Steve Hannah

unread,
May 19, 2015, 11:50:15 AM5/19/15
to codenameone...@googlegroups.com, sym...@zubek.com.pl
If you can debug and provide the inputs to  java_lang_String_getChars___int_int_char_1ARRAY_int that result in the crash, that could be helpful.

On Tue, May 19, 2015 at 7:16 AM, Shai Almog <shai....@gmail.com> wrote:
Since our code is open source and you are so sure its a problem on our side feel free to find the issue. The entire code of the GC, the VM etc. is all 100% open source and you can also see the entire commit history in the github project.
If you can narrow this down to a test case that reproduces in server builds we can track it down (with an issue in the issue tracker).

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/10915123-160b-4483-9011-7f99dcf96c0a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Web Lite Solutions Corp.

Piotr

unread,
May 20, 2015, 12:24:48 PM5/20/15
to codenameone...@googlegroups.com, sym...@zubek.com.pl
Here is project that crash even it compiled on server:
TestProject

and CN1_Log from iPhone. After 10 loop the static string FMap/ change to WWWW and after 22 loop app was crashed.
----------
Inputs to java_lang_String_getChars___int_int_char_1ARRAY_int in case of crash:
JAVA_OBJECT  __cn1ThisObject length 395051840 data * 0x22 - of course it it wrong adress htat is why app crash with EXC_BAD_ACCESS (code=1,address=0x22); this input come from get_static_eu_forann_fmapapp_TestClass_EDirFMapDef(threadStateData) java line 22 TestClass.start
JAVA_INT __cn1Arg1 - 0
JAVA_INT __cn1Arg2 - 5
JAVA_OBJECT __cn1Arg3 - length 141 data:file://var/mobile/Containers/Data/Application/2ADF665F-07ED-4B63-84A3-B0E03BC600B6/Documents/
JAVA_INT __cn1Arg4 - 93

---------
I hope it helps and You can find an correct the bug. It is very serious because it can happen anywhere and anytime so apps couldn't be stable.

Steve Hannah

unread,
May 20, 2015, 7:57:58 PM5/20/15
to codenameone...@googlegroups.com, sym...@zubek.com.pl
This is an issue with the GC.  I have filed it in the issue tracker

Should be fixed soon.

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages