[AC-2774] Android random crash of all windows resulting in black screen
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-02-15T14:40:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | 1.8.1, android, v8 |
Reporter | Justin Toth |
Assignee | Mauro Parra-Miranda |
Created | 2012-02-15T12:04:40.000+0000 |
Updated | 2016-03-08T07:47:41.000+0000 |
Description
After upgrading to 1.8 and V8, I have been getting a lot of random app crashes while switching between windows. Unlike previous versions where these crashes would close the application, now they actually crash all windows and leave the application showing a black screen. The back button does not exit the app at this point, but 3+ presses on the home button will eventually bring you back to the Android home. After relaunching the application, it brings you back to the black screen. The only way to get the application back in working order to is to kill the app in task manager and then relaunch or do a full reinstall.
Unfortunately, no useful error messages are given. Normally I would give code to reproduce but it would be impossible to do so, as this error is so "hit or miss".
Here is the log when it is crashing and killing all windows, leaving us with the black screen:
I/InputReader( 312): dispatchTouch::touch event's action is 0, pending(waiting finished signal)=0
I/InputDispatcher( 312): Delivering touch to current input target: action: 0, channel '43efd608 com.navtrak.driver/org.appcelerator.titanium.TiActivity (server)'
I/InputDispatcher( 312): Delivering touch to current input target: action: 0, channel 'TouchIntercepter (server)'
I/InputReader( 312): dispatchTouch::touch event's action is 1, pending(waiting finished signal)=0
I/InputDispatcher( 312): Delivering touch to current input target: action: 1, channel '43efd608 com.navtrak.driver/org.appcelerator.titanium.TiActivity (server)'
I/InputDispatcher( 312): Delivering touch to current input target: action: 1, channel 'TouchIntercepter (server)'
W/dalvikvm(32022): JNI WARNING: DeleteLocalRef(0x40e9dc30) failed to find entry (valid=1)
I/AudioFlinger( 240): start output streamType (0, 1) for 1
I/DEBUG ( 8442): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 8442): Build fingerprint: 'samsung/GT-P7510/GT-P7510:3.2/HTJ85B/UEKMP:user/release-keys'
I/DEBUG ( 8442): pid: 32022, tid: 32032 >>> com.navtrak.driver <<<
I/DEBUG ( 8442): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000020
I/DEBUG ( 8442): r0 00000007 r1 00000001 r2 401aed10 r3 00000000
I/DEBUG ( 8442): r4 00000020 r5 0019dd20 r6 401aed10 r7 00000003
I/DEBUG ( 8442): r8 001abf2c r9 81c9b660 10 40c4c450 fp 40c40248
I/DEBUG ( 8442): ip 0000004c sp 5c46ea88 lr aca45109 pc aca4510e cpsr 60000030
I/DEBUG ( 8442): d0 41d64a43b2000000 d1 58f5405558f54071
I/DEBUG ( 8442): d2 3ff0000000000000 d3 4197d78400000000
I/DEBUG ( 8442): d4 3ff0000000000000 d5 0000000000000000
I/DEBUG ( 8442): d6 0000001a00000000 d7 0000001a00000000
I/DEBUG ( 8442): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 8442): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 8442): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 8442): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 8442): scr 60000011
I/DEBUG ( 8442):
I/AudioFlinger( 240): stop output streamType (0, 1) for 1
I/DEBUG ( 8442): #00 pc 0004510e /system/lib/libdvm.so
I/DEBUG ( 8442): #01 pc 0006ea6a /data/data/com.navtrak.driver/lib/libkroll-v8.so (_ZN8titanium13TypeConverter19javaObjectToJsValueEP8_jobject)
I/DEBUG ( 8442): #02 pc 0006ebd2 /data/data/com.navtrak.driver/lib/libkroll-v8.so (_ZN8titanium13TypeConverter19javaObjectToJsValueEP8_jobject)
I/DEBUG ( 8442): #03 pc 0006f10e /data/data/com.navtrak.driver/lib/libkroll-v8.so (Java_org_appcelerator_kroll_runtime_v8_V8Object_nativeFireEvent)
I/DEBUG ( 8442): #04 pc 00011d34 /system/lib/libdvm.so
I/DEBUG ( 8442):
I/DEBUG ( 8442): libc base address: aff00000
I/DEBUG ( 8442):
I/DEBUG ( 8442): code around pc:
I/DEBUG ( 8442): aca450ec 0003be72 0003852c 0003be81 6905b570
I/DEBUG ( 8442): aca450fc 2101460c 46164628 fdbef005 3401b90c
I/DEBUG ( 8442): aca4510c 6820e008 d10142b0 e0022001 f01f4631
I/DEBUG ( 8442): aca4511c b2c4fe21 21074628 fdaef005 bd704620
I/DEBUG ( 8442): aca4512c 6905b570 4616460c 46282101 fda4f005
I/DEBUG ( 8442):
I/DEBUG ( 8442): code around lr:
I/DEBUG ( 8442): aca450e8 000385d6 0003be72 0003852c 0003be81
I/DEBUG ( 8442): aca450f8 6905b570 2101460c 46164628 fdbef005
I/DEBUG ( 8442): aca45108 3401b90c 6820e008 d10142b0 e0022001
I/DEBUG ( 8442): aca45118 f01f4631 b2c4fe21 21074628 fdaef005
I/DEBUG ( 8442): aca45128 bd704620 6905b570 4616460c 46282101
I/DEBUG ( 8442):
I/DEBUG ( 8442): stack:
I/DEBUG ( 8442): 5c46ea48 5c46ead0
I/DEBUG ( 8442): 5c46ea4c 81c9b660
I/DEBUG ( 8442): 5c46ea50 001abda8
I/DEBUG ( 8442): 5c46ea54 001abf2c
I/DEBUG ( 8442): 5c46ea58 001d28ac
I/DEBUG ( 8442): 5c46ea5c 001abf2c
I/DEBUG ( 8442): 5c46ea60 00001c34
I/DEBUG ( 8442): 5c46ea64 00000000
I/DEBUG ( 8442): 5c46ea68 00000000
I/DEBUG ( 8442): 5c46ea6c 81986088 /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG ( 8442): 5c46ea70 00000000
I/DEBUG ( 8442): 5c46ea74 00000000
I/DEBUG ( 8442): 5c46ea78 00000020
I/DEBUG ( 8442): 5c46ea7c 0019dd20
I/DEBUG ( 8442): 5c46ea80 df002777
I/DEBUG ( 8442): 5c46ea84 e3a070ad
I/DEBUG ( 8442): #00 5c46ea88 0008b790
I/DEBUG ( 8442): 5c46ea8c 81c9b660
I/DEBUG ( 8442): 5c46ea90 00000020
I/DEBUG ( 8442): 5c46ea94 8186ea6d /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/DEBUG ( 8442): #01 5c46ea98 0019dd20
I/DEBUG ( 8442): 5c46ea9c 40c40250
I/DEBUG ( 8442): 5c46eaa0 0019dd20
I/DEBUG ( 8442): 5c46eaa4 00000020
I/DEBUG ( 8442): 5c46eaa8 00000002
I/DEBUG ( 8442): 5c46eaac 0008b790
I/DEBUG ( 8442): 5c46eab0 00000020
I/DEBUG ( 8442): 5c46eab4 00000000
I/DEBUG ( 8442): 5c46eab8 00000003
I/DEBUG ( 8442): 5c46eabc 001abf2c
I/DEBUG ( 8442): 5c46eac0 81c9b660
I/DEBUG ( 8442): 5c46eac4 40c4c450
I/DEBUG ( 8442): 5c46eac8 40c40248
I/DEBUG ( 8442): 5c46eacc 8186ebd7 /data/data/com.navtrak.driver/lib/libkroll-v8.so
I/BootReceiver( 312): Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
I/DEBUG ( 8442): dumpstate /data/log/dumpstate_app_native.txt
I/dumpstate(32111): begin
I/wpa_supplicant( 642): SCAN_RESULTS : [9]
I/alsa_mixer( 240): mixer_close
I/AudioHardware( 240): closePcmOut_l() mPcmOpenCnt: 1
W/PowerManagerService( 312): Timer 0x3->0x3|0x0
I/dumpstate(32111): done
E/InputDispatcher( 312): channel '42c81d08 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
E/InputDispatcher( 312): channel '42c81d08 com.navtrak.driver/com.navtrak.driver.DriverActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowManager( 312): WINDOW DIED Window{42c81d08 com.navtrak.driver/com.navtrak.driver.DriverActivity paused=false}
I/ActivityManager( 312): Process com.navtrak.driver (pid 32022) has died.
E/InputDispatcher( 312): channel '43efd608 com.navtrak.driver/org.appcelerator.titanium.TiActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
E/InputDispatcher( 312): channel '43efd608 com.navtrak.driver/org.appcelerator.titanium.TiActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
W/GpsLocationProvider( 312): Unneeded remove listener for uid 1000
W/WindowManager( 312): Failed looking up window
W/WindowManager( 312): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@437d0260 does not exist
W/WindowManager( 312): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7120)
W/WindowManager( 312): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7111)
W/WindowManager( 312): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1400)
W/WindowManager( 312): at android.os.BinderProxy.sendDeathNotice(Binder.java:418)
W/WindowManager( 312): at com.android.server.SystemServer.init1(Native Method)
W/WindowManager( 312): at com.android.server.SystemServer.main(SystemServer.java:759)
W/WindowManager( 312): at java.lang.reflect.Method.invokeNative(Native Method)
W/WindowManager( 312): at java.lang.reflect.Method.invoke(Method.java:491)
W/WindowManager( 312): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
W/WindowManager( 312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
W/WindowManager( 312): at dalvik.system.NativeStart.main(Native Method)
I/WindowManager( 312): WIN DEATH: null
I/WindowManager( 312): WIN DEATH: Window{43efd608 com.navtrak.driver/org.appcelerator.titanium.TiActivity paused=false}
I/SurfaceFlinger( 237): id=4427 Removed com.navtrak.driver/org.appcelerator.titanium.TiActivity idx=1 Map Size=2
I/SurfaceFlinger( 237): id=4427 Removed com.navtrak.driver/org.appcelerator.titanium.TiActivity idx=-2 Map Size=2
I/WindowManager( 312): WINDOW DIED Window{43efd608 com.navtrak.driver/org.appcelerator.titanium.TiActivity paused=false}
I/SurfaceFlinger( 237): id=4427 Removed com.navtrak.driver/org.appcelerator.titanium.TiActivity idx=-2 Map Size=2
Here is the full log so that the error can be seen in context:
[https://gist.github.com/1838589]
TIMOB-1911 fixes the black screen issue when going home then relaunching the app or when the app crashes from an error. Thanks Mauro!
Dup of TIMOB-1911, already fixed. Tested by Justin, he agrees that this fixes this issue.
Ok I changed my mind, this isn't a duplicate. The black screen issue is fixed by upgrading to the latest CI master build, but that was just a behavior related to when the app was crashing, the underlying issue of that it's throwing an error is not fixed. I still get the same error as below about the window randomly dying with the latest build. Note that I could not put the code below in my tiapp.xml android/manifest/application section, as if I do then I no longer have the options in Ti Studio to run the application.
I was able to grab the DriverActivity node from the generated AndroidManifest.xml and add the alwaysRetainTaskState, however it had no effect. What the app does now is crash on random window transitions with the log shown above, and then it simply closes the app. It doesn't even give the dialog stating that an error occurred and asking if you want to close or continue.
Here are a few lines from the log when it crashes that might be useful for the Android developer looking at this:
Full context of the log below:
Closing since it's a dup.