VideoGameSmash12/WNT

Blackbox crashes the entire JVM when running under non-Windows operating systems

Closed this issue · 3 comments

Over the course of WNT's development I've received multiple reports that the Blackbox crashes users' JVMs completely when they are using operating systems other than Microsoft Windows.

The Blackbox will be able to open for a few seconds, but then crashes the whole JVM with a segmentation fault. When googling the error, the cause appears to be related to AWT and its terrible track record on Linux. The Blackbox does use AWT, but only for the system tray integration and as part of the events system for JSwing.

EDIT: The issue is caused by weird oddities with LWJGL and how multiple windows are dealt with in non-Windows operating systems, and I have no clue if I can even fix it. See below.

I've actually tested how the Blackbox behaves under Linux and have confirmed that it does this. I'm still not fully sure why it doesn't work.

Non-Windows operating systems apparently have trouble with LWJGL when you have multiple windows open from the same process. This is a really weird issue that I'm not even sure is possible to fix, so to at least make the Blackbox work under Linux and Mac OS, I'm likely going to have to separate the Blackbox from the actual Minecraft process somehow.

The best way I'd probably pull this off is by splitting the Blackbox into a separate process that then connects to an endpoint in the Supervisor through some networking bullshit to pull all its data. This will likely be a complex process in itself as I want to make the Blackbox and Supervisor as dynamic as possible, so I'll need to develop a whole ass action system where if a module or other hook for the Supervisor has an action to do, it would be given an ID somewhere with the appropriate metadata (for when the Blackbox wants info about it) and then figure out how the fuck I'd then instruct the Blackbox to send requests to do said action to the client and get a response.

In other words, the solution to this whole issue will be a clusterfuck that will require major changes to WNT's codebase which include an entire "action" system, a network system, and of course a way to get all that stuff to work together to be somewhat dynamic. This is going to suck ass...

Well apparently Luna fixed the problem by setting one system property. Holy shit.