airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
206 stars 11 forks source link

[ISSUE] Application crash on uncaughtError #2903

Closed bobaoapae closed 5 months ago

bobaoapae commented 1 year ago

Whenever a uncaughtError error happen the application crash instead of get the error in any uncaughtErrorEvents.

1-07 14:47:30.871 31228 31228 F DEBUG   :       #00 pc 00000000007bacd0  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #01 pc 00000000007bad2c  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #02 pc 00000000007b7fe4  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #03 pc 00000000006ac8e4  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #04 pc 0000000000411cec  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #05 pc 000000000040fce0  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #06 pc 0000000000413174  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #07 pc 000000000057ca04  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #08 pc 000000000057cb80  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #09 pc 000000000043ad08  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #10 pc 00000000006ade44  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #11 pc 0000000000414c60  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #12 pc 0000000000414b10  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #13 pc 00000000006add44  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #14 pc 00000000007d33b4  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #15 pc 00000000007d56ac  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #16 pc 00000000007dde10  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #17 pc 0000000000802a44  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #18 pc 00000000007ddb90  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #19 pc 00000000007fd608  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #20 pc 000000000074c488  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #21 pc 00000000005a4930  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #22 pc 00000000005a3474  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #23 pc 00000000006001d4  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.871 31228 31228 F DEBUG   :       #24 pc 00000000007dfe90  /data/app/~~dBg-e1onxNqmfYp2Ztm7ZQ==/br.com.redesurftank.lite.android-RVbNi_CERSKdrqur_7rOOA==/split_config.arm64_v8a.apk!libCore.so (BuildId: 017eb126381e259e572036a33307edae4772d108)
11-07 14:47:30.902  2870 31270 W ActivityManager: crash : br.com.redesurftank.lite.android,10715
bobaoapae commented 1 year ago

The code in my uncaught listener don't are executed, and even with the debugger attached the application just show the message of the error in the console (not the full stacktrace) and just crash and close.

It's Android

bobaoapae commented 1 year ago

The problem it's not on all uncaughtErrorEvents, but for somes.

like this:

windows:

[trace] ERROR: UncaughtError: Error #1009: Cannot access a property or method of a null object reference.
[trace] TypeError: Error #1009: Cannot access a property or method of a null object reference.
[trace]     at mark.views::MarkLeftView/updateSaveSchemeBtnState()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\views\MarkLeftView.as:251]
[trace]     at mark.views::MarkLeftView/chooseEquip()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\views\MarkLeftView.as:167]
[trace]     at flash.events::EventDispatcher/dispatchEventFunction()
[trace]     at flash.events::EventDispatcher/dispatchEvent()
[trace]     at mark::MarkMgr/chooseEquip()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\MarkMgr.as:363]
[trace]     at mark.views::MarkLeftView/select()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\views\MarkLeftView.as:213]
[trace]     at Function/http://adobe.com/AS3/2006/builtin::apply()
[trace]     at morn.core.handlers::Handler/executeWith()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\morn\core\handlers\Handler.as:34]
[trace]     at morn.core.components::List/set selectedIndex()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\morn\core\components\List.as:476]
[trace]     at mark.views::MarkLeftView/initialize()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\views\MarkLeftView.as:86]
[trace]     at morn.core.components::Component()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\morn\core\components\Component.as:106]
[trace]     at morn.core.components::Box()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\morn\core\components\Box.as:12]
[trace]     at morn.core.components::View()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\morn\core\components\View.as:92]
[trace]     at mark.mornUI.views::MarkLeftViewUI()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\mornUI\views\MarkLeftViewUI.as:50]
[trace]     at mark.views::MarkLeftView()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\views\MarkLeftView.as:66]
[trace]     at com.pickgliss.utils::ClassUtils$/CreatInstance()[D:\IdeaProjects\ddtank-client\libraries\src\com\pickgliss\utils\ClassUtils.as:41]
[trace]     at com.pickgliss.ui::ComponentFactory/creatCustomObject()[D:\IdeaProjects\ddtank-client\libraries\src\com\pickgliss\ui\ComponentFactory.as:210]
[trace]     at Function/MarkMgr.as$0:anonymous()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\mark\MarkMgr.as:234]
[trace]     at Function/http://adobe.com/AS3/2006/builtin::apply()
[trace]     at ddt.utils::AssetModuleLoader$/__onLoadComplete()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\ddt\utils\AssetModuleLoader.as:149]
[trace]     at flash.events::EventDispatcher/dispatchEventFunction()
[trace]     at flash.events::EventDispatcher/dispatchEvent()
[trace]     at ddt.utils::QueueLoaderUtil/tryLoadNext()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\ddt\utils\QueueLoaderUtil.as:172]
[trace]     at ddt.utils::QueueLoaderUtil/__loadNext()[C:\Users\User\IdeaProjects\ddtank-client\2png\src\ddt\utils\QueueLoaderUtil.as:137]
[trace]     at flash.events::EventDispatcher/dispatchEventFunction()
[trace]     at flash.events::EventDispatcher/dispatchEvent()
[trace]     at com.pickgliss.loader::BaseLoader/fireCompleteEvent()[D:\IdeaProjects\ddtank-client\libraries\src\com\pickgliss\loader\BaseLoader.as:246]
[trace]     at com.pickgliss.loader::ModuleLoader/__onContentLoadComplete()[D:\IdeaProjects\ddtank-client\libraries\src\com\pickgliss\loader\ModuleLoader.as:57]

