Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

[Solved]Access violation when deploying on Xbox One using UWP

Discussion in 'Windows' started by tssr, Aug 7, 2016.

  1. tssr

    tssr

    Joined:
    Jun 7, 2016
    Posts:
    3
    Hi

    I have just developed my first Unity3d Game and want to run it on an Xbox One S via UWP. I have followed an excellent guide here on the forum and I can get a sample application (empty project with a cube) to run, but every time I try to deploy my own game, it crashes with the following error:

    0xC0000005 occurred

    Message: Exception thrown at 0x00007FFFDFD875A9 (unityplayer.dll) in Game.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

    I don’t know if it makes sense to anybody, but here is the code that crashes:


    FMOD_strcpy:

    00007FFFDFD87570 mov qword ptr [rsp+10h],rdx

    00007FFFDFD87575 mov qword ptr [rsp+8],rcx

    00007FFFDFD8757A push rdi

    00007FFFDFD8757B sub rsp,10h

    00007FFFDFD8757F mov rdi,rsp

    00007FFFDFD87582 mov ecx,4

    00007FFFDFD87587 mov eax,0CCCCCCCCh

    00007FFFDFD8758C rep stos dword ptr [rdi]

    00007FFFDFD8758E mov rcx,qword ptr [rsp+20h]

    00007FFFDFD87593 mov rax,qword ptr [rsp+20h]

    00007FFFDFD87598 mov qword ptr [rsp],rax

    00007FFFDFD8759C mov rax,qword ptr [rsp+20h]

    00007FFFDFD875A1 mov rcx,qword ptr [rsp+28h]

    00007FFFDFD875A6 movzx ecx,byte ptr [rcx]

    00007FFFDFD875A9 mov byte ptr [rax],cl


    How do I debug this? I tried to look for logfiles on the xbox, but I can’t really find anything. The game runs perfectly when I run it as app on my local Windows 10 PC.

    Any advice would be greatly appreciated.

    Thanks

    Thomas
     
  2. tssr

    tssr

    Joined:
    Jun 7, 2016
    Posts:
    3
    Crash location:
    [global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
    [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
    public AppCallbacks()
    {
    global::System.IntPtr retval;
    retval = global::System.Runtime.InteropServices.McgModuleManager.ActivateInstance("UnityPlayer.AppCallbacks");
    global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
    this.__AttachAndRelease(retval);
    }
     
  3. tssr

    tssr

    Joined:
    Jun 7, 2016
    Posts:
    3
    OK, just discovered that this error is only shown when running "Debug" target in visual studio. Release works.
     
    unitysaber1 likes this.