Search code examples
androidgoogle-vision

Android app crashed without stack : how to debug?


I am testing Google Mobile Vision library on my Samsung Note 8, from time to time, My app crashes with a A/libc: Fatal signal 11, but there is no stack trace at all, even when running with android studio debugger. I got only :

...V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@ed7d6d6 nm : info.lapouyade.dcinventory ic=null
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/OpenGLRenderer: eglDestroySurface = 0x793081d8c0
                  endAllActiveAnimators on 0x79291bcc00 (RippleDrawable) with handle 0x791d701b60
D/ViewRootImpl@dc5d321[MainActivity]: Relayout returned: old=[0,0][1440,2960] new=[0,0][1440,2960] result=0x5 surface={valid=false 0} changed=true
D/ViewRootImpl@10d3d9f[BarcodeToFieldActivity]: MSG_RESIZED: frame=Rect(0, 0 - 1440, 2960) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
I/zygote64: Do partial code cache collection, code=117KB, data=84KB
            After code cache collection, code=117KB, data=84KB
            Increasing code cache capacity to 512KB
I/zygote64: Compiler allocated 8MB to compile void android.view.ViewRootImpl.performTraversals()
I/zygote64: Do full code cache collection, code=251KB, data=178KB
            After code cache collection, code=173KB, data=115KB
I/zygote64: Do partial code cache collection, code=250KB, data=164KB
            After code cache collection, code=250KB, data=164KB
            Increasing code cache capacity to 1024KB
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 1705 (Thread-4)
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'

There is no exception, so I cannot catch anything : How to get a stack in such a crash ?


Solution

  • Try to get the Whole stack trace by printing it to a logcat.txt file

    You can use the command from Android Studio terminal

    Please make sure before using this that you have already set the adb path to your System Variable to use it Globally.

    adb logcat -> logcat.txt  
    

    After a crash occurs you can check this logcat.txt file to get the Exact Error.

    last week, I am also facing the same Issue but this way I able to capture the whole scenario.
    Hope this may help you