#940671 alacarte crashes on start with GNOME 3.34 installed

#940671#5
Date:
2019-09-18 19:51:39 UTC
From:
To:
Dear Maintainer,

whenever I attempt to start alacarte with GNOME 3.34 installed,
I get the following output:

$ alacarte
/usr/share/alacarte/Alacarte/MainWindow.py:22: PyGIWarning: GMenu was imported without specifying a version first. Use gi.require_version('GMenu', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GdkPixbuf, Gdk, GMenu

(alacarte:10516): Gtk-WARNING **: 21:44:38.368: Theme parsing error: gtk.css:6:20: The 'gtk-key-bindings' property has been renamed to '-gtk-key-bindings'

(alacarte:10516): Gtk-CRITICAL **: 21:44:38.386: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed

(alacarte:10516): Gtk-CRITICAL **: 21:44:38.386: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Traceback (most recent call last):
  File "/usr/bin/alacarte", line 26, in <module>
    main()
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 464, in main
    app.setMenuBasename(basename)
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 62, in setMenuBasename
    self.editor = MenuEditor(menu_basename)
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 36, in __init__
    self.load()
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 49, in load
    if not self.tree.load_sync():
gi.repository.GLib.Error: g-markup-error-quark: Errore alla riga 1 carattere 1: Il documento era vuoto oppure conteneva unicamente spazi (1)


The program then exits.

Cheers,
Matteo Settenvini

#940671#10
Date:
2019-09-22 15:59:37 UTC
From:
To:
Hi Matteo!

Can you please check if you have any empty .menu files in your
~/.config/menus/?

If there are empty files, please remove them and then alacarte should start
working properly.

Also did you use alacarte before? The old version of it was known to corrupt
the .menu files, see [1]. If it still corrupts them somehow, please let me
know how to reproduce it.

[1]: https://gitlab.gnome.org/GNOME/alacarte/issues/1