MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
951 stars 132 forks source link

App crashes at startup #196

Closed gwrn closed 7 years ago

gwrn commented 7 years ago

Issue details

Sometimes my app crashes at startup and I have completely no idea what is wrong. I see "splash screen" image and then after a few second it just crashes. I didn't notice any pattern when the crash ocures it seems do happen randomly. I have noticed this crash on different iPhone simulators and also on real devices. My app uses RxJava and Kotlin but I don't know if this has anything to do with that error. I have tried different versions of libraries but it didn't help. I would appreciated any help :)

Configuration

Build Tools:

Versions:

Please provide the version of RoboVM, XCode and JDK used

Build Targets: iPhone 6s Simulator x86


Stacktrace

Identifier: MyApp Version: 1.3.8 (1) Code Type: X86 (Native) Parent Process: launchd_sim [60345] Responsible: MyApp [60483] User ID: 501

Date/Time: 2017-08-28 06:54:28.990 +0200 OS Version: Mac OS X 10.12.4 (16E195) Report Version: 12 Anonymous UUID: C0EA11B1-9124-939A-9F00-10DB7196397D

Sleep/Wake UUID: DAC45782-556F-467C-BCAF-BEBD14483128

Time Awake Since Boot: 120000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d

Application Specific Information: CoreSimulator 375.21 - Device: iPhone 6s - Runtime: iOS 10.3 (14E269) - DeviceType: iPhone 6s

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x0d9fd91e mach_msg_trap + 10 1 libsystem_kernel.dylib 0x0d9fce93 mach_msg + 51 2 com.apple.CoreFoundation 0x0d1a83dc CFRunLoopServiceMachPort + 188 3 com.apple.CoreFoundation 0x0d1a7863 CFRunLoopRun + 1539 4 com.apple.CoreFoundation 0x0d1a6fd4 CFRunLoopRunSpecific + 372 5 com.apple.CoreFoundation 0x0d1a6e4b CFRunLoopRunInMode + 123 6 com.apple.UIKit 0x098371e6 -[UIApplication _run] + 488 7 com.apple.UIKit 0x0983dcb9 UIApplicationMain + 148 8 com.my.comppany.MyApp 0x013292a5 [J]org.robovm.apple.uikit.UIApplication.main(ILorg/robovm/rt/bro/ptr/BytePtr$BytePtrPtr;Ljava/lang/String;Ljava/lang/String;)I + 197 9 com.my.comppany.MyApp 0x01327fbe [J]org.robovm.apple.uikit.UIApplication.main([Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Class;)V + 926 10 com.my.comppany.MyApp 0x01328082 [j]org.robovm.apple.uikit.UIApplication.main([Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Class;)V[clinit] + 86 11 com.my.comppany.MyApp 0x008616bb [J]com.bluebird.mobile.ios.IOSLauncher$Companion.main([Ljava/lang/String;)V + 100 12 com.my.comppany.MyApp 0x00860cd9 [J]com.bluebird.mobile.ios.IOSLauncher.main([Ljava/lang/String;)V + 87 13 com.my.comppany.MyApp 0x015d66f0 _call0 + 48 14 com.my.comppany.MyApp 0x015cd83d callVoidMethod + 81 15 com.my.comppany.MyApp 0x015cf47c rvmCallVoidClassMethodA + 192 16 com.my.comppany.MyApp 0x015cf4c1 rvmCallVoidClassMethodV + 49 17 com.my.comppany.MyApp 0x015cf4ea rvmCallVoidClassMethod + 34 18 com.my.comppany.MyApp 0x015c86b3 rvmRun + 211 19 com.my.comppany.MyApp 0x015be794 main + 260 20 libdyld.dylib 0x0d707779 start + 1

Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x0da067c6 kevent_qos + 10 1 libdispatch.dylib 0x0d6c347a _dispatch_mgr_wait_for_event + 63 2 libdispatch.dylib 0x0d6bd2fa _dispatch_mgr_invoke + 184 3 libdispatch.dylib 0x0d6bd155 _dispatch_mgr_thread + 59

Thread 2: 0 libsystem_kernel.dylib 0x0da05cba __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x0dea6d32 _pthread_wqthread + 1210 2 libsystem_pthread.dylib 0x0dea6852 start_wqthread + 34

Thread 3: 0 libsystem_kernel.dylib 0x0da05cba __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x0dea6d32 _pthread_wqthread + 1210 2 libsystem_pthread.dylib 0x0dea6852 start_wqthread + 34

Thread 4: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015f0db7 GC_wait_marker + 39 4 com.my.comppany.MyApp 0x015e8bef GC_help_marker + 191 5 com.my.comppany.MyApp 0x015ef2ae GC_mark_thread + 238 6 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 7 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 8 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 5: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015f0db7 GC_wait_marker + 39 4 com.my.comppany.MyApp 0x015e8bef GC_help_marker + 191 5 com.my.comppany.MyApp 0x015ef2ae GC_mark_thread + 238 6 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 7 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 8 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 6: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015f0db7 GC_wait_marker + 39 4 com.my.comppany.MyApp 0x015e8bef GC_help_marker + 191 5 com.my.comppany.MyApp 0x015ef2ae GC_mark_thread + 238 6 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 7 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 8 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 7: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015f0db7 GC_wait_marker + 39 4 com.my.comppany.MyApp 0x015e8bef GC_help_marker + 191 5 com.my.comppany.MyApp 0x015ef2ae GC_mark_thread + 238 6 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 7 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 8 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 8: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015f0db7 GC_wait_marker + 39 4 com.my.comppany.MyApp 0x015e8bef GC_help_marker + 191 5 com.my.comppany.MyApp 0x015ef2ae GC_mark_thread + 238 6 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 7 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 8 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 9: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015f0db7 GC_wait_marker + 39 4 com.my.comppany.MyApp 0x015e8bef GC_help_marker + 191 5 com.my.comppany.MyApp 0x015ef2ae GC_mark_thread + 238 6 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 7 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 8 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 10: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015f0db7 GC_wait_marker + 39 4 com.my.comppany.MyApp 0x015e8bef GC_help_marker + 191 5 com.my.comppany.MyApp 0x015ef2ae GC_mark_thread + 238 6 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 7 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 8 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 11: 0 libsystem_kernel.dylib 0x0d9fd91e mach_msg_trap + 10 1 libsystem_kernel.dylib 0x0d9fce93 mach_msg + 51 2 libsystem_kernel.dylib 0x0d9fd647 mach_msg_server + 323 3 com.my.comppany.MyApp 0x015c0c63 exceptionHandlerEntryPoint + 37 4 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 5 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 6 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 12: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015d0c96 waitMonitor + 695 4 com.my.comppany.MyApp 0x015d09c2 rvmObjectWait + 141 5 com.my.comppany.MyApp 0x00004184 Java_java_lang_Object_wait + 31 6 com.my.comppany.MyApp 0x00a6aca8 [J]java.lang.Object.wait(JI)V + 84 7 com.my.comppany.MyApp 0x00a6ac11 [J]java.lang.Object.wait()V + 55 8 com.my.comppany.MyApp 0x00a5c2b4 [J]java.lang.Daemons$ReferenceQueueDaemon.run()V + 272 9 com.my.comppany.MyApp 0x00a881fe [J]java.lang.Thread.run()V + 40 10 com.my.comppany.MyApp 0x015d66f0 _call0 + 48 11 com.my.comppany.MyApp 0x015cd83d callVoidMethod + 81 12 com.my.comppany.MyApp 0x015cd593 rvmCallVoidInstanceMethodA + 239 13 com.my.comppany.MyApp 0x015d5b45 startThreadEntryPoint + 321 14 com.my.comppany.MyApp 0x015ef077 GC_inner_start_routine + 119 15 com.my.comppany.MyApp 0x015ec199 GC_call_with_stack_base + 41 16 com.my.comppany.MyApp 0x015f06e7 GC_start_routine + 39 17 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 18 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 19 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 13: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015d0c96 waitMonitor + 695 4 com.my.comppany.MyApp 0x015d09c2 rvmObjectWait + 141 5 com.my.comppany.MyApp 0x00004184 Java_java_lang_Object_wait + 31 6 com.my.comppany.MyApp 0x00a6aca8 [J]java.lang.Object.wait(JI)V + 84 7 com.my.comppany.MyApp 0x00a6ac4d [J]java.lang.Object.wait(J)V + 55 8 com.my.comppany.MyApp 0x00a940d4 [J]java.lang.ref.ReferenceQueue.remove(J)Ljava/lang/ref/Reference; + 150 9 com.my.comppany.MyApp 0x00a942b6 [j]java.lang.ref.ReferenceQueue.remove(J)Ljava/lang/ref/Reference;[synchronized] + 106 10 com.my.comppany.MyApp 0x00a94039 [J]java.lang.ref.ReferenceQueue.remove()Ljava/lang/ref/Reference; + 47 11 com.my.comppany.MyApp 0x00a5b5ae [J]java.lang.Daemons$FinalizerDaemon.run()V + 126 12 com.my.comppany.MyApp 0x00a881fe [J]java.lang.Thread.run()V + 40 13 com.my.comppany.MyApp 0x015d66f0 _call0 + 48 14 com.my.comppany.MyApp 0x015cd83d callVoidMethod + 81 15 com.my.comppany.MyApp 0x015cd593 rvmCallVoidInstanceMethodA + 239 16 com.my.comppany.MyApp 0x015d5b45 startThreadEntryPoint + 321 17 com.my.comppany.MyApp 0x015ef077 GC_inner_start_routine + 119 18 com.my.comppany.MyApp 0x015ec199 GC_call_with_stack_base + 41 19 com.my.comppany.MyApp 0x015f06e7 GC_start_routine + 39 20 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 21 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 22 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 14: 0 libsystem_kernel.dylib 0x0da0530e __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0dea7edc _pthread_cond_wait + 647 2 libsystem_pthread.dylib 0x0dea996c pthread_cond_wait$UNIX2003 + 51 3 com.my.comppany.MyApp 0x015d0c96 waitMonitor + 695 4 com.my.comppany.MyApp 0x015d09c2 rvmObjectWait + 141 5 com.my.comppany.MyApp 0x00004184 Java_java_lang_Object_wait + 31 6 com.my.comppany.MyApp 0x00a6aca8 [J]java.lang.Object.wait(JI)V + 84 7 com.my.comppany.MyApp 0x00a6ac11 [J]java.lang.Object.wait()V + 55 8 com.my.comppany.MyApp 0x00a5bc33 [J]java.lang.Daemons$FinalizerWatchdogDaemon.waitForObject()Ljava/lang/Object; + 325 9 com.my.comppany.MyApp 0x00a5baa6 [J]java.lang.Daemons$FinalizerWatchdogDaemon.run()V + 50 10 com.my.comppany.MyApp 0x00a881fe [J]java.lang.Thread.run()V + 40 11 com.my.comppany.MyApp 0x015d66f0 _call0 + 48 12 com.my.comppany.MyApp 0x015cd83d callVoidMethod + 81 13 com.my.comppany.MyApp 0x015cd593 rvmCallVoidInstanceMethodA + 239 14 com.my.comppany.MyApp 0x015d5b45 startThreadEntryPoint + 321 15 com.my.comppany.MyApp 0x015ef077 GC_inner_start_routine + 119 16 com.my.comppany.MyApp 0x015ec199 GC_call_with_stack_base + 41 17 com.my.comppany.MyApp 0x015f06e7 GC_start_routine + 39 18 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 19 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 20 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 15:: com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x0d9fd91e mach_msg_trap + 10 1 libsystem_kernel.dylib 0x0d9fce93 mach_msg + 51 2 com.apple.CoreFoundation 0x0d1a83dc CFRunLoopServiceMachPort + 188 3 com.apple.CoreFoundation 0x0d1a7863 CFRunLoopRun + 1539 4 com.apple.CoreFoundation 0x0d1a6fd4 CFRunLoopRunSpecific + 372 5 com.apple.CoreFoundation 0x0d1a6e4b CFRunLoopRunInMode + 123 6 com.apple.Foundation 0x07b03176 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 307 7 com.apple.Foundation 0x07b89a96 -[NSRunLoop(NSRunLoop) runUntilDate:] + 71 8 com.apple.UIKit 0x0a370819 -[UIEventFetcher threadMain] + 146 9 com.apple.Foundation 0x07b133a2 -[NSThread main] + 68 10 com.apple.Foundation 0x07b1312e NSThreadstart__ + 1283 11 libsystem_pthread.dylib 0x0dea7073 _pthread_body + 184 12 libsystem_pthread.dylib 0x0dea6fbb _pthread_start + 243 13 libsystem_pthread.dylib 0x0dea6876 thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit): eax: 0x10004005 ebx: 0x07000806 ecx: 0xbfffd92c edx: 0x0d9fd91e edi: 0xbfffda68 esi: 0xffffffff ebp: 0xbfffd968 esp: 0xbfffd92c ss: 0x00000023 efl: 0x00000292 eip: 0x0d9fd91e cs: 0x0000000b ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f cr2: 0x0985ba29

Logical CPU: 0 Error Code: 0xffffffe1 Trap Number: 132

Tom-Ski commented 7 years ago

The crash is due to the app taking too long to launch. Are you blocking the main thread?

gwrn commented 7 years ago

Thank you @Tom-Ski. I might be blocking main thread. I will check it.

gwrn commented 7 years ago

@Tom-Ski were right. I was blocking main thread. Thank you for help.