crash when internal graphics card is used instead of the dedicated graphics card
Summary
Unity 2023.2.3f1 crashes with a popup window when trying to create a MediaPlayer object in libVLC.
Minimal project and steps to reproduce
I tried it with the libVLC sample scene.
- open libVLC example scene
VLCMinimalPlayback
- start the scene
- crash
What is the current bug behavior?
Unity crashes.
What is the expected correct behavior?
No crash should occur.
Does it work on other plaforms? Does it work with the official VLC apps?
Only tested on Windows. Happens in the Unity editor and in the built player.
Relevant logs and/or screenshots
You can find the full Editor.log
file of Unity attached in the comment below.
Stack trace:
========== OUTPUTTING STACK TRACE ==================
0x00007FFF63AE2A95 (VLCUnityPlugin) GetRenderEventFunc
0x00007FFF63AE159A (VLCUnityPlugin) libvlc_unity_media_player_new
0x000002821C86FD81 (Mono JIT Code) (wrapper managed-to-native) LibVLCSharp.MediaPlayer/Native:LibVLCMediaPlayerNew (intptr)
0x000002821C86FB93 (Mono JIT Code) [/builds/videolan/vlc-unity/tmp/lvs/src/LibVLCSharp/MediaPlayer.cs:614] LibVLCSharp.MediaPlayer/<>c__DisplayClass3_0:<.ctor>b__0 ()
0x000002821C8643F1 (Mono JIT Code) [/builds/videolan/vlc-unity/tmp/lvs/src/LibVLCSharp/Internal.cs:34] LibVLCSharp.Internal:.ctor (System.Func`1<intptr>,System.Action`1<intptr>)
0x000002821C86E78B (Mono JIT Code) [/builds/videolan/vlc-unity/tmp/lvs/src/LibVLCSharp/MediaPlayer.cs:616] LibVLCSharp.MediaPlayer:.ctor (LibVLCSharp.LibVLC)
0x000002821C86DF43 (Mono JIT Code) [F:\Dev\Projects\GitHub\UnityVLCPlayer\Assets\VLCUnity\Demos\Scripts\VLCMinimalPlayback.cs:60] VLCMinimalPlayback:PlayPause ()
0x000002821C8425E3 (Mono JIT Code) [F:\Dev\Projects\GitHub\UnityVLCPlayer\Assets\VLCUnity\Demos\Scripts\VLCMinimalPlayback.cs:30] VLCMinimalPlayback:Awake ()
0x000002814BF39318 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFEEA7F694E (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\mini\mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007FFEEA738464 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:3068] do_runtime_invoke
0x00007FFEEA738550 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:3115] mono_runtime_invoke
0x00007FFEC6BD4DA4 (Unity) scripting_method_invoke
0x00007FFEC6BAFDF3 (Unity) ScriptingInvocation::Invoke
0x00007FFEC6BAFEDE (Unity) ScriptingInvocation::InvokeChecked
0x00007FFEC6C53F06 (Unity) SerializableManagedRef::CallMethod
0x00007FFEC6B9B1A5 (Unity) MonoBehaviour::CallAwake
0x00007FFEC6B998C7 (Unity) MonoBehaviour::AddToManager
0x00007FFEC6B9A5DB (Unity) MonoBehaviour::AwakeFromLoad
0x00007FFEC6C94501 (Unity) AwakeFromLoadQueue::InvokePersistentManagerAwake
0x00007FFEC6C95553 (Unity) AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad
0x00007FFEC6C9519D (Unity) AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks
0x00007FFEC6873C39 (Unity) LoadSceneOperation::CompleteAwakeSequence
0x00007FFEC6874935 (Unity) LoadSceneOperation::CompletePreloadManagerLoadSceneEditor
0x00007FFEC68756E9 (Unity) LoadSceneOperation::IntegrateMainThread
0x00007FFEC6878A03 (Unity) PreloadManager::UpdatePreloadingSingleStep
0x00007FFEC6879105 (Unity) PreloadManager::WaitForAllAsyncOperationsToComplete
0x00007FFEC7B6F433 (Unity) EditorSceneManager::RestoreSceneBackups
0x00007FFEC78AC606 (Unity) PlayerLoopController::EnterPlayMode
0x00007FFEC78AE2BE (Unity) PlayerLoopController::SetIsPlaying
0x00007FFEC78A89A5 (Unity) Application::TickTimer
0x00007FFEC7CE3F0A (Unity) MainMessageLoop
0x00007FFEC7CE9DDD (Unity) UnityMain
0x00007FF7CC532CDA (Unity) __scrt_common_main_seh
0x00007FFF7B04257D (KERNEL32) BaseThreadInitThunk
0x00007FFF7C22AA58 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
Environment
- OS: Windows 11
- LibVLC version and architecture: 4.0.0-dev-24970-ga03de829e1
- LibVLCSharp version: 4.0.0.0
- VLC Unity plugin version: 0.1.8
- Scripting backend used: Mono
Possible fixes
No idea.