GLFW.jl icon indicating copy to clipboard operation
GLFW.jl copied to clipboard

NSInternalInconsistencyException when calling display()

Open mpeters2 opened this issue 2 years ago • 1 comments

I'm posting this here because the last call before crashing seems to be glfwPlatformCreateWindow.

I'm using GLMakie, and when I call GLMakie.display(fig), it crashes with an uncaught NSInternalInconsistencyException exception.

GLMakie v0.8.11 GLFW v3.4.1 MacOS 14.0; M1 Max chip, Mac Studo

2023-10-20 19:25:20.409 julia[63908:2081043] *** Assertion failure in -[NSApplication run], NSApplication.m:3472
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSApp with wrong _running count'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018d3248c0 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000018ce1deb4 objc_exception_throw + 60
	2   Foundation                          0x000000018e46b18c -[NSCalendarDate initWithCoder:] + 0
	3   AppKit                              0x0000000190a7c53c -[NSApplication run] + 732
	4   libglfw.3.3.dylib                   0x00000001698e286c _glfwPlatformCreateWindow + 108
	5   libglfw.3.3.dylib                   0x00000001698dc0cc glfwCreateWindow + 332
	6   nfnZR_cFusM.dylib                   0x0000000296d1aecc julia_CreateWindow_19126 + 236
	7   nfnZR_cFusM.dylib                   0x0000000296d345fc julia_YY.empty_screenYY.40_12066 + 532
	8   nfnZR_cFusM.dylib                   0x0000000296d37274 julia_singleton_screen_12649 + 672
	9   nfnZR_cFusM.dylib                   0x0000000296cee93c julia_YY.ScreenYY.47_11939 + 100
	10  ???                                 0x000000029c1ec270 0x0 + 11209196144
	11  ???                                 0x00000002a769425c 0x0 + 11398627932
	12  ???                                 0x00000002a7694584 0x0 + 11398628740
	13  libjulia-internal.1.9.dylib         0x00000001010de7b4 do_call + 188
	14  libjulia-internal.1.9.dylib         0x00000001010dcfd8 eval_body + 1476
	15  libjulia-internal.1.9.dylib         0x00000001010dd624 jl_interpret_toplevel_thunk + 260
	16  libjulia-internal.1.9.dylib         0x00000001010f4794 jl_toplevel_eval_flex + 4620
	17  libjulia-internal.1.9.dylib         0x00000001010f46b8 jl_toplevel_eval_flex + 4400
	18  libjulia-internal.1.9.dylib         0x00000001010f54dc ijl_toplevel_eval_in + 156
	19  sys.dylib                           0x00000001195bc798 japi1_include_string_50563.clone_3 + 520
	20  libjulia-internal.1.9.dylib         0x00000001010c588c ijl_apply_generic + 1732
	21  sys.dylib                           0x00000001183a50d8 japi1__include_36508 + 828
	22  sys.dylib                           0x0000000117f6fb3c julia_exec_options_44519 + 21764
	23  libjulia-internal.1.9.dylib         0x000000010111c788 true_main + 192
	24  libjulia-internal.1.9.dylib         0x000000010111c67c jl_repl_entrypoint + 180
	25  julia                               0x0000000100727f6c main + 12
	26  dyld                                0x000000018ce59058 start + 2224
)
libc++abi: terminating due to uncaught exception of type NSException

[63908] signal (6): Abort trap: 6

It might be related to this: https://bugs.openjdk.org/browse/JDK-8297131

mpeters2 avatar Oct 21 '23 12:10 mpeters2

As it turns out, Gtk is the source of this error. If I comment out my open_dialog_native() function call, and instead hardwire the filename into my code, the GLMakie crash goes away.

It might be related to this issue.

mpeters2 avatar Oct 21 '23 20:10 mpeters2