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. Dismiss Notice

8.1 Universal build crashes while loading level in debug on VS

Discussion in 'Windows' started by jalapen0, Dec 11, 2014.

  1. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136
    Hello All,

    I have a game on the Apple App store and I am attempting to port to a Microsoft Store Universal app. I have VS2013 and I've tried update 2, 3, and 4. I'm running on Windows 8.1 with all patches applied in a VMware Player VM.

    I've built it in unity as a universal app using 4.6.1. It creates the build just fine.

    When I start debug mode on local machine, it starts fine, I am able to get to the main menu. If I then start a new game, it loads the game level, it just gets ready to fade in (I can even start to hear a sound or 2), and it'll crash with:

    "Unhandled exception at 0x607D7498 (msvcr120d_app.dll) in Template.exe: Fatal program exit requested"

    Looking at the full stack, I have no idea what to do. It looks like system and unityplayer stuff. Nothing from my code. So I am at a total loss here. Any ideas? Thanks. Here is the call stack:


    msvcr120d_app.dll!_exit() Unknown
    > UnityPlayer.dll!UnityPlayer::AppCallbacks::performUpdateAndRender() Line 1177 C++
    UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThreadImplementation(void * param=0x053adca0) Line 145 C++
    UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThread(void * param=0x053adca0) Line 159 C++
    UnityPlayer.dll!win32::CreateThread::__l22::<lambda>(Windows::Foundation::IAsyncAction ^ __formal=0x055461b0) Line 273 C++
    UnityPlayer.dll!Platform::Details::__abi_FunctorCapture<void <lambda>(Windows::Foundation::IAsyncAction ^),void,Windows::Foundation::IAsyncAction ^>::Invoke(Windows::Foundation::IAsyncAction ^ <__args_0>=0x055461b0) Line 875 C++
    UnityPlayer.dll!Windows::System::Threading::WorkItemHandler::Invoke(Windows::Foundation::IAsyncAction ^ __param0=0x055461b0) C++
    UnityPlayer.dll!Windows::System::Threading::WorkItemHandler::[Windows::System::Threading::WorkItemHandler::__abi_IDelegate]::__abi_Windows_System_Threading_WorkItemHandler___abi_IDelegate____abi_Invoke(Windows::Foundation::IAsyncAction ^ __param0=0x055461b0) C++
    threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::CommonWorkCallback(void) Unknown
    threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::TimeSlicedCallback(void *) Unknown
    kernel32.dll!@BaseThreadInitThunk@12() Unknown
    ntdll.dll!__RtlUserThreadStart() Unknown
    ntdll.dll!__RtlUserThreadStart@8() Unknown
     
    Last edited: Dec 11, 2014
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,491
    Hi,

    Code (csharp):
    1. Unhandled exception at 0x607D7498 (msvcr120d_app.dll) in Template.exe: Fatal program exit requested
    This error means that Application.Quit() was called from scripts. As far as Visual Studio is concerned, you requested your application to quit and that's exactly what it is telling you :).
     
    jalapen0 likes this.
  3. jalapen0

    jalapen0

    Joined:
    Feb 20, 2013
    Posts:
    136

    YYYYYYYYYEEEEEEEEEEEEEEEEESSSSSSSSSSSSSSSSSS! You are the MAAAAAN!

    You were absolutely correct! Here is the offending code:

    Code (CSharp):
    1.         if ((Application.genuineCheckAvailable == false) || (Application.genuine == false))
    2.         {
    3.             Application.Quit();
    4.         }
    It's working fine now! Thank you SO MUCH!!! Unity rocks.
     
  4. Caio_Lib

    Caio_Lib

    Joined:
    Mar 4, 2014
    Posts:
    83
    Hi,
    I was having the same "problem". For Windows Universal should I use different approach to exit the game instead of Application.Quit()?
    Throwing an exception seems I'm doing it the wrong way.

    Thank you!
     
  5. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,627
    The valid and correct thing to do would be present user with the screen, telling something.
    On Windows Store applications should not exit by themselves.
     
    Caio_Lib likes this.
  6. Caio_Lib

    Caio_Lib

    Joined:
    Mar 4, 2014
    Posts:
    83
    Thank you for your quick and clear answer Aurimas!!