Search Unity

Often exceptions on some devices of the UWP build of our game

Discussion in 'Windows' started by _creatio_, Jan 10, 2019.

  1. _creatio_

    _creatio_

    Joined:
    Mar 21, 2013
    Posts:
    43
    Hello.
    We're having often exceptions on some devices (around 10%).
    The game was built using: Unity 2017.4.16f1

    Frame   Image   Function   Offset
    0 GameAssembly.dll GC_win32_get_mem 0x0000000000000062
    1 GameAssembly.dll GC_expand_hp_inner 0x0000000000000041
    2 GameAssembly.dll GC_collect_or_expand 0x0000000000000106
    3 GameAssembly.dll GC_allocobj 0x0000000000000237
    4 GameAssembly.dll GC_generic_malloc_inner 0x00000000000001AC
    5 GameAssembly.dll GC_gcj_malloc 0x0000000000000076
    6 GameAssembly.dll il2cpp::vm::Object::New 0x0000000000000095
    7 GameAssembly.dll Scheduler_SchedulerThread_m10185948 0x0000000000000220
    8 GameAssembly.dll ThreadStart_Invoke_m1483406622 0x00000000000001F0
    9 GameAssembly.dll ThreadHelper_ThreadStart_Context_m3608880784 0x0000000000000092
    10 GameAssembly.dll XmlSerializationFixupCallback_Invoke_m2868721911 0x0000000000000204
    11 GameAssembly.dll ExecutionContext_RunInternal_m3256186641 0x00000000000001C8
    12 GameAssembly.dll ExecutionContext_Run_m1300924372 0x00000000000000A7
    13 GameAssembly.dll ThreadHelper_ThreadStart_m3843940947 0x00000000000000A8
    14 GameAssembly.dll ThreadStart_Invoke_m1483406622 0x00000000000001F0
    15 GameAssembly.dll RuntimeInvoker_Void_t1185182177 0x000000000000000C
    16 GameAssembly.dll il2cpp::vm::Runtime::Invoke 0x000000000000004F
    17 GameAssembly.dll il2cpp::vm::Runtime::DelegateInvoke 0x0000000000000022
    18 GameAssembly.dll il2cpp::icalls::mscorlib::System::Threading::ThreadStart 0x000000000000007A
    19 GameAssembly.dll il2cpp::os::Thread::RunWrapper 0x0000000000000060
    20 GameAssembly.dll il2cpp::os::ThreadStartWrapper 0x000000000000002E
    21 kernel32.dll BaseThreadInitThunk 0x0000000000000024
    22 ntdll.dll __RtlUserThreadStart 0x000000000000002F
    23 ntdll.dll _RtlUserThreadStart 0x000000000000001B


    The build config is:
    uwp_config.png

    The main problem is that it never happen in the development environment and doesn't seem to happen on other platforms where our game is published (like Steam, and mobiles).
    What can we do to find the cause and fix the issue?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    Is your game 32-bit? That sounds like an out of memory crash.
     
  3. _creatio_

    _creatio_

    Joined:
    Mar 21, 2013
    Posts:
    43
    Thank you for fast response!

    Yes, it is, but the game is not RAM-hungry. So it should never ever reach the limit (otherwize, I suspect that we woould have much more than 10% of problematic game sessions). On my PC it's peak RAM load is around 260MBs. So out of memory is hard to imagine, especially on PCs with Core i5 and i7 CPUs (which are in the list of devices that has the problem).
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    That callstack points to XML serialization. How big are the files you're operating on? Could it be that these files grow more than you have anticipated? Generally, these issues show up randomly when there's a spike in memory usage that gets freed soon after, rather than constant high usage. You could try using Windows Performance Analyzer to see if you have any large spikes in memory usage (here's a guide on how to use it: https://files.unity3d.com/zilys/ETWPerfGuide/data/VirtualAllocCommitProvider.html).

    Do you have access to the specs of the machines these crashes show up? Are they by any chance running 32-bit OS or have low amounts of RAM?
     
  5. _creatio_

    _creatio_

    Joined:
    Mar 21, 2013
    Posts:
    43
    1. Actually we don't use XML in our game assets. At least not directly.
    2. Thank you for the link, I'll check it out.
    3. I have only CPU's they are using:
    Device configuration Count
    Intel Core i3 50
    Intel Core i5 32
    Intel Pentium 10
    Intel Core i7 8

    All of them are running Windows 10, but I was not able to find out if it is 32bit or 64bit.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,678
    If you're not using XML, it might be worth placing a breakpoint on a function in that callstack and seeing how the code gets there. That might let you identify the problematic area of your code.