openGeeksLab / codenameone

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

Timer.cancel() causes crash on new iOS vm #1389

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.
If related to a device be sure to specify exactly which device with as much
details as possible.

the problem occurs on new iOS vm

What steps will reproduce the problem?
1. Run this code:

Timer timer = new Timer();
timer.cancel();
timer = null;

2. On iOS simulator do Hardware - Simulate Memory Warning (or wait for garbage 
collection)

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

I would like to see not crashing app, but it crashes:

#0  0x00ef6de8 in monitorEnter at /dist/MyApplication-src/nativeMethods.m:750
#1  0x00ecb25b in java_util_Timer_FinalizerHelper_finalize__ at 
/dist/MyApplication-src/java_util_Timer_FinalizerHelper.m:61
#2  0x00ecada4 in __FINALIZER_java_util_Timer_FinalizerHelper at 
/dist/MyApplication-src/java_util_Timer_FinalizerHelper.m:16
#3  0x001051e6 in freeAndFinalize at /dist/MyApplication-src/cn1_globals.m:176
#4  0x00105cb9 in codenameOneGCSweep at /dist/MyApplication-src/cn1_globals.m:537
#5  0x00ef6c6f in java_lang_System_gcMarkSweep__ at 
/dist/MyApplication-src/nativeMethods.m:722
#6  0x00d93743 in java_lang_System_access$100__ at 
/dist/MyApplication-src/java_lang_System.m:251
#7  0x00d95211 in java_lang_System_1_run__ at 
/dist/MyApplication-src/java_lang_System_1.m:148
#8  0x00d5f1a6 in virtual_java_lang_Runnable_run__ at 
/dist/MyApplication-src/java_lang_Runnable.m:63
#9  0x00d976dd in java_lang_Thread_runImpl___long at 
/dist/MyApplication-src/java_lang_Thread.m:242
#10 0x00ef70db in threadRunner at /dist/MyApplication-src/nativeMethods.m:870
#11 0x05efa5fb in _pthread_body ()
#13 0x05effcf2 in thread_start ()

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

the latest buildserver build on iOS simulator

Original issue reported on code.google.com by jaanus.h...@gmail.com on 6 Mar 2015 at 9:13

GoogleCodeExporter commented 8 years ago
Thanks. This should be fixed in SVN, it would probably be in the build servers 
in a couple of days.

Original comment by shai.almog on 16 Mar 2015 at 7:28