Search Unity

occasional "Access violation" when running HoloLens Emulator

Discussion in 'VR' started by blainebell, Jul 12, 2017.

  1. blainebell

    blainebell

    Joined:
    Jun 10, 2016
    Posts:
    28
    I am getting this error intermittenly:

    ~~~~~~~~~~~~~~~~~~~~~~~
    d3d11: Failed to create 2D texture in GfxDeviceD3D11

    (Filename: C:\buildslave\unity\build\Runtime/GfxDevice/d3d11/TexturesD3D11.cpp Line: 534)

    The program '[3636] HoloLeak3.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.
    ~~~~~~~~~~~~~~~~~~~~~~~

    Its odd that sometimes I get it, and sometimes I don't. It is unclear from the message what the problem is or how to remedy it. Does anyone have any ideas on how to debug the Emulator? It seems like the emulator is *extremely* sensitive to memory allocation/leaks (e.g., I don't think it supports a DLL that allocates heap memory statically, does anyone know for sure? Why isn't this in any documentation?)

    This access violation I believe is completely orthogonal to memory allocation, could it have something to do with the machine memory availability?

    Thanks in advance,

    Blaine
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    What version of unity are you using?
     
  3. blainebell

    blainebell

    Joined:
    Jun 10, 2016
    Posts:
    28
    I get the same behavior with both 5.6.2f1 and 2017.1
     
  4. unity_andrewc

    unity_andrewc

    Unity Technologies

    Joined:
    Dec 14, 2015
    Posts:
    222
    I took a look at where that error is getting emitted from, but I unfortunately don't have much experience with that code or anything surrounding it. The dev in this office I'd normally ask about this kind of thing is out until Monday, but I'll poke him about it when he gets back.
     
  5. blainebell

    blainebell

    Joined:
    Jun 10, 2016
    Posts:
    28
    I think this is a memory/resource problem. Sometimes if I have either a browser window open or Unity itself is open, I get these issues. Whether its Unity or the Emulator, I think there are some really poor error messages (i.e., non-existent) in these cases. Has anyone had similar issues?

    I am using a windows 10 computer with Build 16241 preprelease 170708, and with 16GB of memory and a i7-660U @2.6GHz Surface

    i also sometimes just need to reboot, something gets corrupt.
     
    Last edited: Jul 17, 2017
  6. blainebell

    blainebell

    Joined:
    Jun 10, 2016
    Posts:
    28
    I just got this error on the first run after a reboot on the emulator in Release mode. Next time I ran it, everything worked
     
  7. blainebell

    blainebell

    Joined:
    Jun 10, 2016
    Posts:
    28
    Is there any update on this issue? unity_andrewc were you able to find someone that knows anything about this error?

    Once I get this error, it is very difficult to remove it without rebooting, most of the time (except after a reboot). Maybe there are separate issues. I am also getting these issues quite a bit, which might or might not be related:

    ~~~~~~~~~~~~~~~~~~~~~~~
    Exception thrown at 0x76FA2502 in HoloLeak.exe: Microsoft C++ exception: _com_error at memory location 0x0C13D730.
    Exception thrown at 0x76FA2502 in HoloLeak.exe: Microsoft C++ exception: _com_error at memory location 0x0C13E3A4.
    analog\input\mirage\publicapi\holographicspace.cpp(936)\Windows.Mirage.dll!6E577686: (caller: 6E57603C) FailFast(1) tid(fac) 887A0005 The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
    ~~~~~~~~~~~~~~~~~~~~~~~

    With a popup exception window:
    "Unhandled exception at 0x6E3157A7 (Windows.Mirage.dll) in HoloLeak.exe: Fatal program exit requested."

    Any ideas? Is anyone else getting these issues?
     
  8. unity_andrewc

    unity_andrewc

    Unity Technologies

    Joined:
    Dec 14, 2015
    Posts:
    222
    Got work back from the graphics dev I poked. Long story short, there are a lot of reasons creating a texture can fail, and we'd need to investigate more thoroughly on our side - but a bug report with a repro project would help.

    Either way, is there a reason you aren't just using simulation in the Unity editor instead of the emulator?
     
  9. blainebell

    blainebell

    Joined:
    Jun 10, 2016
    Posts:
    28
    > Either way, is there a reason you aren't just using simulation in the Unity editor instead of the emulator?

    Yes. I have built a DLL that should work in all Unity environments. The 64bit Windows DLL works fine in the Unity Editor, but the only way I know of that I can test the UWP 32bit DLL is either on the Hololens or the emulator. Please correct me if I am wrong.

    Yes, I think there are some major leaks in either the simulator, Windows 10 prerelease, and/or Unity that are causing this. Its very strange and hard to isolate to submit a bug report, but I will try. I doubt the Unity editor is doing it.

    Thanks!

    Blaine