ThizThizzyDizzy / nc-reactor-generator

A program to plan and generate reactors for Nuclearcraft (https://www.curseforge.com/minecraft/mc-mods/nuclearcraft-mod)
GNU General Public License v3.0
32 stars 6 forks source link

Crash when opening file dialog on MacOS #65

Closed burturt closed 2 years ago

burturt commented 3 years ago

Whenever I try to import a reactor file on MacOS 10.14, I get this error as soon as I click on the "import", "export", "load", or "save" buttons:

2021-09-12 17:33:40.135 java[88508:3865391] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff4e767191 __exceptionPreprocess + 256
    1   libobjc.A.dylib                     0x00007fff78f6c3c6 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff4e780fe9 -[NSException raise] + 9
    3   AppKit                              0x00007fff4bd18cd6 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 317
    4   AppKit                              0x00007fff4bd16103 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1479
    5   AppKit                              0x00007fff4bdd54a1 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50
    6   AppKit                              0x00007fff4bd15b36 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
    7   AppKit                              0x00007fff4bdd5456 -[NSPanel initWithContentRect:styleMask:backing:defer:] + 64
    8   AppKit                              0x00007fff4c3ec525 -[NSSavePanel initWithContentRect:styleMask:backing:defer:] + 592
    9   AppKit                              0x00007fff4bfe6ac4 +[NSSavePanel _crunchyRawUnbonedPanel] + 550
    10  liblwjgl_nfd.dylib                  0x0000000136256d76 liblwjgl_nfd.dylib + 3446
    11  ???                                 0x0000000117669bfb 0x0 + 4687567867
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Using MacOS 10.14, OpenJDK 11

ThizThizzyDizzy commented 3 years ago

Can you do other forms of file manipulation? (those that don't require a file chooser, such as the load internal configuration buttons or adding addons?)

burturt commented 3 years ago

I can change between the built-in configurations and modify the built in configurations but can't load/save them.

ThizThizzyDizzy commented 3 years ago

hmm, so it's the native file dialog then For importing multiblocks, you should be able to click-and-drag them into the main menu (there's no alternative for exporting though)

burturt commented 3 years ago

Click-and-drag worked!

ThizThizzyDizzy commented 2 years ago

Looking at this again, it looks like it crashed due to doing stuff on a different thread; However, I have since (in the dev build) unified the main threads, so this shouldn't be an issue anymore

ThizThizzyDizzy commented 2 years ago

Should be fixed in v4.0, let me know if this still happens