I cannot verify if the error only occurs when debugging, as I have no console when testing in release mode and random crashes in general seem to be “normal” on Windows Store.
Can anyone tell me if this error is something to be concerned about:
It happens around our level loading code, which loads a level asyc, if that matters …
Is this coming from the engine itself, or e.g. parts of our code which use a lot of “runOnApp/UIThread”, “isRunningOnApp/UIThread” (we sort of rely on those functions, can’t remove them quickly)?
Thanks!
PS: Using 5.5.0p3 (64-bit), Windows Store = 8.1 Phone/Desktop and UWP
This is a definite bug in our code. You can’t see it in release mode because it’s an assert, and asserts are only enabled on debug builds. That’s also why you probably can’t see it on any other platform: we don’t really ship debug players on platforms other than Windows Store and Xbox One (for instance, development standalone player is equivalent to windows store release config).
Do you have a callstack for this assertion? If you switch to mixed mode debugging, debugger should break when it hits and you’ll get the callstack. You’ll also be able to continue in that case.
Background Info:
We 1) Load a level asyc, this seems to work.
Then 2) Onto that level, we load an additional level asyc.
I cannot yet say if the level loading code is related to that or anything else.
Mixed: Didn’t get that to work.
Popup says either Native or Managed.
Can you debug both at the same time?
Win10 Mobile:
Assertion failed on expression: 'Thread::CurrentThreadIsMainThread()'
(Filename: C:\buildslave\unity\build\Runtime/BaseClasses/BaseObject.h Line: 873)
Resulting Callstack:
> UnityPlayer.dll!PPtr<Avatar>::operator Avatar *() Line 206 C++
UnityPlayer.dll!Animator::IsHuman() Line 2436 C++
UnityPlayer.dll!Animator::SetupPlayableConstant() Line 1239 C++
UnityPlayer.dll!Animator::PostProcessTopologyChangeMultithreaded(const FrameData & frameData, Playable * root, int outputPort) Line 3801 C++
UnityPlayer.dll!DirectorManager::PrepareFrameFunc(DirectorJob * jobs, unsigned int index) Line 232 C++
UnityPlayer.dll!JobQueue::ExecuteJobFunc(JobInfo * info) Line 357 C++
UnityPlayer.dll!JobQueue::Exec(JobInfo * info, int tag, int count) Line 393 C++
UnityPlayer.dll!JobQueue::ExecuteJobFromHighPriorityStack() Line 702 C++
UnityPlayer.dll!JobQueue::ProcessJobs(void * profInfo) Line 805 C++
UnityPlayer.dll!JobQueue::WorkLoop(void * data) Line 879 C++
UnityPlayer.dll!Thread::RunThreadWrapper(void * ptr) Line 35 C++
UnityPlayer.dll!win32::CreateThread::__l2::<lambda>(Windows::Foundation::IAsyncAction ^ __formal) Line 276 C++
Is that of help?
Should I look further?
The second scene we load contains character spawn logic, which then spawns human characters which use the Animator …
A followup question would be: What big issue is it, if the assert fails?
Will this exit/crash the app or will it go on and work?
Missing PDB file will never cause an access violation. That just makes no sense - PDB files are used by debuggers to show you native function names. They aren’t ever deployed to a device or involved in execution.
Do you think you could fill a bug report on that assert? We could probably do a blind fix, but with a repro project we’d be certain that it fixes it on your project.
Sadly no. I haven’t quite figured out what the magic dance between Unity and Visual Studio is, but it refuses to use the debugger that it’s already connected to for some reason. Any attempts to detach like it says basically hang. Any ideas?
I’m having a very similar issue with loading multiple asset bundles at once. There’s no call stack either. I had trouble finding the project properties debug tab to change the debugger type to “mixed”. Can you elaborate?