SDK 51.2.1.5 - starting Worker is causing a crash
Problem Description
We're having problem with using worker in newest SDK 51.2.1.5 when compiling to Android. When we're starting the Worker with start() it's crashing the app. 100% repetitive. We've tried to recompile Worker with same SDK but same result. It's working fine on SDK 51.1.3.12 and 50.2.5.
Worker is very simple: it's checking file hashes to verify if they were downloaded correctly.
Crash report from app from google store:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 13921 >>> air.com.taern.BrokenRanks <<<
backtrace:
#00 pc 0x0000000000287338 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#01 pc 0x00000000002dc3bc /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#02 pc 0x00000000002dac84 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#03 pc 0x00000000002dee44 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#04 pc 0x00000000003934fc /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#05 pc 0x000000000038f9a4 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#06 pc 0x00000000004c0478 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#07 pc 0x00000000004e28b0 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#08 pc 0x00000000004e36f0 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#09 pc 0x0000000000283d68 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#10 pc 0x00000000002874e0 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#11 pc 0x000000000028aa48 /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/split_config.arm64_v8a.apk!libCore.so (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
#12 pc 0x0000000000dc2420 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
#13 pc 0x00000000000c734c /data/app/~~_DyzHKCoruf5nMCG2XVQ5g==/air.com.taern.BrokenRanks-56RMN9zCYvh-7B02p-KQEQ==/oat/arm64/base.odex (com.adobe.air.customHandler.handleMessage+76)
#14 pc 0x000000000094ca78 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Handler.dispatchMessage+152)
#15 pc 0x0000000000950384 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loopOnce+980)
#16 pc 0x000000000094ff14 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.os.Looper.loop+916)
#17 pc 0x00000000006e6278 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (android.app.ActivityThread.main+2120)
#18 pc 0x0000000000328460 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640)
#19 pc 0x00000000003224a0 /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+544)
#20 pc 0x00000000005c5af8 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*) (.__uniq.165753521025965369065708152063621506277)+32)
#21 pc 0x0000000000dc34e4 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+116)
#22 pc 0x0000000000c7f244 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+116)
#23 pc 0x0000000000c89534 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (com.android.internal.os.ZygoteInit.main+3396)
#24 pc 0x0000000000328460 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640)
#25 pc 0x0000000000327098 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+800)
#26 pc 0x000000000064a850 /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+156)
#27 pc 0x00000000000e4be8 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+108)
#28 pc 0x00000000000f15bc /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+856)
#29 pc 0x0000000000002558 /system/bin/app_process64 (main+1280)
#30 pc 0x000000000008d7c8 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108)
Logs from logcat when we were trying figure out what's going on:
2025-06-18 00:42:10.571 11292-11292 libc air.com.taern.BrokenRanksDebugv2 A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 11292 (kenRanksDebugv2), pid 11292 (kenRanksDebugv2)
2025-06-18 00:42:10.827 1734-1734 LayerHistory surfaceflinger I SurfaceView[air.com.taern.BrokenRanksDebugv2/air.com.taern.BrokenRanksDebugv2.AIRAppEntry]@0(BLAST)#35615 Max (can't resolve refresh rate)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A Cmdline: air.com.taern.BrokenRanksDebugv2
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A pid: 11292, tid: 11292, name: kenRanksDebugv2 >>> air.com.taern.BrokenRanksDebugv2 <<<
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #00 pc 0000000000287338 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #01 pc 00000000002dc3bc /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #02 pc 00000000002dac84 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #03 pc 00000000002dee44 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #04 pc 00000000003934fc /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #05 pc 000000000038f9a4 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #06 pc 00000000004c0478 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #07 pc 00000000004e28b0 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #08 pc 00000000004e36f0 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #09 pc 0000000000283d68 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #10 pc 00000000002874e0 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #11 pc 000000000028aa48 /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk!libCore.so (offset 0xbad000) (BuildId: ecda42a84668fecda5c727c0865d2cdd690f55cc)
2025-06-18 00:42:11.053 11649-11649 DEBUG pid-11649 A #17 pc 00000000003f7b34 [anon:dalvik-classes.dex extracted in memory from /data/app/~~EuVTKsTS5hbnil8rMt8wZw==/air.com.taern.BrokenRanksDebugv2-DHi-T8wwE6viw-mG6wB7kQ==/base.apk] (com.adobe.air.customHandler.handleMessage+0)
2025-06-18 00:42:11.093 2116-11693 ActivityTaskManager system_server W Force finishing activity air.com.taern.BrokenRanksDebugv2/.AIRAppEntry
2025-06-18 00:42:11.094 2116-11696 ActivityManager system_server W crash : air.com.taern.BrokenRanksDebugv2,10771
Known Workarounds
Use SDK 51.1.3.12
Thanks - this is when a worker is trying to update the screen .. but, a Worker should not have any way to reference a Window object and shouldn't be doing any rendering, so we need to add some protection in here. I'm actually a bit surprised that these functions are being called anyway! We'll try to do some checks to see if we can get this to reproduce, and then ensure that it's fixed without side effects...
thanks
Thank you for explanation. We're compiling this worker to separated swf so it's exending Sprite class. And in our main thread we're embeding this compiled swf. Besides extending Sprite class it doesn't do any operation on the screen. Maybe this extend start to cause this problem?
I would have thought that a worker that's extending Sprite would be okay, since a lot of our test code uses the initial/main class as both the primordial and the secondary worker. Interesting - I'm not sure what would trigger the worker to start trying to draw to the screen...
It looks like SDK 51.2.1.6 FIXED this issue. I've tested on 2 different smarthones and it looks like it's working fine now. I'll confirm tomorrow with some more tests.
Bug is gone completly with SDK 51.2.1.6.