Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash at Initialization #1

Closed
ardaegeunlu opened this issue Feb 12, 2020 · 5 comments
Closed

Crash at Initialization #1

ardaegeunlu opened this issue Feb 12, 2020 · 5 comments

Comments

@ardaegeunlu
Copy link

ardaegeunlu commented Feb 12, 2020

When I first built the code on HoloLens, it was working fine with outputs of marker count to the debugger. However when I tried to run it again, with no changes, I started getting this error. (Deleted and reinstalled, same crash with the same stack trace. Though it magically? worked once again after reinstallation, not in the first try.)

Here is the stack trace:

'ArUcoDetectionHoloLensUnity.exe' (Win32): Unloaded 'C:\Program Files\Intel\Media SDK\libmfxhw32.dll'
Exception thrown at 0x76D02552 (KernelBase.dll) in ArUcoDetectionHoloLensUnity.exe: WinRT originate error - 0xC00D36B3 : 'The stream number provided was invalid.'.
MediaFrameSourceGroup::TryInitializeMediaCaptureAsync: MediaCapture is successfully initialized in shared mode.
MediaFrameSourceGroup::InitializeMediaSourceWorkerAsync: selected group has 2 media frame sources
MediaFrameSourceGroup::GetSensorType:: assuming SensorType::PhotoVideo per _mediaFrameSourceGroupType check (source id is 'Source#1@\?\DISPLAY#INT22B8#4&27b432bd&0&UID139960#{e5323777-f976-4f5b-9b55-b94699c46e44}{CDD6871A-56CA-4386-BAE7-D24B564378A9}')
MediaFrameSourceGroup::GetSubtypeForFrameReader: evaluating MediaFrameSourceKind::Color with format Video-NV12 @30000/1001Hz and resolution 896 x 504
MediaFrameSourceGroup::InitializeMediaSourceWorkerAsync: created the 'PhotoVideo' frame reader
'ArUcoDetectionHoloLensUnity.exe' (Win32): Loaded 'C:\Windows\System32\msvproc.dll'.
The thread 0x308 has exited with code 0 (0x0).
MediaFrameSourceGroup::InitializeMediaSourceWorkerAsync: started the 'PhotoVideo' frame reader
MediaFrameSourceGroup::GetSensorType:: assuming SensorType::PhotoVideo per _mediaFrameSourceGroupType check (source id is 'Source#0@\?\DISPLAY#INT22B8#4&27b432bd&0&UID139960#{e5323777-f976-4f5b-9b55-b94699c46e44}{CDD6871A-56CA-4386-BAE7-D24B564378A9}')
MediaFrameSourceGroup::InitializeMediaSourceWorkerAsync: sensor type has already been initialized!
Exception thrown at 0x76D02552 in ArUcoDetectionHoloLensUnity.exe: Microsoft C++ exception: Il2CppExceptionWrapper at memory location 0x0260F484.
The thread 0x6c8 has exited with code 0 (0x0).
Exception thrown at 0x64C8E1FE (HoloLensForCV.dll) in ArUcoDetectionHoloLensUnity.exe: 0xC0000005: Access violation reading location 0x00000020.

@ardaegeunlu
Copy link
Author

ardaegeunlu commented Feb 13, 2020

It looks like the first update was called before the initialization of sensors were finished, adding extra checks resolved the problem. ✔️

@noxer
Copy link

noxer commented Feb 24, 2020

@ardaegeunlu I've got the exact same problem, what exactly did you do to fix it?

@ardaegeunlu
Copy link
Author

I added a grace period of 2 seconds (probably an overkill) after the call to StartHoloLensMediaFrameSourceGroups(), and only after that started making calls to UpdateHoloLensMediaFrameSourceGroup().

@noxer
Copy link

noxer commented Feb 24, 2020

Okay, I ended up doing the same. Thank you.

@doughtmw
Copy link
Owner

As per the comments from @ardaegeunlu, I've added a fix to the main repo for this issue. Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants