openGeeksLab / codenameone

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

iOS app crash in newVM=true #1279

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please clearly state whether the issue relates to a device/the simulator or
the tools.

Real device iPhone 4
If related to a device be sure to specify exactly which device with as much
details as possible.

iPhone 4, ios ver 7.1.2

What steps will reproduce the problem?
1. Have an app with two textFields in a Form
2. First time show of the form, invoke Display.editString to bring the keyboard 
on display in a callSerially call.
3. Now touch both the textFields alternatively in fast successions.
4. After few touchs, the in between the screen will show some black screens and 
after few more attempts the app will hang.
5. After that nothing will happen to the app and the screen will freeze. Later 
after sometime the app will crash.

What is the expected output? What do you see instead?

the app should work without an issue and should not crash.

What version of the product are you using? On what operating system?

Latest cn1 code with newVM=true, iOS build

Please provide any additional information below.

Crash log from xcode is attached.

Original issue reported on code.google.com by nir...@nvsoft.com on 13 Jan 2015 at 7:53

Attachments:

GoogleCodeExporter commented 8 years ago
The following exception stack trace is found in device console log:

Jan 13 11:46:34  S2PayApp[8721] <Warning>: java.lang.NullPointerException
        at com_codename1_impl_ios_IOSImplementation_4.run:448
        at com_codename1_ui_Display.processSerialCalls:1110
        at com_codename1_ui_Display.edtLoopImpl:1054
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:475
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_codename1_ui_TextArea.editString:561
        at com_codename1_ui_TextArea.pointerReleased:594
        at com_codename1_ui_TextField.pointerReleased:1579
        at com_codename1_ui_Form.pointerReleased:2332
        at com_codename1_ui_Component.pointerReleased:2667
        at com_codename1_ui_Display.handleEvent:1937
        at com_codename1_ui_Display.edtLoopImpl:1029
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:475
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_codename1_ui_TextArea.editString:561
        at com_codename1_ui_TextArea.pointerReleased:594
        at com_codename1_ui_TextField.pointerReleased:1579
        at com_codename1_ui_Form.pointerReleased:2332
        at com_codename1_ui_Component.pointerReleased:2667
        at com_codename1_ui_Display.handleEvent:1937
        at com_codename1_ui_Display.edtLoopImpl:1029
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:475
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_codename1_ui_TextArea.editString:561
        at com_codename1_ui_TextArea.pointerReleased:594
        at com_codename1_ui_TextField.pointerReleased:1579
        at com_codename1_ui_Form.pointerReleased:2332
        at com_codename1_ui_Component.pointerReleased:2667
        at com_codename1_ui_Display.handleEvent:1937
        at com_codename1_ui_Display.edtLoopImpl:1029
        at com_codename1_ui_Display.flushEdt:847
        at com_codename1_ui_Form.showModal:1528
        at com_codename1_ui_Dialog.showModal:1089
        at com_codename1_ui_Dialog.show:470
        at com_codename1_ui_Dialog.showPackedImpl:1386
        at com_codename1_ui_Dialog.showPacked:1294
        at com_codename1_ui_Dialog.showImpl:1049
        at com_codename1_ui_Dialog.show:1031
        at com_codename1_ui_Dialog.show:989
        at com_codename1_ui_Dialog.show:778
        at com_codename1_ui_Dialog.show:731
        at com_codename1_ui_Dialog.show:696
        at com_codename1_ui_Dialog.show:540
        at com_codename1_ui_Dialog.show:792
        at com_codename1_ui_Display.mainEDTLoop:973
        at com_codename1_ui_RunnableWrapper.run:120
        at com_codename1_impl_CodenameOneThread.run:176
        at java_lang_Thread.runImpl:153
Jan 13 11:46:34  S2PayApp[8721] <Warning>: 
Jan 13 11:46:34  S2PayApp[8721] <Warning>: [EDT] 0:0:0,0 - 
java.lang.NullPointerException: null
Jan 13 11:46:34  S2PayApp[8721] <Warning>: [EDT] 0:0:0,149 - 
java.lang.NullPointerException: null
Jan 13 11:46:35  S2PayApp[8721] <Warning>: Deleting thread 2

