Search Unity

Unity 2017.4.31 UWP AccessViolation crash only when the target is x64 (x86 works fine)

Discussion in 'Windows' started by tomasvomacka, Sep 2, 2019.

  1. tomasvomacka

    tomasvomacka

    Joined:
    Nov 6, 2015
    Posts:
    4
    We are using Unity 2017.4.31 in our UWP application (XAML app with Unity 3D viewport and NET scripting backend). Everything works fine when compiled as x86. However, the same app compiled as x64 crashes with AccessViolationException in UnityPlayer.dll with the following stack trace:

    > UnityPlayer.dll!ScriptingTypeProvider_DotNet::SetupScriptingPinnedArrays(void) Unknown
    UnityPlayer.dll!MonoManager::MonoManager(struct MemLabelId,enum ObjectCreationMode) Unknown
    UnityPlayer.dll!BaseObjectInternal::NewObject<class MonoManager>(struct MemLabelId,enum ObjectCreationMode) Unknown
    UnityPlayer.dll!ProduceHelper<class MonoManager,0>::produce(struct MemLabelId,enum ObjectCreationMode) Unknown
    UnityPlayer.dll!Object::produce(class Unity::Type const *,class Unity::Type const *,int,struct MemLabelId,enum ObjectCreationMode) Unknown
    UnityPlayer.dll!PersistentManager::produceObjectInternal(class SerializedFile &,struct SerializedObjectIdentifier,int,enum ObjectCreationMode) Unknown
    UnityPlayer.dll!PersistentManager::CreateThreadActivationQueueEntry(class SerializedFile &,struct SerializedObjectIdentifier,int,bool) Unknown
    UnityPlayer.dll!PersistentManager::ReadAndActivateObjectThreaded(int,struct SerializedObjectIdentifier const &,class SerializedFile *,bool,bool) Unknown
    UnityPlayer.dll!PersistentManager::ReadObjectThreaded(int) Unknown
    UnityPlayer.dll!PersistentManager::ReadObject(int,enum AwakeFromLoadMode) Unknown
    UnityPlayer.dll!dynamic_instanceID_cast<class Object *>(int) Unknown
    UnityPlayer.dll!PlayerLoadGlobalManagers(char const *,char const *,unsigned int) Unknown
    UnityPlayer.dll!PlayerInitEngineGraphics(bool) Unknown
    UnityPlayer.dll!<lambda>(void)() Unknown
    UnityPlayer.dll!UnityPlayer::AppCallbacks::ExecuteQueuedCallbacks(void) Unknown
    UnityPlayer.dll!UnityPlayer::AppCallbacks::_AppThreadImplementation(void *) Unknown
    UnityPlayer.dll!<lambda>(void)() Unknown
    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

    Where should I look to fix this?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    That sounds like a corrupted type cache that we build when we build the project. It is generated by AssemblyConverter.exe which is a pre-build step in generated VS project. Is there any chance you took assemblies that were processed for 32-bit by AssemblyConverter.exe instead of invoking AssemblyConverter.exe like the generated Unity project does?
     
  3. tomasvomacka

    tomasvomacka

    Joined:
    Nov 6, 2015
    Posts:
    4
    Thank you for a reply, but it turned out that the Sharing prefab from Mixed Reality Toolkit caused the issue. Removing the sharing prefab fixed the crash.