weixin_39852121
weixin_39852121
2020-12-27 09:54

crash in mapbox

got the following crash by just opening the map using the map_filtering_2 branch. device is my nexus4 with android8.1/lineage


2019-03-27 10:27:56.096 1587-1587/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18 in tid 1587 (.messenger.beta), pid 1587 (.messenger.beta)
2019-03-27 10:27:56.233 1912-1912/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2019-03-27 10:27:56.235 296-296/? I//system/bin/tombstoned: received crash request for pid 1587
2019-03-27 10:27:56.241 1912-1912/? I/crash_dump32: performing dump of process 1587 (target tid = 1587)
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: LineageOS Version: '15.1-20190207-NIGHTLY-mako'
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: Build fingerprint: 'google/occam/mako:5.1.1/LMY48T/2237560:user/release-keys'
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: Revision: '0'
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: ABI: 'arm'
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: pid: 1587, tid: 1587, name: .messenger.beta  >>> com.b44t.messenger.beta <<<
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG: Cause: null pointer dereference
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG:     r0 beee2af0  r1 00000004  r2 00000003  r3 00000000
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG:     r4 beee2ae8  r5 999d0478  r6 94be7380  r7 beee2b20
2019-03-27 10:27:56.245 1912-1912/? A/DEBUG:     r8 beee2b38  r9 999d0498  sl 00000000  fp b2605000
2019-03-27 10:27:56.246 1912-1912/? A/DEBUG:     ip b55dbd58  sp beee2ad8  lr 98213043  pc 98213042  cpsr 20070030
2019-03-27 10:27:56.307 1912-1912/? A/DEBUG: backtrace:
2019-03-27 10:27:56.307 1912-1912/? A/DEBUG:     #00 pc 00147042  /data/app/com.b44t.messenger.beta-bPNOSxJoRDwv4eWusGhFxw==/lib/arm/libmapbox-gl.so
2019-03-27 10:27:56.307 1912-1912/? A/DEBUG:     #01 pc 0014a045  /data/app/com.b44t.messenger.beta-bPNOSxJoRDwv4eWusGhFxw==/lib/arm/libmapbox-gl.so
2019-03-27 10:27:56.307 1912-1912/? A/DEBUG:     #02 pc 0040ca79  /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
2019-03-27 10:27:56.307 1912-1912/? A/DEBUG:     #03 pc 00408575  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #04 pc 0040d6e5  /system/lib/libart.so (art_quick_invoke_stub+228)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #05 pc 000b00eb  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+138)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #06 pc 002031e7  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+222)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #07 pc 001fe735  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+588)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #08 pc 003f359b  /system/lib/libart.so (MterpInvokeDirect+254)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #09 pc 003faa14  /system/lib/libart.so (ExecuteMterpImpl+14484)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #10 pc 001e55c9  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+340)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #11 pc 001e9d77  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+142)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #12 pc 001fe71d  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+564)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #13 pc 003f26fb  /system/lib/libart.so (MterpInvokeVirtual+482)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #14 pc 003fa914  /system/lib/libart.so (ExecuteMterpImpl+14228)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #15 pc 001e55c9  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+340)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #16 pc 001e9d77  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+142)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #17 pc 001fe71d  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+564)
2019-03-27 10:27:56.308 1912-1912/? A/DEBUG:     #18 pc 003f32dd  /system/lib/libart.so (MterpInvokeInterface+1080)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #19 pc 003fab14  /system/lib/libart.so (ExecuteMterpImpl+14740)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #20 pc 001e55c9  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+340)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #21 pc 001e9d77  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+142)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #22 pc 001fe71d  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+564)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #23 pc 003f26fb  /system/lib/libart.so (MterpInvokeVirtual+482)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #24 pc 003fa914  /system/lib/libart.so (ExecuteMterpImpl+14228)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #25 pc 001e55c9  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+340)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #26 pc 001e9d77  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+142)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #27 pc 001fe71d  /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+564)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #28 pc 003f26fb  /system/lib/libart.so (MterpInvokeVirtual+482)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #29 pc 003fa914  /system/lib/libart.so (ExecuteMterpImpl+14228)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #30 pc 001e55c9  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+340)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #31 pc 001e9cc5  /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*)+92)
2019-03-27 10:27:56.309 1912-1912/? A/DEBUG:     #32 pc 003e7ee7  /system/lib/libart.so (artQuickToInterpreterBridge+934)
2019-03-27 10:27:56.310 1912-1912/? A/DEBUG:     #33 pc 0040caf1  /system/lib/libart.so (art_quick_to_interpreter_bridge+32)
2019-03-27 10:27:56.310 1912-1912/? A/DEBUG:     #34 pc 000b10c1  /dev/ashmem/dalvik-jit-code-cache (deleted)
2019-03-27 10:28:02.076 296-296/? W//system/bin/tombstoned: crash socket received short read of length 0 (expected 12)
2019-03-27 10:28:02.079 418-440/system_process I/BootReceiver: Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
2019-03-27 10:28:02.150 418-436/system_process W/zygote: kill(-1587, 9) failed: No such process
2019-03-27 10:28:02.151 418-771/system_process I/ActivityManager: Process com.b44t.messenger.beta (pid 1587) has died: fore TOP 

