GNOME Bugzilla – Bug 764046
Gedit 3.20.0 on Mac OS X: no menubar
Last modified: 2016-04-07 12:13:37 UTC
Hi, I am the maintainer of the Gedit Homebrew formula. I am testing the latest 3.20.0 release of Gedit and saw that no menubar is generated. I am seeing the following messages when launching, and I assume that in particular the last one is important here: (gedit:44606): Gtk-WARNING **: Theme parsing error: gedit-style-os.css:98:18: The 'gtk-key-bindings' property has been renamed to '-gtk-key-bindings' (gedit:44606): Gtk-WARNING **: Theme parsing error: gedit-style-os.css:102:18: The 'gtk-key-bindings' property has been renamed to '-gtk-key-bindings' (gedit:44606): Gtk-WARNING **: Theme parsing error: gedit-style-os.css:106:18: The 'gtk-key-bindings' property has been renamed to '-gtk-key-bindings' (gedit:44606): Gtk-WARNING **: Theme parsing error: gedit-style-os.css:110:18: The 'gtk-key-bindings' property has been renamed to '-gtk-key-bindings' (gedit:44606): Gtk-WARNING **: Theme parsing error: gedit-style-os.css:114:18: The 'gtk-key-bindings' property has been renamed to '-gtk-key-bindings' ** (gedit:44606): CRITICAL **: gedit_menu_extension_remove_items: assertion 'GEDIT_IS_MENU_EXTENSION (menu)' failed
Just installed 3.20.1. Now gedit just segfaults on startup after the 5 gtk-key-bindings warnings...
Hey Tom, can you provide a backtrace for the set fault? The theme issues should be easy to fix. I'll have a look later today.
Doing the build with debug symbols now. I am seeing a compilation warning that looks suspicious: gedit/gedit-app-osx.c:114:21: warning: sending 'GeditAppOSXDelegate *' to parameter of incompatible type 'id<NSFileManagerDelegate> _Nullable' [NSApp setDelegate:self]; ^~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:129:57: note: passing argument to parameter 'delegate' here @property (nullable, assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5, 2_0); ^ 1 warning generated.
Here is the backtrace:
+ Trace 236127
The gtk stack itself was not compiled with debugging symbols unfortunately: Homebrew currently does not support that :-(
Fixed the theme parsing errors: https://git.gnome.org/browse/gedit/commit/?id=3a3db993d63b7d071e833695fb1fbb6863382ee8
For the others, can you try to disable all the plugins before running gedit?
Can you check if this returns true? https://git.gnome.org/browse/gedit/tree/gedit/gedit-app.c#n759
Yes it returns true. I have not installed any gedit plugins.
If you ifdef: #if 0 if (!show_menubar ()) { gtk_application_set_menubar (application, NULL); priv->hamburger_menu = get_menu_model (GEDIT_APP (application), "hamburger-menu"); } #endif Does it work for you?
Nope segfault. This is the backtrace:
+ Trace 236157
In _gedit_app_extend_menu is "model = gtk_application_get_menubar (GTK_APPLICATION (app));" NULL?
Yes
Created attachment 325528 [details] [review] Move menubar to menus-common This is needed because on ubuntu is needed from a traditional menu and on osx from a normal menu
Does this patch fix the problem for you?
Yep that looks good! Many thanks for this. I did notice that on exit the program segfaults with bt:
+ Trace 236158
Not so important obviously, but may be worth looking at at some point. Thanks again!
Thanks to you, can you make another bug report to track that other issue?
Attachment 325528 [details] pushed as fa144ab - Move menubar to menus-common
By the way: the use of the native OS X file chooser dialogs is awesome! Any plans to bring this into GtkFileChooserNative?