work as expected, in android the same error cause the application crash before hit the uncaughtErrorEvents

@ajwfrost

bobaoapae commented 1 year ago

Even adding a breakpoint at line 250 or 251 makes the application crash and close, breakpoint it's hit an then crash/close, appears to be a problem deeper than error handling.

bobaoapae commented 1 year ago

Also this it's only happening in debug build, release build work as expected.

bobaoapae commented 9 months ago

@ajwfrost can this be checked?

marchbold commented 9 months ago

@bobaoapae Can you elaborate some more, are you saying that the crash occurs when setting a breakpoint and your IDE pauses execution?

bobaoapae commented 9 months ago

Yeah, and for unhandled exceptions to, some parts of code if i set breakpoint or have an unhandled exception the application just crash. Only happens in debug versions, release versions works without problem for unhandled exceptions, error happens and the error are caugh by the uncaught error handler. But in a debug version application crash before the uncaught error handler can log anything or the breakpoint be hit

marchbold commented 9 months ago

Odd, haven't experienced that before. Is there a reproducible case you can demonstrate the issue with? Which IDE are you using?

ajwfrost commented 8 months ago

Hi @bobaoapae - also can you please confirm what version of the AIR runtime was used when you generated that original logcat error backtrace? We can see if it's clear from the code what may be happening here...

bobaoapae commented 8 months ago

50.2.3.7 or 50.2.3.8, don't know for sure, i will reproduce with latest version to check and get a more recent crash log.

bobaoapae commented 7 months ago
03-19 22:59:46.546 25546 25546 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 25546 (nk.lite.android), pid 25546 (nk.lite.android)
03-19 22:59:45.973 25546 25546 I br.com.redesurftank.lite.android: init Hole info.......
03-19 22:59:46.743 25732 25732 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
03-19 22:59:46.744  1394  1394 I /system/bin/tombstoned: received crash request for pid 25546
03-19 22:59:46.745 25732 25732 I crash_dump32: performing dump of process 25546 (target tid = 25546)
03-19 22:59:46.780 25732 25732 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-19 22:59:46.780 25732 25732 F DEBUG   : Build fingerprint: 'motorola/ali/ali:9/PPSS29.55-37-7-10/c25e:user/release-keys'
03-19 22:59:46.780 25732 25732 F DEBUG   : Revision: 'PVT2'
03-19 22:59:46.780 25732 25732 F DEBUG   : ABI: 'arm'
03-19 22:59:46.780 25732 25732 F DEBUG   : pid: 25546, tid: 25546, name: nk.lite.android  >>> br.com.redesurftank.lite.android <<<
03-19 22:59:46.780 25732 25732 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
03-19 22:59:46.780 25732 25732 F DEBUG   : Cause: null pointer dereference
03-19 22:59:46.781 25732 25732 F DEBUG   :     r0  86bb3ee8  r1  be89e810  r2  00000000  r3  00000000
03-19 22:59:46.781 25732 25732 F DEBUG   :     r4  be89d74c  r5  00000000  r6  00000001  r7  be89d6f8
03-19 22:59:46.781 25732 25732 F DEBUG   :     r8  00000000  r9  be89e810  r10 849502c0  r11 87b0fb0a
03-19 22:59:46.781 25732 25732 F DEBUG   :     ip  b8008000  sp  be89d6e0  lr  8c547f73  pc  8c547f3c
03-19 22:59:46.884 25732 25732 F DEBUG   :
03-19 22:59:46.884 25732 25732 F DEBUG   : backtrace:
03-19 22:59:46.884 25732 25732 F DEBUG   :     #00 pc 004aef3c  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.884 25732 25732 F DEBUG   :     #01 pc 004aef6f  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.884 25732 25732 F DEBUG   :     #02 pc 004acefd  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.884 25732 25732 F DEBUG   :     #03 pc 003f39cf  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.884 25732 25732 F DEBUG   :     #04 pc 0021b8c7  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #05 pc 0021a1a5  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #06 pc 0021c75f  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #07 pc 00325fb7  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #08 pc 003260b1  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #09 pc 0023a3c7  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #10 pc 003f48c1  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #11 pc 0021d9bf  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #12 pc 0021d86d  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #13 pc 003f47ff  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #14 pc 004c1be5  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #15 pc 004c345d  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #16 pc 00480a89  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #17 pc 00467ad3  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #18 pc 004ca0d3  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #19 pc 004e50e1  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.885 25732 25732 F DEBUG   :     #20 pc 004678fd  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.891 25732 25732 F DEBUG   :     #21 pc 004e425f  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.892 25732 25732 F DEBUG   :     #22 pc 004ec525  /data/app/br.com.redesurftank.lite.android-qp08mkEGmlLP5pLJZdeaXA==/split_config.armeabi_v7a.apk (offset 0x1000)
03-19 22:59:46.892 25732 25732 F DEBUG   :     #23 pc 000009e3  <anonymous:61476000>

