Skip to content
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

Early pop-up error messages fail to show correctly, causes other applications to misbehave #244

Open
jellysquid3 opened this issue Feb 13, 2025 · 2 comments

Comments

@jellysquid3
Copy link
Contributor

jellysquid3 commented Feb 13, 2025

It was noticed while debugging #243 that when NeoForge attempts to show a graphical error message, it often closes out immediately and causes other processes in the tree (such as the launcher, and even sometimes explorer.exe) to become unresponsive to input. This often requires killing other processes to recover the normal operation of Windows.

My guess as to what's causing the problem is that NeoForge attempts to use TinyFileDialogs from a different thread as the OpenGL context (source) and something in the stack doesn't like this.

@jellysquid3
Copy link
Contributor Author

Some more thoughts: The error dialog obviously works sometimes, because users see errors about OpenGL context initialization failure. I think specifically what has to happen is the timeout needs to elapse, which creates a situation where the OpenGL driver could still be interacting with GDI while NeoForge is attempting to show the dialog box.

@shartte
Copy link
Contributor

shartte commented Feb 17, 2025

My own experience with this is often related to the dialog being shown in the background without a top-level window icon.
tinyfd is sadly a pretty garbage library, and I believe we cannot actually pass the owning HWND to anchor it to the MC window (in case it was already created).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants