Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnityPlayer.dll throws Platform::COMException ^

Discussion in 'Windows' started by Qbit86, Dec 17, 2013.

  1. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Hello!

    Sorry for bothering with same question again, but I really need urgent help from community in porting the game (one near the top 10) to Windows Phone. Completely stuck, and have no clues :-`

    UnityPlayer.dll crashes without any hints why, not even stepping into my scripts. The last line in Output window is:

    Code (csharp):
    1. First-chance exception at 0x77271ECF in TaskHost.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x06A9FC24. HRESULT:0x80131040
    The UnityPlayer.log contains nothing special or unexpected:

    Code (csharp):
    1. Build from '' branch, version is '4.3.1f1 (cebd4d9b5122)' (Release build).
    2. Physical memory: 395 MB, commited memory limit: 180 MB.
    3. PlayerConnection initialized from C:/Data/Programs/{88BE10A2-D68E-CB45-BB67-E691A9969C9A}/Install/Data (debug = 0)
    4. PlayerConnection initialized network socket : 0.0.0.0 55260
    5. GetLocalIP: Error during connect, 10065 Multi-casting "[IP] 127.0.0.1 [Port] 55260 [Flags] 2 [Guid] 1482656952 [EditorId] 3152935875 [Version] 1048832 [Id] WP8Player(0.0.0.0) [Debug] 0" to [225.0.0.222:54997]...
    6. Direct3D:
    7.     Version:  Direct3D 11.0 [level 9.3]
    8.     Renderer: Qualcomm Adreno 305 (WDDM v1.2) (ID=0x30303330)
    9.     Vendor:   Qualcomm
    10.     VRAM:     96 MB
    11. Initialize engine version: 4.3.1f1 (cebd4d9b5122)
    12. Default GameObject Tag: GUIHelper already registered
    13.  
    14. (Filename: C:/BuildAgent/work/d3d49558e4d408f4/Runtime/BaseClasses/Tags.cpp Line: 68)
    Call Stack is:

    Code (csharp):
    1. KERNELBASE.DLL!RaiseException()    Unknown
    2. Msvcr110.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 152 C++
    3. Vccorlib110.dll!__abi_WinRTraiseCOMException(long hr) Line 502  C++
    4. UnityPlayer.dll!ScriptingTypeProvider_Metro::NativeTypeFor(const char * namespaze, const char * name) Line 29   C++
    5. UnityPlayer.dll!ScriptingTypeRegistry::GetType(const char * namespaze, const char * name) Line 19   C++
    6. UnityPlayer.dll!MonoScript::RebuildFromAwake() Line 149 C++
    7. UnityPlayer.dll!PersistentManager::LoadFileCompletelyThreaded(const std::basic_string<char,std::char_traits<char>,stl_allocator<char,51,4> >  pathname, int * fileIDs, int * instanceIDs, int size, bool loadScene, LoadProgress * loadProgress) Line 1452 C++
    8. UnityPlayer.dll!PreloadLevelOperation::Perform() Line 652   C++
    9. UnityPlayer.dll!PreloadManager::Run() Line 235  C++
    10. UnityPlayer.dll!PreloadManager::Run(void * managerPtr) Line 187 C++
    11. UnityPlayer.dll!Thread::RunThreadWrapper(void * ptr) Line 44    C++
    12. UnityPlayer.dll!<lambda_14163fd8e7b3473ba35abd0bcfa8d126>::operator()(Windows::Foundation::IAsyncAction ^ __formal) Line 273    C++
    13. 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) C++
    14. THREADPOOLWINRT.DLL!Windows::System::Threading::CThreadPoolWorkItem::CommonWorkCallback(void)   Unknown
    15. THREADPOOLWINRT.DLL!Windows::System::Threading::CThreadPoolWorkItem::TimeSlicedCallback(void *) Unknown
    16. NTDLL.DLL!RtlUserThreadStart() Unknown
    Environment:
    • Windows Pro 8.1 64-bit
    • Unity Pro 4.3.1f1
    • Microsoft Visual Studio Express 2012 for Windows Phone (provided with Windows Phone SDK 8.0)
    • Nokia Lumia 520

    Any ideas would be very much appreciated!
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    This usually is caused by either using an incompatible managed plugin, or having a version mismatch in a plugin itself - as in if you use a different plugin for Windows Phone that is called the same, the version Must match. Do you think any of these apply to you?
     
  3. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Thank you very much for reply!

    Yes, it does apply; it turned out to be mismatch between versions of Photon3Unity3D.dll and WP8/Photon3Unity3D.dll.

    So I've got a feature request—could you make this issue less silent and more explicit? Ideally it would be good to have compile time failure instead of runtime crash. However in general, as far as I understand, assembly resolution/loading/binding is runtime issue. In this case it would be good at least to have high level managed exception, which can be observed by developer and helps him to find out what is going wrong.

    Nice to meet such responsive developer, thank you one more time!
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    You're right, it is pretty cryptic. We would gladly fix it - we already handle some cases, but apparently not all of them. Just so it doesn't get lost, please report it as a feature suggestion explaining the situation and attaching an example project, even if almost empty one to demonstrate the issue.
     
  5. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Tried to reproduce on minimalistic project; but observed behavior was a little bit different. This time it failed with exception message on device without crashing.
    https://mega.co.nz/#!I5BUxIhL!E7uXR1RdgH4JkNAKLA_7HXrPAjotw8ixTL0cdU0Rvqc
     

    Attached Files: