Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

App Crash: Access Violation

Discussion in 'VR' started by Draco18s, Apr 17, 2017.

  1. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    I am getting a crash trying to run a hololens app in the emulator.

    'OnlineMaps211.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\OnlineMaps211VS.Debug_x86.majjohnson\System.Diagnostics.Debug.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    Module information:
    Built with Compiler Ver '190023918'
    Built from '5.6/release' branch
    Version is '5.6.0f3 (497a0f351392)'
    Debug build
    Application type 'D3D11'
    Used 'UWP'

    OS 'Windows 10 (10.0.14393)'

    PlayerConnection initialized from C:/Data/Users/DefaultAccount/AppData/Local/DevelopmentFiles/OnlineMaps211VS.Debug_x86.majjohnson/Data (debug = 0)

    PlayerConnection initialized network socket : 0.0.0.0 55440

    Multi-casting "[IP] 172.16.80.2 [Port] 55440 [Flags] 2 [Guid] 1588586373 [EditorId] 82633437 [Version] 1048832 [Id] MetroPlayerX86(HoloLens-2FFV8) [Debug] 0" to [225.0.0.222:54997]...

    Started listening to [0.0.0.0:55440]

    Player data archive not found at `C:/Data/Users/DefaultAccount/AppData/Local/DevelopmentFiles/OnlineMaps211VS.Debug_x86.majjohnson/Data/data.unity3d`, using local filesystem
    GfxDevice: creating device client; threaded=1

    Direct3D:

    Version: Direct3D 11.0 [level 11.1]

    Renderer: Microsoft RemoteFX Graphics Device - WDDM (ID=0x2c1)

    Vendor: Microsoft

    VRAM: 639 MB

    Initialize engine version: 5.6.0f3 (497a0f351392)

    'OnlineMaps211.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\OnlineMaps211VS.Debug_x86.majjohnson\UnityEngineProxy.dll'. Cannot find or open the PDB file.
    'OnlineMaps211.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\OnlineMaps211VS.Debug_x86.majjohnson\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'OnlineMaps211.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\OnlineMaps211VS.Debug_x86.majjohnson\System.Reflection.Extensions.dll'. Module was built without symbols.
    Logical Screen DPI is 144.00.

    The following GlobalManagers were stripped from the build (Either because they're not used or not supported on this platform):
    NetworkManager
    MasterServerInterface
    UnityAdsManager
    ClusterInputManager
    UnityAnalyticsManager
    CrashReportManager
    PerformanceReportingManager

    If your machine has multiple graphics adapters, Unity may have created a WindowContext on the wrong adapter. If you experience a black screen when playing, please restart the Editor.

    (Filename: C:/buildslave/unity/build/Runtime/VR/VRDevice.cpp Line: 184)


    Screen position out of view frustum (screen pos 0.000000, 0.000000) (Camera rect 0 0 1268 720)

    (Filename: C:\buildslave\unity\build\Runtime/Camera/Camera.cpp Line: 2622)


    The program '[3848] OnlineMaps211.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.


    Application runs fine in the Unity editor.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    Switch debugger type to 'mixed' in project properties -> debug. That should give you the callstack for the crash, which would allow us to further diagnose what's going on.
     
  3. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    Uh...it hits a breakpoint, doesn't tell me where (error details: "OnlineMaps211.exe has triggered a breakpoint. occurred"), hitting continue and the application runs, albeit top-bottom reversed.

    https://s23.postimg.org/sa2lz6f5n/unity.png
    https://s23.postimg.org/xwyywnhob/holo.png

    Edit:
    Looks like the breakpoint is inside the Unity DLL. It says UnityPlayer_UAP_x86_debug_dotnet.pdb not loaded.
    U:\Users\DefaultAccount\AppData\Local\DevelopmentFiles\OnlineMaps211VS.Debug_x86.majjohnson\UnityPlayer.dll
     
    Last edited: Apr 17, 2017
  4. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    Any update on this?
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    You should be able to load the PDB. It should be inside unity installation directory: <UNITY_INSTALL_DIR>\Data\PlaybackEngines\metrosupport\Players\UAP\dotnet\x86\Debug\.
     
  6. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    I don't need the PDB file: I need the callstack with PDB loaded :).
     
  8. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
  9. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    Here's a crash dump extracted from the hololens device.

    My coworker also upgraded to Unity 5.6.0f3 from 5.5.1f1 and started experiencing the problem. This tells me that this is an issue with Unity 5.6 specifically. We are both downgrading back to 5.5.1 now.
     

    Attached Files:

  10. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Can you give a little information about your project and what you are doing when this crash occurs? It looks like it happens pretty quickly after the app is deployed.
     
  11. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    The crash occurs before it even reaches the "Made with Unity" splash screen. When the error is encountered if I hit "continue" then the hololense display shows the "Made with Unity" splash for a second before getting into the scene that we created (albeit mirrored top to bottom).

    As for the project itself, I honestly know very little. But basically it's a hololens app that displays a 3D map (using Online Maps) and allows the user to place markers on the map from a list (with some extra data attached, which draws stuff around the marker). Project runs fine with no issues in Unity 5.5.1--or did until my coworker updated to 5.6, and now I'm trying to downgrade to 5.5.1 myself, but am running into other issues. Like missing Csharp 4.0.1 libraries or missing assembly references to System.Xml when trying to build the project. I suspect my coworker is going to have the same problem tomorrow when *he* downgrades.

    But there's virtually no code that we ourselves have written beyond taking input from the hololens API and supplying it over to Online Maps.
     
    Last edited: Apr 26, 2017
  12. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Is there a way you could give me a min repro project or possibly a copy to explore the crash?
     
  13. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    I will find out. I have no idea how client-confidential this is. *I* haven't seen anything that I'd consider NDA or PII level restricted, but I'm also being super cautious due to the fact that I'm an outside contractor who's only been here for two and a half weeks.
     
  14. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    A zipped version of the project (minus all confidential information) has been uploaded here (a location supplied by the Microsoft representative I've been working with as well). Hopefully you can access the file as well.
     
  15. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    I don't see any files uploaded to that link
     
  16. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    Looks like there's a separate "view" privilege (I can't see the file either).
     
  17. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
  18. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    I can see the crash now when deploying to the hololens emulator with the project, could it be a issue with RS2? Looking closely at the exception this looks like an issue with one of 1 Microsoft dlls. It looks like Windows.Mirage.dll is crashing on some parameter on startup, do you have any information on the project that might be help narrow things down?
     
  19. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    As far as I know the code that has been written doesn't interact directly with Windows.Mirage at all. It might be a problem on the Microsoft side. I have not heard anything from them yet today, but hopefully he will have some insight there.
     
  20. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    Interesting development.

    In creating a fresh project and a fresh scene to play around in and learn how to interface with the Hololens better I discovered that merely importing Online Maps into assets causes the crash but not the mirrored rendering. Given that I have no idea what code Online Maps runs without having its main class attached to a game object, I cannot speculate as to why this results in the observed behavior.
     
  21. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Do you have the call stack?
     
  22. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    Code (CSharp):
    1. >    UnityPlayer.dll!Camera::ScreenPointToRay(class Vector2f const &)    Unknown
    2.     UnityPlayer.dll!Camera_CUSTOM_INTERNAL_CALL_ScreenPointToRay(void *,class Vector3f const &,class Ray &)    Unknown
    3.     UnityEngineDelegates.dll!_Camera_CUSTOM_INTERNAL_CALL_ScreenPointToRay@16()    Unknown
    4.     [External Code]
    5.     UnityEngineProxy.dll!UnityEngineProxy.InternalCalls.Camera_CUSTOM_INTERNAL_CALL_ScreenPointToRay(object self, System.IntPtr position, System.IntPtr paramValue) Line 40853    C#
    6.     [External Code]
    7.     [Frames below may be incorrect and/or missing, no symbols loaded for threadpoolwinrt.dll
    Doing some "pop out of method" advances,

    Code (CSharp):
    1. >    UnityPlayer.dll!metro_invoke_method(class ScriptingMethodPtr,class ScriptingObjectPtr,struct ScriptingArguments *,class ScriptingExceptionPtr *,bool)    Unknown
    2.      UnityPlayer.dll!scripting_method_invoke(class ScriptingMethodPtr,class ScriptingObjectPtr,struct ScriptingArguments &,class ScriptingExceptionPtr *,bool)    Unknown
    3.      UnityPlayer.dll!ScriptingInvocation::Invoke(class ScriptingExceptionPtr *,bool)    Unknown
    4.      UnityPlayer.dll!ScriptingInvocation::Invoke(void)    Unknown
    5.      UnityPlayer.dll!`InitPlayerLoopCallbacks'::`2'::PreUpdateSendMouseEventsstruct::Forward()    Unknown
    6.      UnityPlayer.dll!PlayerLoop(void)    Unknown
    7.      UnityPlayer.dll!metro::MainLoop(bool)    Unknown
    8.      UnityPlayer.dll!UnityPlayer::AppCallbacks::UnitySplashScreenLoop(void)    Unknown
    9.      UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThreadImplementation(void *)    Unknown
    10.      UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThread(void *)    Unknown
    11.      UnityPlayer.dll!<lambda>(void)()    Unknown
    12.      UnityPlayer.dll!Platform::Details::__abi_FunctorCapture<class <lambda_3e1924211b9579f8e542f5342662ee9c>,void,struct Windows::Foundation::IAsyncAction ^>::Invoke(struct Windows::Foundation::IAsyncAction ^)    Unknown
    13.      UnityPlayer.dll!Windows::System::Threading::WorkItemHandler::Invoke(struct Windows::Foundation::IAsyncAction ^)    Unknown
    14.      UnityPlayer.dll!Windows::System::Threading::WorkItemHandler::[Windows::System::Threading::WorkItemHandler::__abi_IDelegate]::__abi_Windows_System_Threading_WorkItemHandler___abi_IDelegate____abi_Invoke(struct Windows::Foundation::IAsyncAction ^)    Unknown
    15.      threadpoolwinrt.dll!68f34c6f()    Unknown
    16.      [Frames below may be incorrect and/or missing, no symbols loaded for threadpoolwinrt.dll]
    17.      [External Code]
    Attempting to "Step out" of that stack only gets about half-way before the program carries along its merry way (roughly where the lambda is).

    Edit: Even more interesting. Even removing Online Maps from the assets doesn't make the error go away.
     
    Last edited: May 2, 2017
  23. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Can you submit a bug on the crash and paste the link here so I can grab it?
     
  24. Draco18s

    Draco18s

    Joined:
    Aug 15, 2011
    Posts:
    114
    Looks like the Microsoft folks filed a bug for this, #910047.
    If that's sufficient then I don't have to try and figure out how to submit a crash bug through the Unity editor and including all of the necessary bits.
     
  25. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Cool, I will take a look at the bug.
     
  26. psimon1

    psimon1

    Joined:
    Jul 12, 2017
    Posts:
    2
    Hi Wesley, Is there an ETA or workaround for this issue. It prevents me from debugging my app. And I cannot rollback to 5.5.2.

    Would appreciate your help on this!

    Thank you,
    Simon
     
  27. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    It is being investigated by the team currently
     
    psimon1 likes this.
  28. psimon1

    psimon1

    Joined:
    Jul 12, 2017
    Posts:
    2
    Wesley - Is this filed as Bug 910047 or 915065? I cannot find 910047 in the https://issuetracker.unity3d.com/
     
  29. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    404