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

[IL2CPP] My builds crash on any x64 / x86 build target

Discussion in 'Windows' started by patrykk, Sep 6, 2018.

  1. patrykk

    patrykk

    Joined:
    May 20, 2017
    Posts:
    13
    So, whenever I try to build my project with il2cpp as backend, I get crashes when trying to
    run the standalone. The resolution window shows up, then the exe crashes.
    I've tried all the build options I could think of, the final target I settled on is x64 / development build.

    The error doesn't tell me anything reasonable, really:
    Stack Trace of Crashed Thread 3340:
    0x00007FFB728B6E31 (GameAssembly) [k:\bin\2018.2.6\editor\data\il2cpp\libil2cpp\icalls\system\microsoft.win32\nativemethods.cpp:30] il2cpp::icalls::System::Microsoft::Win32::NativeMethods::GetProcessTimes
    0x00007FFB70B6EAC0 (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_system_0.cpp:22343] NativeMethods_GetProcessTimes_m1357047

    Could anybody help me track this down? The same project works when build with mono backend - so am I stuck with mono, forever?

    I'm attaching the entire crash log.
     

    Attached Files:

  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,526
    Looks like you are hitting an unimplemented path in il2cpp. Could we have a bug report?

    The function that is responsible for it is RandomStateGenerator constructor, it's calling into Process.UserProcessorTime. Here's the relevant callstack:

    Code (csharp):
    1. 0x00007FFB728B6E31 (GameAssembly) [k:\bin\2018.2.6\editor\data\il2cpp\libil2cpp\icalls\system\microsoft.win32\nativemethods.cpp:30] il2cpp::icalls::System::Microsoft::Win32::NativeMethods::GetProcessTimes
    2. 0x00007FFB70B6EAC0 (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_system_0.cpp:22343] NativeMethods_GetProcessTimes_m1357047
    3. 0x00007FFB70B6EC22 (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_system_0.cpp:22372] NativeMethods_GetProcessTimes_m3739936313
    4. 0x00007FFB710A3F4B (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_system_4.cpp:21017] Process_GetProcessTimes_m3993746901
    5. 0x00007FFB710A6001 (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_system_4.cpp:21151] Process_get_UserProcessorTime_m3231653866
    6. 0x00007FFB7169C168 (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_assembly-csharp-firstpass_1.cpp:29444] RandomStateGenerator__ctor_m2129494024
    7. 0x00007FFB7168ACAD (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_assembly-csharp-firstpass_1.cpp:17003] RandomBase_Seed_m1831886913
    8. 0x00007FFB6FF6DFB3 (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_assembly-csharp_13.cpp:140] InterfaceActionInvoker0::Invoke
    9. 0x00007FFB716835FB (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_assembly-csharp-firstpass_1.cpp:16834] MIRandom_CreateStandard_m4226023902
    10. 0x00007FFB71682F72 (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_assembly-csharp-firstpass_1.cpp:16809] MIRandom_CreateShared_m1657751803
    11. 0x00007FFB7168398B (GameAssembly) [k:\checkpointalpha\temp\stagingarea\data\il2cppoutput\bulk_assembly-csharp-firstpass_1.cpp:16707] MIRandom_InitializeStaticFields_m1105216541
    To work around this, remove Process.UserProcessorTime call.
     
  3. patrykk

    patrykk

    Joined:
    May 20, 2017
    Posts:
    13
    Ah, thank you for the specific response!
    That's coming from the Experilous MakeItRandom asset - I believe it's by now deprecated in the Asset Store,
    so I'll change it or look into a replacement.

    Thanks again.