logs from 50.2.4.4

ajwfrost commented 7 months ago

So, that looks like there's a debugger attached: when the error is thrown, it goes to send the information to the debugger, gets a 'halt at breakpoint' request (I assume it's configured to break into the debugger when errors are thrown) - and then whilst waiting to get the 'continue' signal from the debugger, it receives a request for stack frame information but this is then failing - I assume because we're half-way through raising an error.

We will have to look at what's actually meant to happen here, or whether we can reorder/cache things so that we can return the correct information. Potentially some garbage collection has happened between the error being raised, and the debugger asking for its details...

thanks

ajwfrost commented 7 months ago

How reproducible is this? The failure is pretty low-level, but we think we can protect against it, just not entirely sure of the side effects! If we upload a new runtime.apk for the armv7 Android build, would you be able to try to reproduce this again and see if the problem has been fixed?

thanks

bobaoapae commented 7 months ago

Yes I can test this very easy here, almost every time I'm testing a debug version on Android and a unexpected error happens the application just crash instead of stop on the error on intelij

ajwfrost commented 7 months ago

Great -> if you're able to try with one of the versions from the below link, I would be interested to see what happens! thanks https://transfer.harman.com/message/M3K5lKBiTqj4ubplOJTI5u

bobaoapae commented 7 months ago
03-20 13:50:20.678 21819 21819 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x11 in tid 21819 (nk.lite.android), pid 21819 (nk.lite.android)
03-20 13:50:20.815 22531 22531 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
03-20 13:50:20.816  1327  1327 I tombstoned: received crash request for pid 21819
03-20 13:50:20.816 22531 22531 I crash_dump64: performing dump of process 21819 (target tid = 21819)
03-20 13:50:20.885  1089  1089 D io_stats: !@   8,0 r 33241777 742716064 w 10505558 195439016 d 1496194 457791012 f 192702 715179 iot 15124504 0 th 0 0 0 pt 0 inp 0 0 201820.135
03-20 13:50:20.885  1089  1089 D io_stats: !@ Read_top(KB): kworker/u16:13(10109) 28 system_server(2860) 24 com.whatsapp(8782) 12
03-20 13:50:20.885  1089  1089 D io_stats: !@ Write_top(KB): kworker/u16:11(25277) 984 system_server(2860) 380 microsoft.todos(22227) 68
03-20 13:50:20.926 22531 22531 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-20 13:50:20.926 22531 22531 F DEBUG   : Build fingerprint: 'samsung/dm3qxxx/dm3q:14/UP1A.231005.007/S918BXXS3BXB2:user/release-keys'
03-20 13:50:20.926 22531 22531 F DEBUG   : Revision: '13'
03-20 13:50:20.926 22531 22531 F DEBUG   : ABI: 'arm64'
03-20 13:50:20.926 22531 22531 F DEBUG   : Processor: '6'
03-20 13:50:20.926 22531 22531 F DEBUG   : Timestamp: 2024-03-20 13:50:20.820825570-0300
03-20 13:50:20.926 22531 22531 F DEBUG   : Process uptime: 41s
03-20 13:50:20.926 22531 22531 F DEBUG   : Cmdline: br.com.redesurftank.lite.android
03-20 13:50:20.926 22531 22531 F DEBUG   : pid: 21819, tid: 21819, name: nk.lite.android  >>> br.com.redesurftank.lite.android <<<
03-20 13:50:20.926 22531 22531 F DEBUG   : uid: 10495
03-20 13:50:20.926 22531 22531 F DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
03-20 13:50:20.926 22531 22531 F DEBUG   : pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
03-20 13:50:20.926 22531 22531 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000011
03-20 13:50:20.926 22531 22531 F DEBUG   : Cause: null pointer dereference
03-20 13:50:20.926 22531 22531 F DEBUG   :     x0  00000071afcba000  x1  0000007fd8d8a548  x2  0000000000000011  x3  0000000000000000
03-20 13:50:20.926 22531 22531 F DEBUG   :     x4  0000000000000000  x5  b4000072bc4a783a  x6  0000000000000030  x7  006e696168636570
03-20 13:50:20.926 22531 22531 F DEBUG   :     x8  00000071b010ee18  x9  0000000000000088  x10 0000000000000000  x11 0000000000000036
03-20 13:50:20.926 22531 22531 F DEBUG   :     x12 0000000000000057  x13 0000000000000030  x14 0000000000000000  x15 0000000000000000
03-20 13:50:20.926 22531 22531 F DEBUG   :     x16 0000000000000006  x17 0000000000000030  x18 0000000000000050  x19 0000007fd8d88750
03-20 13:50:20.926 22531 22531 F DEBUG   :     x20 0000007fd8d8a700  x21 0000000000000011  x22 0000000000000011  x23 00000072c15df340
03-20 13:50:20.926 22531 22531 F DEBUG   :     x24 000000738755d000  x25 000000719fd39350  x26 000000738755d000  x27 0000000000000000
03-20 13:50:20.926 22531 22531 F DEBUG   :     x28 000000738755d000  x29 0000007fd8d88740
03-20 13:50:20.926 22531 22531 F DEBUG   :     lr  00000071b3534168  sp  0000007fd8d88720  pc  00000071b353a168  pst 0000000060001000
03-20 13:50:20.926 22531 22531 F DEBUG   : 22 total frames
03-20 13:50:20.926 22531 22531 F DEBUG   : backtrace:
03-20 13:50:20.926 22531 22531 F DEBUG   :       #00 pc 00000000007b9168  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #01 pc 00000000007b3164  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #02 pc 00000000006a89f4  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #03 pc 00000000006a9e44  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #04 pc 000000000040fe98  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #05 pc 000000000040de8c  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #06 pc 0000000000411320  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #07 pc 0000000000579cf4  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #08 pc 0000000000579e70  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #09 pc 0000000000438eb4  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #10 pc 00000000006ab118  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #11 pc 0000000000412e0c  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #12 pc 0000000000412cbc  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #13 pc 00000000006ab018  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #14 pc 00000000007d184c  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #15 pc 00000000007d3b44  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #16 pc 00000000007dc2a8  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #17 pc 0000000000800db0  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #18 pc 0000000000750d54  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #19 pc 00000000007ffcbc  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #20 pc 000000000080ac74  /data/app/~~v7JvXwx7jIXGFuJOJ7zuKQ==/br.com.redesurftank.lite.android-asxlJ9dDf5rgm8i-SZ7HLQ==/split_config.arm64_v8a.apk!libCore.so (offset 0x1000) (BuildId: 99e50accba2754e046da18e3864f0ff9bb793185)
03-20 13:50:20.926 22531 22531 F DEBUG   :       #21 pc 000000000000487c  <anonymous:72c1cbc000>
03-20 13:50:20.939  2860 22536 I DropBoxManagerService: add tag=data_app_native_crash isTagEnabled=true flags=0x2
03-20 13:50:20.939  2860 22539 W ActivityManager: crash : br.com.redesurftank.lite.android,10495
03-20 13:50:20.939  2860 22534 W ActivityTaskManager:   Force finishing activity br.com.redesurftank.lite.android/.AIRAppEntry
ajwfrost commented 7 months ago

Okay so that's the same crash location, but a different route in to the function, and we had added the protection in the locations that were calling it (but, only from within that same file, and there's this one other call in..)

So now adding protection directly in that function itself, as well as in the other calling location (belt and braces!) - there may still be repercussions or other issues related to this, because it's happening due to the debugger stack frame not being set up properly...

https://transfer.harman.com/message/8xJ4872hL4yz0cTmtY6Cpi

thanks

bobaoapae commented 7 months ago

Tested some cases here, appears to be fixed until now.

Unhandled error are being caught in intelij and application don't crash.

ajwfrost commented 7 months ago

Great, thanks for the feedback!