Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Various mono crashes - mono_string_new_size, mono_array_new_specific, etc

Discussion in 'Android' started by Prodigga, Dec 1, 2015.

  1. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
    Hey guys

    We are seeing a lot of crashes, and the crash dumps call stack all point to similar methods. So far, we've got 18 crashes from our testers with 4 call stack elements recuring:

    mono_string_new_size
    mono_array_new_specific
    mono_gc_collect
    mono_object_clone

    These do not appear at the top of the call stack, but one of them is always visible in the call stack when the crash occurs and I can't really make sense of much else.. (Even with a development build)

    For example

    Code (CSharp):
    1. [Top of call stack]
    2. at libmono.002b2c0c(Native Method)
    3.     at libmono.GC_push_all_stack(GC_push_all_stack:72)
    4.     at libmono.002bb91c(Native Method)
    5.     at libmono.002bb9ec(Native Method)
    6.     at libmono.002b7760(Native Method)
    7.     at libmono.002b4754(Native Method)
    8.     at libmono.002b1048(Native Method)
    9.     at libmono.002ab11c(Native Method)
    10.     at libmono.002aac00(Native Method)
    11.     at libmono.002ab9c4(Native Method)
    12.     at libmono.002aba64(Native Method)
    13.     at libmono.mono_gc_collect(mono_gc_collect:40)
    14.     at libunity.002b473c(Native Method)
    15.     at libunity.00311a6c(Native Method)
    16.     at libunity.00310fbc(Native Method)
    17. [...etc]


    or +
    Code (CSharp):
    1. [Top of call stack]
    2. at libmono.002b2c0c(Native Method)
    3.     at libmono.GC_push_all_stack(GC_push_all_stack:72)
    4.     at libmono.002bb91c(Native Method)
    5.     at libmono.002bb9ec(Native Method)
    6.     at libmono.002b7760(Native Method)
    7.     at libmono.002b4754(Native Method)
    8.     at libmono.002b1048(Native Method)
    9.     at libmono.002ab11c(Native Method)
    10.     at libmono.002aac00(Native Method)
    11.     at libmono.002ac2ac(Native Method)
    12.     at libmono.002ac67c(Native Method)
    13.     at libmono.002aff9c(Native Method)
    14.     at libmono.002b0140(Native Method)
    15.     at libmono.002b0528(Native Method)
    16.     at libmono.001f5714(Native Method)
    17.     at libmono.mono_object_clone(mono_object_clone:56)
    18.     at libmono.0017ab24(Native Method)
    19.     at Unknown.00013014(Unknown Source)
    20.     at Object.MemberwiseClone(Native Method)
    21.     at Delegate.Clone(<0x0001c>:28)
    22.     at MulticastDelegate.CombineImpl(<0x001ab>:427)
    23. [...etc]
     
  2. bolang

    bolang

    Joined:
    Mar 26, 2015
    Posts:
    5
    I also meet this problem. I collect many crash reports about this from hundreds of android devices.
     
  3. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
    We just started using IL2CPP. Mono was completely unusable for us. IL2CPP works great but you have to make sure you do not use LoadAsync functionality because it causes crashes. (A fix is hopefully coming soon).
     
  4. wgt_jimmy

    wgt_jimmy

    Joined:
    Dec 22, 2014
    Posts:
    39
    I thought IL2CPP was still experimental on android. The mono crashes you're seeing appear to be possibly running out of memory. Have you tried to lower the memory usage of your scenes/code to check whether the crashes occur less frequently?
    BTW we have a rare crash (not locally reproducible) that occurs on what we suspect to be during LoadAsync using Unity 5.1.2p3 Mono on Android.
     
  5. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,121
    Well our game runs fine in IL2CPP (though there is a lot of crashes on devices with Mali gpus) so if memory was a problem it'd crash either way.