Original comment by nirmalju...@gmail.com on 13 Jan 2015 at 7:54

GoogleCodeExporter commented 8 years ago
We just updated the build servers so the line numbers are no longer accurate. 
Can you update the stack trace with a current build?

Original comment by shai.almog on 13 Jan 2015 at 7:58

GoogleCodeExporter commented 8 years ago
Here's the stack traces from new build:

Jan 13 14:01:03 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: 
java.lang.NullPointerException
        at com_codename1_impl_ios_IOSImplementation_4.run:449
        at com_codename1_ui_Display.processSerialCalls:1110
        at com_codename1_ui_Display.edtLoopImpl:1054
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:476
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_nvsoft_s2pay_fsm_PayMoneyUI_4_1.run:293
        at com_codename1_ui_Display.processSerialCalls:1110
        at com_codename1_ui_Display.edtLoopImpl:1054
        at com_codename1_ui_Display.mainEDTLoop:960
        at com_codename1_ui_RunnableWrapper.run:120
        at com_codename1_impl_CodenameOneThread.run:176
        at java_lang_Thread.runImpl:153
Jan 13 14:01:03 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: 
Jan 13 14:01:04 Nirmal-Juthanis-iPhone mstreamd[9127] <Notice>: (Note ) 
mstreamd: Not monitoring for external power.
Jan 13 14:01:04 Nirmal-Juthanis-iPhone mstreamd[9127] <Notice>: (Note ) PS: 
Media stream daemon stopping.
Jan 13 14:01:04 Nirmal-Juthanis-iPhone mstreamd[9127] <Notice>: (Note ) AS: 
<MSIOSAlbumSharingDaemon: 0x14558270>: Shared Streams daemon has shut down.
Jan 13 14:01:04 Nirmal-Juthanis-iPhone mstreamd[9127] <Notice>: (Warn ) 
mstreamd: mstreamd shutting down.
Jan 13 14:01:05 Nirmal-Juthanis-iPhone mstreamd[9128] <Notice>: (Note ) 
mstreamd: mstreamd starting up.
Jan 13 14:01:05 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: Editing null 
component!!
Jan 13 14:01:05 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: 
Jan 13 14:01:06 Nirmal-Juthanis-iPhone mstreamd[9128] <Notice>: (Note ) PS: 
Media stream daemon starting...
Jan 13 14:01:36 Nirmal-Juthanis-iPhone wifid[15] <Notice>: 
WiFi:[442830696.898170]: 
Jan 13 14:01:36 Nirmal-Juthanis-iPhone wifid[15] <Notice>: Too 
frequent(4.993576 secs) rssi event from driver
Jan 13 14:01:36 Nirmal-Juthanis-iPhone wifid[15] <Notice>: 
Jan 13 14:01:42 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: 
java.lang.NullPointerException
        at com_codename1_impl_ios_IOSImplementation_4.run:449
        at com_codename1_ui_Display.processSerialCalls:1110
        at com_codename1_ui_Display.edtLoopImpl:1054
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:476
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_codename1_ui_TextArea.editString:561
        at com_codename1_ui_TextArea.pointerReleased:594
        at com_codename1_ui_TextField.pointerReleased:1579
        at com_codename1_ui_Form.pointerReleased:2339
        at com_codename1_ui_Component.pointerReleased:2664
        at com_codename1_ui_Display.handleEvent:1937
        at com_codename1_ui_Display.edtLoopImpl:1029
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:476
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_codename1_ui_TextArea.editString:561
        at com_codename1_ui_TextArea.pointerReleased:594
        at com_codename1_ui_TextField.pointerReleased:1579
        at com_codename1_ui_Form.pointerReleased:2339
        at com_codename1_ui_Component.pointerReleased:2664
        at com_codename1_ui_Display.handleEvent:1937
        at com_codename1_ui_Display.edtLoopImpl:1029
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:476
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_codename1_ui_TextArea.editString:561
        at com_codename1_ui_TextArea.pointerReleased:594
        at com_codename1_ui_TextField.pointerReleased:1579
        at com_codename1_ui_Form.pointerReleased:2339
        at com_codename1_ui_Component.pointerReleased:2664
        at com_codename1_ui_Display.handleEvent:1937
        at com_codename1_ui_Display.edtLoopImpl:1029
        at com_codename1_ui_Display.flushEdt:847
        at com_codename1_ui_Form.showModal:1535
        at com_codename1_ui_Dialog.showModal:1089
        at com_codename1_ui_Dialog.show:470
        at com_codename1_ui_Dialog.showPackedImpl:1386
        at com_codename1_ui_Dialog.showPacked:1294
        at com_codename1_ui_Dialog.showImpl:1049
        at com_codename1_ui_Dialog.show:1031
        at com_codename1_ui_Dialog.show:989
        at com_codename1_ui_Dialog.show:778
        at com_codename1_ui_Dialog.show:731
        at com_codename1_ui_Dialog.show:696
        at com_codename1_ui_Dialog.show:540
        at com_codename1_ui_Dialog.show:792
        at com_codename1_ui_Display.mainEDTLoop:973
        at com_codename1_ui_RunnableWrapper.run:120
        at com_codename1_impl_CodenameOneThread.run:176
        at java_lang_Thread.runImpl:153
