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

Faulting module name: twinapi.appcore.dll

Discussion in 'VR' started by rwblodgett, Jun 7, 2019.

  1. rwblodgett

    rwblodgett

    Joined:
    Apr 4, 2017
    Posts:
    67
    We are experiencing an intermittent, unpredictable crash in our built WMR side-loaded app. This only happens sometimes, and we can't reliably reproduce it. We have a multiplayer app with several people joining from different geographical locations, in both our WMR and Rift PC apps. However, only the WMR backpacks are crashing intermittently, unpredictably. No exception from Unity. The crash manifests itself as the client returning the the "cliff house" and the app has exited, I think unbeknownst to Unity or the Unity wsa player. No application on quit debug logs are being spit out.

    Anybody ever seen anything like this?

    Faulting application name: <our app name>.exe, version: 0.0.0.0, time stamp: 0x5cf8812b
    Faulting module name: twinapi.appcore.dll, version: 10.0.17763.292, time stamp: 0x270a22eb
    Exception code: 0xc000027b
    Fault offset: 0x00000000000bd588
    Faulting process id: 0x1258
    Faulting application start time: 0x01d51c8d99b2f5f2
    Faulting application path: C:\Program Files\WindowsApps\<our app name>Unity_1.6.35.0_x64__k4r82w3e9qe04<our app name>.exe
    Faulting module path: C:\Windows\System32\twinapi.appcore.dll
    Report Id: 1a9598b3-1100-4a54-985f-672ebbf0bda0
    Faulting package full name: <our app name>Unity_1.6.35.0_x64__k4r82w3e9qe04
    Faulting package-relative application ID: App

    We're building with Unity 2018.4.1
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,698
    Do you have a callstack for the crash?
     
  3. rwblodgett

    rwblodgett

    Joined:
    Apr 4, 2017
    Posts:
    67
    We get nothing in the unity log.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,698
  5. rwblodgett

    rwblodgett

    Joined:
    Apr 4, 2017
    Posts:
    67
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,698
    I will show exactly where the app is crashing and hopefully what causes it to crash.
     
  7. rwblodgett

    rwblodgett

    Joined:
    Apr 4, 2017
    Posts:
    67
    So, I've got a full dump file. I've opened it in VS. I'm trying to see what information I can glean from this. Do you know where I should be looking? The dump file is 3.75 gb.

    Code (CSharp):
    1. >    KERNELBASE.dll!RaiseFailFastException()    Unknown
    2.      combase.dll!RoFailFastWithErrorContextInternal2(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 1459    C++
    3.      twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplication::ForwardLocalError(struct IRestrictedErrorInfo *)    Unknown
    4.      twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplicationFactory::ForwardLocalError(struct IRestrictedErrorInfo *)    Unknown
    5.      combase.dll!CallErrorForwarder(void * hProcess, int fLocal, IRestrictedErrorInfo * pRestrictedErrorInfo) Line 1619    C++
    6.      combase.dll!RoReportFailedDelegate(IUnknown * punkDelegate, IRestrictedErrorInfo * pRestrictedErrorInfo) Line 1709    C++
    7.      Windows.Networking.dll!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_64eaff0a44965e4df01bec2336245ad9>,Windows::Foundation::ITypedEventHandler<Windows::Networking::Sockets::StreamSocketListener * __ptr64,Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs * __ptr64> >(Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::Networking::Sockets::StreamSocketListener *,Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::InvokeAll::__l2::<lambda_64eaff0a44965e4df01bec2336245ad9> invokeOne, Microsoft::WRL::Details::EventTargetArray * targetArray, Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::Networking::Sockets::StreamSocketListener *,Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> > * pEvent) Line 151    C++
    8.      [Inline Frame] Windows.Networking.dll!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::Networking::Sockets::DatagramSocket *,Windows::Networking::Sockets::DatagramSocketMessageReceivedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::DoInvoke(Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::Networking::Sockets::DatagramSocket *,Windows::Networking::Sockets::DatagramSocketMessageReceivedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::InvokeAll::__l2::<lambda_046ddf79071240c46888872ccdba166e>) Line 810    C++
    9.      [Inline Frame] Windows.Networking.dll!Microsoft::WRL::EventSource<Windows::Foundation::ITypedEventHandler<Windows::Networking::Sockets::DatagramSocket *,Windows::Networking::Sockets::DatagramSocketMessageReceivedEventArgs *>,Microsoft::WRL::InvokeModeOptions<-2> >::InvokeAll(Windows::Networking::Sockets::IDatagramSocket * <args_0>, DatagramSocketMessageReceivedEventArgsServer * <args_1>) Line 820    C++
    10.      Windows.Networking.dll!DatagramSocketReadOperationServer::IoCompletedCore(HRESULT ioResult, unsigned int numberOfBytesTransferred, Windows::Networking::Sockets::IDatagramSocket * datagramSocket) Line 143    C++
    11.      Windows.Networking.dll!DatagramSocketReadOperationServer::IoCompleted(HRESULT ioResult, unsigned int numberOfBytesTransferred, IInspectable * context) Line 84    C++
    12.      Windows.Networking.dll!SocketIoContext::Invoke(IMFAsyncResult * result) Line 107    C++
    13.      RTWorkQ.dll!TPIoCompletionCallback()    Unknown
    14.      KERNELBASE.dll!BasepTpIoCallback()    Unknown
    15.      ntdll.dll!TppIopExecuteCallback()    Unknown
    16.      ntdll.dll!TppWorkerThread()    Unknown
    17.      kernel32.dll!BaseThreadInitThunk()    Unknown
    18.      ntdll.dll!RtlUserThreadStart()    Unknown
    19.  
     
    Last edited: Jun 18, 2019
  8. rwblodgett

    rwblodgett

    Joined:
    Apr 4, 2017
    Posts:
    67
    Well, we see in our code where we are using a delegate to read from a DatagramSocket for UWP, because UdpClient wasn't supported previously. ... This looks like it would relate to this callstack. We're trying to figure out what would be wrong in this small little function which reads from a datagram socket.
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,698
    RoReportFailedDelegate means that you leaked an exception from a callback. If you use async/await, this could be code that happens after the line with "await" keyword. I'd suggest wrapping the code that uses DatagramSocket with try/catch statements.