http://bugs.winehq.org/show_bug.cgi?id=58752
Bug ID: 58752 Summary: assembly:Z:\usr\share\wine\mono\wine-mono-10.2.0\lib\m ono\4.5\mscorlib.dll type:DllNotFoundException Product: Framework Mono Version: 6.12.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mono Assignee: wine-bugs@winehq.org Reporter: schusr@gmail.com CC: madewokherd@gmail.com Distribution: ---
Installed a 64 bit application that uses System.Media.SoundPlayer. When starting the application fails with DllNotFoundException but the file is present on the system.
dir Z:\usr\share\wine\mono\wine-mono-10.2.0\lib\mono\4.5\mscorlib.dll Volume in drive Z is fedora Volume Serial Number is 4979-a18d
Directory of Z:\usr\share\wine\mono\wine-mono-10.2.0\lib\mono\4.5
08/28/2025 07:00 PM 4,677,632 mscorlib.dll 1 file 4,677,632 bytes 0 directories 486,067,679,232 bytes free
Running wine from Fedora 42
002c:fixme:winediag:loader_init wine-staging 10.15 is a testing version containing experimental patches. 002c:fixme:winediag:loader_init Please mention your exact version when filing bug reports on winehq.org.
rpm -qa | grep mono-core mono-core-6.12.0-19.fc42.x86_64
http://bugs.winehq.org/show_bug.cgi?id=58752
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Product|Framework Mono |Wine Component|mono |mscoree Version|6.12.0 |10.15
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- What is the exact error message you're getting?
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #2 from Randy schusr@gmail.com --- assembly:Z:\usr\share\wine\mono\wine-mono-10.2.0\lib\mono\4.5\mscorlib.dll type:DllNotFoundException
Is the message
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- Can you get a log with MONO_LOG_LEVEL=debug
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #4 from Randy schusr@gmail.com --- Created attachment 79398 --> http://bugs.winehq.org/attachment.cgi?id=79398 Debug log
Look right before this.
ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.Win32Exception (0x80004005): Error creating window handle.
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #5 from Esme Povirk madewokherd@gmail.com --- [ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.Win32Exception (0x80004005): Error creating window handle.
That seems bad. Are you running without a display?
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #6 from Randy schusr@gmail.com --- No display is working okay.
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #7 from Randy schusr@gmail.com --- Debug log shows a totally different error than the first one I encountered. Display is working find.
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #8 from Randy schusr@gmail.com --- Created attachment 79403 --> http://bugs.winehq.org/attachment.cgi?id=79403 non debug log
This is contains the original error, totally different from the debug log error.
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #9 from Esme Povirk madewokherd@gmail.com --- OK. It's odd that that variable would change the behavior. Here's another one we can try: WINE_MONO_TRACE=E:System.DllNotFoundException
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #10 from Randy schusr@gmail.com --- Created attachment 79416 --> http://bugs.winehq.org/attachment.cgi?id=79416 WINE_MONO_TRACE=E:System.DllNotFoundException
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #11 from Randy schusr@gmail.com --- Back to the original error again.
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #12 from Esme Povirk madewokherd@gmail.com --- Alright, some new information.
[0000000000000128:] EXCEPTION handling: System.DllNotFoundException: winbrand.dll assembly:<unknown assembly> type:<unknown type> member:(null)
"<unnamed thread>" tid=0000000000000128 this=0000000003870130 , thread handle : 00000000009bd290, state : not waiting at (wrapper managed-to-native) BardMediaManager.SendCrashInfoDlg.BrandingFormatString (string) [0x00000] in <ed0466b3e8ce4113a170f675d10afc42>:0 at BardMediaManager.SendCrashInfoDlg.getReportBody (string) [0x0002c] in <ed0466b3e8ce4113a170f675d10afc42>:0
Looks like winbrand.dll ships with Windows, and the Windows version has that BrandingFormatString function. But, this is being called by a "SendCrashInfoDlg" class in the program, so it's probably only happening because something else went wrong earlier.
Most of the other exceptions look like they're probably benign to me, except for the NullReferenceException. Which we get a stack trace of at the end. Since we're on Windows, it's probably the attempt to access win32_player here: https://gitlab.winehq.org/mono/mono/-/blob/main/mcs/class/System/System.Medi...
I would guess that either things are happening out of order (application is supposed to call Play before Stop), or calling Stop without Play is perfectly valid and we should fix the code to account for that.
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #13 from Esme Povirk madewokherd@gmail.com --- Quick manual testing on Windows shows that calling Stop without Play doesn't throw an exception, so that should be an easy fix.
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #14 from Esme Povirk madewokherd@gmail.com --- Made a Merge Request to Mono: https://gitlab.winehq.org/mono/mono/-/merge_requests/158
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #15 from Esme Povirk madewokherd@gmail.com --- Also sent an MR implementing BrandingFormatString, which might have made the crash handling work properly and made this bug less confusing: https://gitlab.winehq.org/wine/wine/-/merge_requests/9159
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #16 from Randy schusr@gmail.com --- Thanks, how do I test it?
http://bugs.winehq.org/show_bug.cgi?id=58752
--- Comment #17 from Esme Povirk madewokherd@gmail.com --- It'll require a current build of Wine Mono. You can do any one of these:
* Wait for the Wine Mono 10.3.0 release, which I have tagged and am working on. * Download the "make msi target" archive from https://github.com/wine-mono/wine-mono/actions/runs/18476014586 and install the MSI from it. * Download the Wine Mono source code, and build it yourself.