该提问来源于开源项目:deltachat/deltachat-android

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39928818 weixin_39928818 4月前

    it's the other way around: I've replaced TextView with EmojiTextView explicitly in GenerateInfoWindowTask. The documentation doesn't contradict our approach as we don't manipulate the UI from a worker thread. This would only be the case if we add the UI components we create in the background to the viewtree, which we don't do. We only create the UI elements to generate Bitmaps. That's why it's save to do it the way we're doing it :)

    点赞 评论 复制链接分享
  • weixin_39852121 weixin_39852121 4月前

    play, i see. testing this and merging the pr now ...

    点赞 评论 复制链接分享
  • weixin_39852121 weixin_39852121 4月前

    crash again (see below).

    this crash is from the current master.

    and the map is very slow with the markers on it - while being very responsive without.

    iiuc, drawing of tracks and pins takes place in layers; this seems to slow down things. maybe we can do this onscreen? this would flicker a bit more, however, also the whole map is drawn onscreen and flickers a bit while drawing.

    
    2019-03-27 10:45:21.445 2757-2757/? I/crash_dump32: performing dump of process 2437 (target tid = 2437)
    2019-03-27 10:45:21.446 2757-2757/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2019-03-27 10:45:21.446 2757-2757/? A/DEBUG: LineageOS Version: '15.1-20190207-NIGHTLY-mako'
    2019-03-27 10:45:21.446 2757-2757/? A/DEBUG: Build fingerprint: 'google/occam/mako:5.1.1/LMY48T/2237560:user/release-keys'
    2019-03-27 10:45:21.446 2757-2757/? A/DEBUG: Revision: '0'
    2019-03-27 10:45:21.446 2757-2757/? A/DEBUG: ABI: 'arm'
    2019-03-27 10:45:21.446 2757-2757/? A/DEBUG: pid: 2437, tid: 2437, name: .messenger.beta  >>> com.b44t.messenger.beta <<<
    2019-03-27 10:45:21.446 2757-2757/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18
    2019-03-27 10:45:21.447 2757-2757/? A/DEBUG: Cause: null pointer dereference
    2019-03-27 10:45:21.447 2757-2757/? A/DEBUG:     r0 beee3200  r1 00000004  r2 00000003  r3 00000000
    2019-03-27 10:45:21.447 2757-2757/? A/DEBUG:     r4 beee31f8  r5 aad99658  r6 95789bc0  r7 beee3230
    2019-03-27 10:45:21.447 2757-2757/? A/DEBUG:     r8 beee3248  r9 aad99678  sl 00000000  fp b2605000
    2019-03-27 10:45:21.447 2757-2757/? A/DEBUG:     ip b55dbd58  sp beee31e8  lr 982cd043  pc 982cd042  cpsr 200d0030
    2019-03-27 10:45:21.454 2757-2757/? A/DEBUG: backtrace:
    2019-03-27 10:45:21.454 2757-2757/? A/DEBUG:     #00 pc 00147042  /data/app/com.b44t.messenger.beta-JndebCPKeRqJhlKkq7EwOA==/lib/arm/libmapbox-gl.so
    2019-03-27 10:45:21.454 2757-2757/? A/DEBUG:     #01 pc 0014a045  /data/app/com.b44t.messenger.beta-JndebCPKeRqJhlKkq7EwOA==/lib/arm/libmapbox-gl.so
    2019-03-27 10:45:21.454 2757-2757/? A/DEBUG:     #02 pc 0040ca79  /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
    2019-03-27 10:45:21.454 2757-2757/? A/DEBUG:     #03 pc 0015331b  /dev/ashmem/dalvik-jit-code-cache (deleted)
    2019-03-27 10:45:24.057 418-433/system_process E/LightsService: Light requested not available on this device. 2
    2019-03-27 10:45:25.321 418-509/system_process I/InputReader: Reconfiguring input devices.  changes=0x00000004
    
    点赞 评论 复制链接分享
  • weixin_39852121 weixin_39852121 4月前

    one problem might be that the stuff has to be executed in the ui-thread, eg. the used EmojiTextView crashes with a failed asset at https://github.com/deltachat/deltachat-android/blob/91be337fb68cb75712c64a3d01b94409329af675/src/org/thoughtcrime/securesms/components/emoji/parsing/EmojiPageBitmap.java#L39 :

    
    2019-03-27 11:35:45.859 3155-3191/com.b44t.messenger.beta E/AndroidRuntime: FATAL EXCEPTION: org.thoughtcrime.securesms.map.GenerateInfoWindowTask
        Process: com.b44t.messenger.beta, PID: 3155
        java.lang.RuntimeException: An error occurred while executing doInBackground()
            at android.os.AsyncTask$3.done(AsyncTask.java:353)
            at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
            at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
            at java.util.concurrent.FutureTask.run(FutureTask.java:271)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
            at java.lang.Thread.run(Thread.java:764)
         Caused by: java.lang.AssertionError: Main-thread assertion failed.
            at org.thoughtcrime.securesms.util.Util.assertMainThread(Util.java:263)
            at org.thoughtcrime.securesms.components.emoji.parsing.EmojiPageBitmap.get(EmojiPageBitmap.java:39)
            at org.thoughtcrime.securesms.components.emoji.EmojiProvider.getEmojiDrawable(EmojiProvider.java:116)
            at org.thoughtcrime.securesms.components.emoji.EmojiProvider.emojify(EmojiProvider.java:94)
            at org.thoughtcrime.securesms.components.emoji.EmojiTextView.setText(EmojiTextView.java:83)
            at android.widget.TextView.setText(TextView.java:5207)
            at org.thoughtcrime.securesms.map.GenerateInfoWindowTask.doInBackground(GenerateInfoWindowTask.java:111)
            at org.thoughtcrime.securesms.map.GenerateInfoWindowTask.doInBackground(GenerateInfoWindowTask.java:50)
            at android.os.AsyncTask$2.call(AsyncTask.java:333)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
            at java.lang.Thread.run(Thread.java:764) 
    
    点赞 评论 复制链接分享
  • weixin_39928818 weixin_39928818 4月前

    I've fixed the latter one. see PR https://github.com/deltachat/deltachat-android/pull/802/files#diff-58e0ac6ee8447903e5f796e75a7db8db

    点赞 评论 复制链接分享
  • weixin_39852121 weixin_39852121 4月前

    cool that you push this forward. i also think the most important thing is currently to get this all into a stable state. features can come later :)

    however, what i don't really get: the fix replaces EmojiTextView by TextView - but isn't TextView still accessed from within a non-UI-thread which is simply not allowed? (from developer.android.com: "the Android UI toolkit is not thread-safe. So, you must not manipulate your UI from a worker thread")

    点赞 评论 复制链接分享

相关推荐