After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764046 - Gedit 3.20.0 on Mac OS X: no menubar
Gedit 3.20.0 on Mac OS X: no menubar
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
3.20.x
Other Mac OS
: Normal critical
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-22 20:35 UTC by Tom Schoonjans
Modified: 2016-04-07 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move menubar to menus-common (28.42 KB, patch)
2016-04-07 10:23 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review

Description Tom Schoonjans 2016-03-22 20:35:56 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
Comment 1 Tom Schoonjans 2016-04-01 08:38:27 UTC
Just installed 3.20.1. Now gedit just segfaults on startup after the 5 gtk-key-bindings warnings...
Comment 2 Ignacio Casal Quinteiro (nacho) 2016-04-01 08:40:30 UTC
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.
Comment 3 Tom Schoonjans 2016-04-01 08:44:06 UTC
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.
Comment 4 Tom Schoonjans 2016-04-01 08:50:22 UTC
Here is the backtrace:

  • #0 g_menu_model_get_n_items
    from /usr/local/opt/glib/lib/libgio-2.0.0.dylib
  • #1 ??
    from /usr/local/lib/gedit/libgedit.dylib
  • #2 ??
  • #3 ??
  • #4 ??
  • #5 ??
  • #6 ??
  • #7 ??
  • #8 ??


The gtk stack itself was not compiled with debugging symbols unfortunately: Homebrew currently does not support that :-(
Comment 5 Ignacio Casal Quinteiro (nacho) 2016-04-05 17:40:06 UTC
Fixed the theme parsing errors: https://git.gnome.org/browse/gedit/commit/?id=3a3db993d63b7d071e833695fb1fbb6863382ee8
Comment 6 Ignacio Casal Quinteiro (nacho) 2016-04-05 17:41:54 UTC
For the others, can you try to disable all the plugins before running gedit?
Comment 7 Ignacio Casal Quinteiro (nacho) 2016-04-06 06:47:46 UTC
Can you check if this returns true? https://git.gnome.org/browse/gedit/tree/gedit/gedit-app.c#n759
Comment 8 Tom Schoonjans 2016-04-06 13:49:49 UTC
Yes it returns true. I have not installed any gedit plugins.
Comment 9 Ignacio Casal Quinteiro (nacho) 2016-04-06 13:55:58 UTC
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?
Comment 10 Tom Schoonjans 2016-04-07 09:04:05 UTC
Nope segfault. This is the backtrace:

  • #0 g_menu_model_get_n_items
    from /usr/local/opt/glib/lib/libgio-2.0.0.dylib
  • #1 find_extension_point_section
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/libgedit.dylib
  • #2 _gedit_app_extend_menu
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/libgedit.dylib
  • #3 gedit_app_activatable_extend_menu
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/libgedit.dylib
  • #4 gedit_time_plugin_app_activate
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/plugins/libtime.so
  • #5 peas_extension_set_foreach
    from /usr/local/opt/libpeas/lib/libpeas-1.0.0.dylib
  • #6 gedit_app_startup
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/libgedit.dylib
  • #7 gedit_app_osx_startup
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/libgedit.dylib
  • #8 _g_closure_invoke_va
    from /usr/local/opt/glib/lib/libgobject-2.0.0.dylib
  • #9 g_signal_emit_valist
    from /usr/local/opt/glib/lib/libgobject-2.0.0.dylib
  • #10 g_signal_emit
    from /usr/local/opt/glib/lib/libgobject-2.0.0.dylib
  • #11 g_application_register
    from /usr/local/opt/glib/lib/libgio-2.0.0.dylib
  • #12 g_application_real_local_command_line
    from /usr/local/opt/glib/lib/libgio-2.0.0.dylib
  • #13 g_application_run
    from /usr/local/opt/glib/lib/libgio-2.0.0.dylib
  • #14 main

Comment 11 Ignacio Casal Quinteiro (nacho) 2016-04-07 09:14:58 UTC
In _gedit_app_extend_menu is "model = gtk_application_get_menubar (GTK_APPLICATION (app));" NULL?
Comment 12 Tom Schoonjans 2016-04-07 09:49:56 UTC
Yes
Comment 13 Ignacio Casal Quinteiro (nacho) 2016-04-07 10:23:43 UTC
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
Comment 14 Ignacio Casal Quinteiro (nacho) 2016-04-07 10:24:00 UTC
Does this patch fix the problem for you?
Comment 15 Tom Schoonjans 2016-04-07 10:57:14 UTC
Yep that looks good! Many thanks for this.


I did notice that on exit the program segfaults with bt:

  • #0 objc_msgSend
    from /usr/lib/libobjc.A.dylib
  • #1 -[NSNotificationCenter(NSNotificationCenterAppKitExtensions) _addObserver:notificationNamesAndSelectorNames:object:onlyIfSelectorIsImplemented:]
    from /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
  • #2 -[NSApplication setDelegate:]
    from /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
  • #3 -[GeditAppOSXDelegate release]
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/libgedit.dylib
  • #4 gedit_app_osx_finalize
    from /usr/local/Cellar/gedit/3.20.1/lib/gedit/libgedit.dylib
  • #5 g_object_unref
    from /usr/local/opt/glib/lib/libgobject-2.0.0.dylib
  • #6 main


Not so important obviously, but may be worth looking at at some point.

Thanks again!
Comment 16 Ignacio Casal Quinteiro (nacho) 2016-04-07 10:58:31 UTC
Thanks to you, can you make another bug report to track that other issue?
Comment 17 Ignacio Casal Quinteiro (nacho) 2016-04-07 10:59:22 UTC
Attachment 325528 [details] pushed as fa144ab - Move menubar to menus-common
Comment 18 Tom Schoonjans 2016-04-07 12:13:37 UTC
By the way: the use of the native OS X file chooser dialogs is awesome! 

Any plans to bring this into GtkFileChooserNative?