Jan 13 14:01:42 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: 
Jan 13 14:01:42 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: [EDT] 0:0:0,0 
- java.lang.NullPointerException: null
Jan 13 14:01:43 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: [EDT] 
0:0:0,111 - java.lang.NullPointerException: null
Jan 13 14:01:43 Nirmal-Juthanis-iPhone S2PayApp[9124] <Warning>: Deleting 
thread 2

Original comment by nirmalju...@gmail.com on 13 Jan 2015 at 8:35

GoogleCodeExporter commented 8 years ago
Thanks, this should be fixed in SVN.

Original comment by shai.almog on 14 Jan 2015 at 9:40

GoogleCodeExporter commented 8 years ago
the app is now crashing again, but this time without any stack traces on the 
device. I have attached the crash log report, will it help?

Original comment by nir...@nvsoft.com on 14 Jan 2015 at 11:08

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

It seems to be something related to memory management or GC. When I run the app 
under xcode, it gives memory warning sometime. Also the app crashes at 
different locations every time and it seems to be random.

Also when testing one particular functionality, the app crashes when run 
directly on the device. However when running through xcode under debug step by 
step, it seems to pass through that functionality and then crashes after some 
time when left idle.

So I think, this bug could be related to GC issue.

Please let me know, what can be done to find the root cause.

Original comment by nir...@nvsoft.com on 14 Jan 2015 at 2:19

GoogleCodeExporter commented 8 years ago
We made improvements to the GC which should hopefully fix that

Original comment by shai.almog on 18 Jan 2015 at 2:11

GoogleCodeExporter commented 8 years ago
Hi Shai,

tried again with the latest build from server, however the app is still 
crashing. The recent fixes does not seem to have resolved the issue.

Also randomly, it does not show the components on the screen. And throws the 
following null pointer exception when you access a form with some text fields 
on it.

Jan 19 10:13:53  S2PayApp[14654] <Warning>: java.lang.NullPointerException
        at com_codename1_impl_ios_IOSImplementation_6.run:493
        at com_codename1_ui_Display.processSerialCalls:1110
        at com_codename1_ui_Display.edtLoopImpl:1054
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:510
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_nvsoft_s2pay_fsm_PayMoneyUI_4_1.run:293
        at com_codename1_ui_Display.processSerialCalls:1110
        at com_codename1_ui_Display.edtLoopImpl:1054
        at com_codename1_ui_Display.mainEDTLoop:960
        at com_codename1_ui_RunnableWrapper.run:120
        at com_codename1_impl_CodenameOneThread.run:176
        at java_lang_Thread.runImpl:153
