Hi, I’ve just updated to JUCE 8.0.7 from JUCE 6. When starting up my application, I see this kind of debug output:
[...]
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DXCore.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvppex.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\d3d10warp.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\d3d10warp.dll'
The thread 55460 has exited with code 0 (0x0).
The thread 62480 has exited with code 0 (0x0).
The thread 15924 has exited with code 0 (0x0).
The thread 62640 has exited with code 0 (0x0).
The thread 47236 has exited with code 0 (0x0).
The thread 58152 has exited with code 0 (0x0).
The thread 57960 has exited with code 0 (0x0).
The thread 34356 has exited with code 0 (0x0).
The thread 47184 has exited with code 0 (0x0).
The thread 58680 has exited with code 0 (0x0).
The thread 15100 has exited with code 0 (0x0).
The thread 52624 has exited with code 0 (0x0).
The thread 56348 has exited with code 0 (0x0).
The thread 59100 has exited with code 0 (0x0).
The thread 59480 has exited with code 0 (0x0).
The thread 12176 has exited with code 0 (0x0).
The thread 58096 has exited with code 0 (0x0).
The thread 45900 has exited with code 0 (0x0).
The thread 34528 has exited with code 0 (0x0).
The thread 30556 has exited with code 0 (0x0).
The thread 57804 has exited with code 0 (0x0).
The thread 11092 has exited with code 0 (0x0).
The thread 54828 has exited with code 0 (0x0).
The thread 29904 has exited with code 0 (0x0).
The thread 35364 has exited with code 0 (0x0).
The thread 48096 has exited with code 0 (0x0).
The thread 63476 has exited with code 0 (0x0).
The thread 62020 has exited with code 0 (0x0).
The thread 3924 has exited with code 0 (0x0).
The thread 54508 has exited with code 0 (0x0).
The thread 49884 has exited with code 0 (0x0).
The thread 43632 has exited with code 0 (0x0).
The thread 22312 has exited with code 0 (0x0).
The thread 9504 has exited with code 0 (0x0).
The thread 63172 has exited with code 0 (0x0).
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\umpdc.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\powrprof.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvwgf2umx.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvgpucomp64.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvldumdx.dll'
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvldumdx.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvgpucomp64.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvwgf2umx.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\powrprof.dll'
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'. Symbol loading disabled by Include/Exclude setting.
The thread 38720 has exited with code 0 (0x0).
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\d3d10warp.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\d3d10warp.dll'
The thread 61424 has exited with code 0 (0x0).
The thread 15696 has exited with code 0 (0x0).
The thread 37364 has exited with code 0 (0x0).
The thread 52916 has exited with code 0 (0x0).
The thread 37184 has exited with code 0 (0x0).
The thread 58784 has exited with code 0 (0x0).
The thread 29576 has exited with code 0 (0x0).
The thread 15224 has exited with code 0 (0x0).
The thread 36352 has exited with code 0 (0x0).
The thread 63076 has exited with code 0 (0x0).
The thread 13584 has exited with code 0 (0x0).
The thread 39888 has exited with code 0 (0x0).
The thread 3312 has exited with code 0 (0x0).
The thread 58988 has exited with code 0 (0x0).
The thread 33404 has exited with code 0 (0x0).
The thread 9676 has exited with code 0 (0x0).
The thread 25984 has exited with code 0 (0x0).
The thread 19500 has exited with code 0 (0x0).
The thread 42008 has exited with code 0 (0x0).
The thread 3200 has exited with code 0 (0x0).
The thread 42104 has exited with code 0 (0x0).
The thread 29408 has exited with code 0 (0x0).
The thread 43988 has exited with code 0 (0x0).
The thread 61480 has exited with code 0 (0x0).
The thread 44620 has exited with code 0 (0x0).
The thread 55904 has exited with code 0 (0x0).
The thread 56308 has exited with code 0 (0x0).
The thread 34876 has exited with code 0 (0x0).
The thread 26184 has exited with code 0 (0x0).
The thread 5196 has exited with code 0 (0x0).
The thread 32616 has exited with code 0 (0x0).
The thread 63596 has exited with code 0 (0x0).
The thread 50984 has exited with code 0 (0x0).
The thread 44492 has exited with code 0 (0x0).
The thread 61868 has exited with code 0 (0x0).
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\umpdc.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\powrprof.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvwgf2umx.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvgpucomp64.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvldumdx.dll'
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvldumdx.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvgpucomp64.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispig.inf_amd64_0afec3f2050014a0\nvwgf2umx.dll'. Symbol loading disabled by Include/Exclude setting.
The thread 45164 has exited with code 0 (0x0).
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\d3d10warp.dll'. Symbol loading disabled by Include/Exclude setting.
'mtplayer.exe' (Win32): Loaded 'C:\Windows\System32\DWrite.dll'. Symbol loading disabled by Include/Exclude setting.
The thread 39404 has exited with code 0 (0x0).
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\DWrite.dll'
'mtplayer.exe' (Win32): Unloaded 'C:\Windows\System32\d3d10warp.dll'
[and so on...]
In total, d3d10warp.dll
is loaded and unloaded 10 times before my code does anything meaningful. Each unload kills ~35 threads, so this is a heavy weight thing. In release mode, start-up time went from ~100ms to 1100ms before my own code is executed. I’d really like to avoid such a delay.
I’ve tried to find the cause. The loading/unloading cycles happen when I instantiate my main Window. The super class constructors of DocumentWindow
eventually call into Windows-specific code, where I see temporary instantiations of the DirectX class using:
SharedResourcePointer<DirectX>
Each time, the DirectX class is instantiated, and subsequently deleted.
For example, here:
modules/juce_gui_basics/native/juce_VBlank_windows.cpp:215
Class VBlankDispatcher, method updateDisplay(…):
void updateDisplay (ComponentPeer::VBlankListener& listener, HMONITOR monitor)
{
[...]
SharedResourcePointer<DirectX> directX;
for (const auto& adapter : directX->adapters.getAdapterArray())
{
[...]
}
}
- Is my code faulty? Should I do something else prior to instantiating the main window?
- Or can I somehow block
SharedResourcePointer<DirectX>
so that it doesn’t always get deleted multiple times during start-up? - Or do you think this is something that should get fixed in JUCE?
Thanks.