Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Crash Exception libmono java lang

Discussion in 'Android' started by EvolveGames, Jun 17, 2015.

  1. EvolveGames

    EvolveGames

    Joined:
    Apr 13, 2015
    Posts:
    1
    I have some crashes, but i dont know where they come from, if someone can help me please, Thanks.

    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 5.0.1f1
    Device model : bq Aquaris E4.5
    Device fingerprint: bq/Aquaris_E45/Aquaris_E45:4.4.2/KOT49H/1424776485:user/release-keys

    Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 6957a9d8
    Build fingerprint: 'bq/Aquaris_E45/Aquaris_E45:4.4.2/KOT49H/1424776485:user/release-keys'
    Revision: '0'
    pid: 15105, tid: 15128, name: main >>> com.EvolveGames.RescueLander <<<
    r0 6957a9d8 r1 6957b000 r2 fffffe5c r3 6957b000
    r4 6957a9d8 r5 00000001 r6 6957affc r7 6bb5f4cc
    r8 62a04ffc r9 622baf60 sl 608390e0 fp 623b8904
    ip 61199ed4 sp 623b88d8 lr 610b521c pc 610b518c cpsr 2f483934

    at libmono.002c918c(Native Method)
    at libmono.GC_push_all_stack(GC_push_all_stack:72)
    at libmono.002d4818(Native Method)
    at libmono.002d48e8(Native Method)
    at libmono.002ce970(Native Method)
    at libmono.002caf8c(Native Method)
    at libmono.002c7564(Native Method)
    at libmono.002bd4f4(Native Method)
    at libmono.002bcf38(Native Method)
    at libmono.002bdd9c(Native Method)
    at libmono.002bde3c(Native Method)
    at libmono.mono_gc_collect(mono_gc_collect:40)
    at libmono.mono_domain_finalize(mono_domain_finalize:96)
    at libmono.00026ad0(Native Method)
    at libmono.mono_jit_cleanup(mono_jit_cleanup:20)
    at libunity.002f064c(Native Method)
    at libunity.003461dc(Native Method)
    at libunity.004b9cc4(Native Method)
    at libunity.004bd960(Native Method)
    at libdvm.dvmPlatformInvoke(dvmPlatformInvoke:112)
    at libdvm.dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)(dvmCallJNIMethod:484)
    at libdvm.00027ce8(Native Method)
    at libdvm.dvmMterpStd(Thread*)(dvmMterpStd:76)
    at libdvm.dvmInterpret(Thread*, Method const*, JValue*)(dvmInterpret:188)
    at libdvm.dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)(dvmCallMethodV:340)
    at libdvm.dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)(dvmCallMethod:20)
    at libdvm.000577e5(Native Method)
    at libc.__thread_entry(__thread_entry:72)
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Are you calling any native Java code from your game ?

    I suggest you to use a crash reporting library (such as Splunk Mint, Crashlytics, Parse or Unity's built-in solution).

    Get one that can handle native crashes (e.g: not from your C# game code), or integrate the code needed to report these errors from native code yourself.

    This should give you a clear idea (+ stack trace) of what went wrong.
     
  3. Marzoa

    Marzoa

    Joined:
    Dec 2, 2012
    Posts:
    50
    I am experiencing a similar problem right now. Did you find a solution by any chance? TIA.
     
  4. wgt_jimmy

    wgt_jimmy

    Joined:
    Dec 22, 2014
    Posts:
    39
    What does your callstack look like and what version of Unity are you using? Do you have a reproducible case? Can you make a small project that will reproduce this?
     
  5. Marzoa

    Marzoa

    Joined:
    Dec 2, 2012
    Posts:
    50
    Here is the stack trace:

    0 java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 9df599d0
    1 Build fingerprint: 'htc/a32eul_aio_wireless_us/htc_a32eul:5.1/LMY47O/648333.6:user/release-keys'
    2 Revision: '0'
    3 pid: 30399, tid: 30421, name: main >>> com.whatever.thehell <<<
    4 r0 9df599d0 r1 9df5a000 r2 fffffe5c r3 9df5a000
    5 r4 9df599d0 r5 00000001 r6 9df59ffc r7 a2968f74
    6 r8 9989a08c r9 b7ddb038 sl 00000000 fp a0c88cac
    7 ip a1d38ed4 sp a0c88c80 lr a1c545f4 pc a1c54564 cpsr 2e353a6c
    8
    9 at libmono.002c9564(Native Method)
    10 at libmono.GC_push_all_stack(GC_push_all_stack:72)
    11 at libmono.002d4c0c(Native Method)
    12 at libmono.002d4cdc(Native Method)
    13 at libmono.002ced58(Native Method)
    14 at libmono.002cb368(Native Method)
    15 at libmono.002c793c(Native Method)
    16 at libmono.002bd8b4(Native Method)
    17 at libmono.002bd2f8(Native Method)
    18 at libmono.002be15c(Native Method)
    19 at libmono.002be1fc(Native Method)
    20 at libmono.mono_gc_collect(mono_gc_collect:40)
    21 at libmono.mono_domain_finalize(mono_domain_finalize:96)
    22 at libmono.00026ad8(Native Method)
    23 at libmono.mono_jit_cleanup(mono_jit_cleanup:20)
    24 at libunity.00208ed4(Native Method)
    25 at libunity.0029f9e8(Native Method)
    26 at libunity.003d3e3c(Native Method)
    27 at libunity.003df0c0(Native Method)
    28 at data@app@com.0000060f(Native Method)

    I have been unable to reproduce it on my own devices so far, I just received that report from some users through Crittercism.
     
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Assuming the stack is correct, it looks like that happens during a domain finalize that calls the GC. do you have any idea when this issue happens at all? could it be that Unity is "crashing" when the game quits or being closed?
     
  7. Marzoa

    Marzoa

    Joined:
    Dec 2, 2012
    Posts:
    50
    That's an interesting guess. I think it could really be happening during the app being closed, though I would have to include some "breadcrumb" code to be sure. Let's assume that's the case anyway, where should I continue trying to fix it?

    Many thanks!
     
    Last edited: Jan 24, 2016
  8. tcossairt

    tcossairt

    Joined:
    Dec 5, 2013
    Posts:
    129
    Any luck on this? I have had my QA report several crashes with the last thing GC_push_all_stack
     
  9. bolang

    bolang

    Joined:
    Mar 26, 2015
    Posts:
    5
    I also meet this problem, and I collect thousands of crash resport about this.
     
  10. OutOfMyMindDave

    OutOfMyMindDave

    Joined:
    Jun 2, 2015
    Posts:
    5
    I'm getting the same error as Marzoa, when I call Application.Quit(). I'll try out a crash reporting tool as suggested above. I just wanted to report this so that you know when it happens.

    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 5.3.1p3
    Device model : LGE Nexus 4
    Device fingerprint: google/occam/mako:5.1.1/LMY48T/2237560:user/release-keys

    Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 9d2606d0
    Build fingerprint: 'google/occam/mako:5.1.1/LMY48T/2237560:user/release-keys'
    Revision: '11'
    pid: 15788, tid: 15819, name: UnityMain >>> com.OutOfMyMindGames.VRMeteors <<<
    r0 9d2606d0 r1 9d261000 r2 fffffe8c r3 9d261000
    r4 9d2606d0 r5 00000001 r6 9d260ffc r7 b3db7000
    r8 976a35e0 r9 00000000 sl 00000000 fp af7de8dc
    ip afb70ed8 sp af7de8b0 lr afa91d74 pc afa91ce4 cpsr 753a3036

    at libmono.002b2ce4(Native Method)
    at libmono.GC_push_all_stack(GC_push_all_stack:72)
    at libmono.002bb9f4(Native Method)
    at libmono.002bbac4(Native Method)
    at libmono.002b7838(Native Method)
    at libmono.002b482c(Native Method)
    at libmono.002b1120(Native Method)
    at libmono.002ab1f4(Native Method)
    at libmono.002aacd8(Native Method)
    at libmono.002aba9c(Native Method)
    at libmono.002abb3c(Native Method)
    at libmono.mono_gc_collect(mono_gc_collect:40)
    at libmono.mono_domain_finalize(mono_domain_finalize:96)
    at libmono.00024c08(Native Method)
    at libmono.mono_jit_cleanup(mono_jit_cleanup:20)
    at libunity.00349768(Native Method)
    at libunity.00384fb0(Native Method)
    at libunity.004ce76c(Native Method)
    at libunity.004d2994(Native Method)
    at data@app@com.0000c83f(Native Method)
     
  11. exerion

    exerion

    Joined:
    Jun 29, 2011
    Posts:
    54
    We're also getting THOUSANDS of this crash report. Anyone found a solution yet? If you're also experiencing this crash please make a post so that we can try sort this out.

    We're at Unity 5.3.4p1 and it's still occurring.

    Doesn't seem to happening on any specific Android version or device.


    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version : 5.3.4p1
    Device model : samsung SM-N900
    Device fingerprint: samsung/ha3gxx/ha3g:5.0/LRX21V/N900XXUEBOL2:user/release-keys

    Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 8e3fb9b0
    Build fingerprint: 'samsung/ha3gxx/ha3g:5.0/LRX21V/N900XXUEBOL2:user/release-keys'
    Revision: '11'
    pid: 32455, tid: 32479, name: main >>> leagueofmonkeys.torqueburnout <<<
    r0 8e3fb9b0 r1 8e3fc000 r2 fffffe8c r3 8e3fc000
    r4 8e3fb9b0 r5 00000001 r6 8e3fbffc r7 b388f000
    r8 7d6001e0 r9 00000000 sl 00000000 fp afbff8a4
    ip a03d0ed8 sp afbff878 lr a02f1e1c pc a02f1d8c cpsr 42455558

    at libmono.002b2d8c(Native Method)
    at libmono.GC_push_all_stack(GC_push_all_stack:72)
    at libmono.002bbaa4(Native Method)
    at libmono.002bbb74(Native Method)
    at libmono.002b78e0(Native Method)
    at libmono.002b48d4(Native Method)
    at libmono.002b11c8(Native Method)
    at libmono.002ab29c(Native Method)
    at libmono.002aad80(Native Method)
    at libmono.002abb44(Native Method)
    at libmono.002abbe4(Native Method)
    at libmono.mono_gc_collect(mono_gc_collect:40)
    at libmono.mono_domain_finalize(mono_domain_finalize:96)
    at libmono.00024c08(Native Method)
    at libmono.mono_jit_cleanup(mono_jit_cleanup:20)
    at libunity.0034b558(Native Method)
    at libunity.003872c0(Native Method)
    at libunity.004d42f0(Native Method)
    at libunity.004d83cc(Native Method)
    at data@app@leagueofmonkeys.004ec42b(Native Method)

     
  12. AndreasScholl

    AndreasScholl

    Joined:
    Oct 16, 2015
    Posts:
    12
    I am currently tracking a memory exception that looks like those in this thread.

    What i found so far is that the exception occurs at a memory address that was previously occupied by the stack of a thread the was terminated before.

    For example:
    Thread stack starting at address: 6a7ed000
    Exception in Garbage collector occurs at: 6a7edff0

    As the thread gets created by a native c-library, i assume that the thread stack is in unmanaged memory. I wonder how the garbage collector stumbles into this memory regions?

    What is this GC_push_all_stack function doing exactly?
     
  13. mmitang

    mmitang

    Joined:
    May 27, 2013
    Posts:
    11
    I also have this problem.
    The crash happens after i use native c++ code to record voice,and after i turn off the record.It crashed.
    my traceback:


    E/AuidoRecordHelper( 2916): stopRecord

    W/AuidoRecordHelper( 2916): loop end

    E/Parcel ( 290): Reading a NULL string not supported here.

    E/Parcel ( 290): Reading a NULL string not supported here.

    D/dalvikvm( 1769): GC_EXPLICIT freed 531K, 43% free 10770K/18584K, paused 2ms+2ms, total 38ms, dvmtargetUtilize:0.750000

    F/libc ( 2916): Fatal signal 11 (SIGSEGV) at 0x7f73d6c0 (code=1), thread 2952 (UnityMain)

    I/DEBUG (16141): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

    I/DEBUG (16141): Build fingerprint: 'smartisan/msm8974sfo/msm8974sfo:4.4.2/SANFRANCISCO:user/dev-keys'

    I/DEBUG (16141): Revision: '0'

    I/DEBUG (16141): pid: 2916, tid: 2952, name: UnityMain >>> com.gt.poputar <<<

    I/DEBUG (16141): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 7f73d6c0

    I/DEBUG (16141): backtrace:



    I/DEBUG (16141): #01 pc 002b2e00 (GC_push_all_stack+72)

    I/DEBUG (16141): #15 pc 001f6ad0 (mono_string_new_size+164)

    I/DEBUG (16141): #16 pc 001f69a8 (mono_string_new_utf16+32)

    I/DEBUG (16141): #17 pc 001f6bc4 (mono_string_new_len+104)

    I/DEBUG (16141): #18 pc 00363520 (MonoStringNewLength(char const*, int)+24)

    I/DEBUG (16141): #19 pc 008757a0 (Renderer_Get_Custom_PropSortingLayerName(ReadOnlyScriptingObjectOfType<Renderer>)+160)
     
  14. mmitang

    mmitang

    Joined:
    May 27, 2013
    Posts:
    11
    i fount that use il2cpp can avoid the crash!!
     
  15. exerion

    exerion

    Joined:
    Jun 29, 2011
    Posts:
    54
    Unfortunately we can't use IL2CPP because some of the plugins we use are incompatible.
     
  16. Bibibis

    Bibibis

    Joined:
    Jul 28, 2015
    Posts:
    11
    This happens to our users as well. I disabled exiting the application with the back button for now as a temporary fix but could we get a few words about what actually causes this bug?

    In my case the bug seemingly appeared out of nowhere between two versions of my game, the actual code to exit the game with Application.Quit() is absolutely untouched between the two versions however.
     
  17. MuraliVenkat

    MuraliVenkat

    Joined:
    Jan 8, 2015
    Posts:
    14
    Hello everyone, I am getting the following crash in only some specific devices,

    1. java.lang.Error: FATAL EXCEPTION [UnityMain]
    2. Unity version :5.4.0f3
    3. Device model : samsung GT-P5210
    4. Device fingerprint: xxxxxxxxx
    5. Causedby: java.lang.Error: signal 11(SIGSEGV), code 1(SEGV_MAPERR), fault addr fffbbedc
    6. Build fingerprint: xxxxxxxxx
    7. Revision:'0'
    8. pid:20890, tid:20905, name:UnityMain>>> com.company.productname <<<
    9. r0 00000000 r1 ff000000 r2 82b597a3 r3 14abd638
    10. r4 64c7f6b1 r5 000000e6 r6 741c8fe0 r7 7c35e4e7
    11. r8 00000095 r9 00000000 sl 00000000 fp 00000000
    12. ip 00000000 sp 67479458 lr 00000000 pc 16305a19 cpsr 2e342e34
    13. at libunity.00305a19(NativeMethod)
    14. at Unknown.000fd750(UnknownSource)`

    I am not able to reproduce this crash in my devices. It is occurring only in android version 4.4. I have googled it and the people saying its a unity bug but unity developers said they have fixed this issue. But i am keep on getting this crash in same devices. I am using Unity 5.4.0 f3. i dont know what to do. :( Can anyone please help me in this. Thanks.
     
  18. shongbee2

    shongbee2

    Joined:
    Nov 29, 2016
    Posts:
    10
    Hello erveryone, I am experiencing a similar problem, it is occurring randomly.
     
  19. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    You can convert these memory addresses into function names. Then you can search online whether a similar Unity bug was reported for the issue.

    Here's how to do this:

    After installing the NDK, you get a few different tools (depending on the target architecture).

    Most Android phones run on ARM phones, so you have to use the one suitable for ARM, for example:

    D:\Android\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin>arm-linux-androideabi-addr2line.exe -C -f -e D:\Unity_55p2\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\Release\Symbols\armeabi-v7a\libunity.sym.so

    Here you can see an example of how i invoked the tool from the command line.

    Note that i pass -C -f -e <path to unity sym.so file>

    after you run the tool, you can start inputing memory addresses and it will output the function name instead.

    Let me know if this is clear enough and you were able to do it yourself.
     
  20. shongbee2

    shongbee2

    Joined:
    Nov 29, 2016
    Posts:
    10
    thanks, i use the toolchain tool , convert these memory addresses into function names.
    here is the stack:
     
  21. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Sorry, actually the crash is from libmono.so. The symbols are only for Unity's libraries, so actually the stack you got is meaningless...
     
  22. shongbee2

    shongbee2

    Joined:
    Nov 29, 2016
    Posts:
    10
    bad news, I think I have to use il2cpp