Jan 19 10:13:53  S2PayApp[14654] <Warning>: 
Jan 19 10:13:54  mstreamd[14656] <Notice>: (Note ) mstreamd: Not monitoring for 
external power.
Jan 19 10:13:54  mstreamd[14656] <Notice>: (Note ) PS: Media stream daemon 
stopping.
Jan 19 10:13:54  mstreamd[14656] <Notice>: (Note ) AS: 
<MSIOSAlbumSharingDaemon: 0x15d75590>: Shared Streams daemon has shut down.
Jan 19 10:13:54  mstreamd[14656] <Notice>: (Warn ) mstreamd: mstreamd shutting 
down.
Jan 19 10:13:55  mstreamd[14657] <Notice>: (Note ) mstreamd: mstreamd starting 
up.
Jan 19 10:13:55  mstreamd[14657] <Notice>: (Note ) PS: Media stream daemon 
starting...
Jan 19 10:13:58  ubd[50] <Error>: Couldn't create symlink at 
/var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/Ubiquity/ubiquity-digest.l
og (No such file or directory)
Jan 19 10:13:58  ubd[50] <Error>: Couldn't open log file 
/var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/Ubiquity/ubiquity-digest-2
015-01-19-101358+0530.log (No such file or directory)
Jan 19 10:13:58  ubd[50] <Error>: Couldn't create symlink at 
/var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/Ubiquity/ubiquity-digest.l
og (No such file or directory)
Jan 19 10:13:58  ubd[50] <Error>: Couldn't open log file 
/var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/Ubiquity/ubiquity-digest-2
015-01-19-101358+0530.log (No such file or directory)
Jan 19 10:14:02  S2PayApp[14654] <Warning>: java.lang.NullPointerException
        at com_codename1_impl_ios_IOSImplementation_6.run:493
        at com_codename1_ui_Display.processSerialCalls:1110
        at com_codename1_ui_Display.edtLoopImpl:1054
        at com_codename1_ui_Display.invokeAndBlock:1164
        at com_codename1_ui_Display.invokeAndBlock:1199
        at com_codename1_impl_ios_IOSImplementation.editString:510
        at com_codename1_impl_CodenameOneImplementation.editStringImpl:289
        at com_codename1_ui_Display.editString:1474
        at com_codename1_ui_Display.editString:1446
        at com_codename1_ui_TextArea.editString:561
        at com_codename1_ui_TextArea.pointerReleased:594
        at com_codename1_ui_TextField.pointerReleased:1579
        at com_codename1_ui_Form.pointerReleased:2339
        at com_codename1_ui_Component.pointerReleased:2667
        at com_codename1_ui_Display.handleEvent:1937
        at com_codename1_ui_Display.edtLoopImpl:1029
        at com_codename1_ui_Display.mainEDTLoop:960
        at com_codename1_ui_RunnableWrapper.run:120
        at com_codename1_impl_CodenameOneThread.run:176
        at java_lang_Thread.runImpl:153
Jan 19 10:14:02  S2PayApp[14654] <Warning>: 
Jan 19 10:14:10  wifid[15] <Notice>: WiFi:[443335450.450060]: External power 
source removed

Original comment by nir...@nvsoft.com on 19 Jan 2015 at 4:46

GoogleCodeExporter commented 8 years ago
Tested with latest build server right now and still the app crashes after doing 
some activity. Can you please suggest what can be done to debug this issue?

Original comment by nir...@nvsoft.com on 20 Jan 2015 at 5:18

GoogleCodeExporter commented 8 years ago
I have confirmed that this error happens with the new VM and that it does not 
happen with the old VM.  Looking into it further now.

Original comment by st...@weblite.ca on 27 Jan 2015 at 11:10

GoogleCodeExporter commented 8 years ago
This is fixed now
https://code.google.com/p/codenameone/source/detail?r=2046

The fix may be masking another problem with the new VM, as I fixed it by adding 
a null check, and, as far as I can tell, that shouldn't have been necessary. 

Original comment by st...@weblite.ca on 27 Jan 2015 at 11:42