Skip to content

Fix GI-GTK initialization on macOS#1476

Merged
jmercouris merged 1 commit intoatlas-engineer:masterfrom
midchildan:fix/darwin
Jun 7, 2021
Merged

Fix GI-GTK initialization on macOS#1476
jmercouris merged 1 commit intoatlas-engineer:masterfrom
midchildan:fix/darwin

Conversation

@midchildan
Copy link
Contributor

@midchildan midchildan commented Jun 6, 2021

This fix is similar to d0a4161. The unpatched code crashes on macOS with the following output:

WARNING:
   Type initializer for class 'GdkX11DeviceXI2' (GType 'GDK-X11-DEVICE-XI2') is invalid: foreign symbol 'gdk_x11_device_xi2_get_type'
WARNING:
   Type initializer for class 'GdkX11DeviceManagerCore' (GType 'GDK-X11-DEVICE-MANAGER-CORE') is invalid: foreign symbol 'gdk_x11_device_manager_core_get_type'
WARNING:
   Type initializer for class 'GdkX11DeviceManagerXI2' (GType 'GDK-X11-DEVICE-MANAGER-XI2') is invalid: foreign symbol 'gdk_x11_device_manager_xi2_get_type'
WARNING:
   Type initializer for class 'GtkPlug' (GType 'GTK-PLUG') is invalid: foreign symbol 'gtk_plug_get_type'
WARNING:
   Type initializer for class 'GtkSocket' (GType 'GTK-SOCKET') is invalid: foreign symbol 'gtk_socket_get_type'
<INFO> [16:54:47] Listening to socket "nyxt/nyxt.socket".
Nyxt version 2.0.0
<INFO> [16:54:47] Loading Lisp file "/Users/midchildan/.config/nyxt/auto-config.lisp".
<DEBUG> [16:54:47] Lisp file "/Users/midchildan/.config/nyxt/init.lisp" does not exist.
<DEBUG> [16:54:47] Initializing GI-GTK Interface
CORRUPTION WARNING in SBCL pid 3273 pthread 0x700005d2b000:
Memory fault at 0x10 (pc=0x7fff75747452, fp=0x1dc9f280, sp=0x1dc9ee50) pthread 0x700005d2b000
The integrity of this image is possibly compromised.
Continuing with fingers crossed.
<WARN> [16:54:48] Warning: Error on GTK thread: Unhandled memory fault at #x10.

I've tested the fix on macOS and NixOS.

@jmercouris
Copy link
Member

I see, let me test this on a Linux kernel and see if it works. It should be OK.

Thanks!

@jmercouris
Copy link
Member

It appears to work despite finalize being moved for the Linux variant.

@jmercouris
Copy link
Member

Thanks again!

@jmercouris jmercouris merged commit 8744fc5 into atlas-engineer:master Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants