-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unhandled Exception: System.Threading.ThreadStateException: #154
Comments
It's probably an interaction between mixed-mode and managed APIs that we don't handle correctly. Does the program in question have its source code posted, or is it publicly available? That could help with figuring out exactly what it's doing and making a test case. If not, I could try setting |
I wrote a test for this, it works on Windows and fails in Wine Mono with a similar exception: madewokherd/wine-mono-vstests@b23ef43 |
This is really interesting. Mono's version of There's also a test for it, which passes on Windows: https://github.com/madewokherd/mono/blob/develop/mcs/class/corlib/Test/System.Threading/ThreadTest.cs#L1291 The other test works in .NET Framework, so there must be some circumstance where you can set the state of a running thread. Hypotheses:
|
Testing in managed code shows that new threads started by managed code have a thread state of MTA. Calling |
It should be fixed by this commit: 6fae2df If you want to retest before that makes it into a release, you can try a build from the "Artifacts" section near the bottom of this page: https://github.com/madewokherd/wine-mono/actions/runs/3555468427 |
I've noticed that a program gives me this error (expanded below), and other programs that use .NET work as they should. Though I'm also not 100% sure if it's a Mono issue or not, as the program that spits this error is a modding tool from an old game that was never actually been fixed, and has many bugs anyways. Sending this report in case it's actually NOT the issue of the program itself, though.
The program worked as intended with .NET installled via Wine (needs .NET 4.0+, if that detail helps), but current version of Wine messes it up again (mscoree.dll not found).
Wine version: wine-7.16
winetricks --version: 20220411-next - sha256sum: 704cdd73c31f6b8492219a76c1b1d31aaa0ca8908177b09abde14707d1650657
wine-mono-7.3.0-1
The text was updated successfully, but these errors were encountered: