Unhandled exception w/IFileDialog & P9NP provider present #11476
Unanswered
ctabor-itracs
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recently, we started getting reports of our very old application crashing on Windows 11 any time the user tries to browse to open or save a file. I'm hoping someone here can help us to get this resolved or pointed in the right direction to get that done. Any help would be much appreciated! Hopefully, I can provide enough information here to be useful.
As it turns out, it's not a Windows 11 thing, but seems to happen any time P9NP is present in network provider order (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder). We have examples from Windows 10, 11, & Server 22H2. Removing P9NP from the ProviderOrder avoids the issue. I think this problem may have started as a result of whatever change was made for #5789 . I also found that there may be another group experiencing a similar issue: H-uru/Plasma#1531
Luckily, this happens on my development machine as I have (and love) terminal and WSL2. I was able try several things that have had
little to no effect. Changing our threading model was catastrophic for the rest of our large codebase. Hiding pinned places moves the crash a bit - I get to see the browse window, but get the crash as soon as I take any action in the dialog.
We are using the IFileDialog derived objects IFileOpenDialog/IFileSaveDialog. After calling IFileDialog.Show(), it appears that modal calls into windows.storage.dll, which ends up calling p9np.dll!NPEnumResource, which calls CoInitialize, gets an hresult 0x80010106 : Cannot change thread mode after it is set... and then throws the exception.
call stacks:
1272 Worker Thread p9np.dll!<lambda_0d5c83228d6618bef0f94f3d10fa4366>::<lambda_invoker_cdecl> ucrtbase.dll!_CxxThrowException
45492 Worker Thread ntdll.dll!TppWorkerThread p9np.dll!NPEnumResource
8540 Worker Thread ntdll.dll!TppWorkerThread win32u.dll!NtUserMsgWaitForMultipleObjectsEx
Windows Version
10.0.19045.4170
also win11 & 22H2
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
WSL 2
Kernel Version
Linux version 5.15.146.1-microsoft-standard-WSL2 (root@65c757a075e2) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Jan 11 04:09:03 UTC 2024
Distro Version
Ubuntu 22.04.1 LTS
Other Software
iTRACS DM
Repro Steps
Using any IFileDialog interface (IFileOpenDialog/IFileSaveDialog) to select a file
Expected Behavior
no unhandled exception
Actual Behavior
unhandled exception in pn9p.dll
Diagnostic Logs
WslLogs-2024-03-25_15-00-09.zip
Beta Was this translation helpful? Give feedback.
All reactions