mate-desktop / mozo

Menu editor for MATE using the freedesktop.org menu specification
http://www.mate-desktop.org
GNU Lesser General Public License v2.1
28 stars 12 forks source link

Mozo crashed on adding and removing Separator item #80

Closed N0rbert closed 3 years ago

N0rbert commented 3 years ago

Expected behaviour

Actual behaviour

$ mozo 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 91, in menuChanged
    self.loadUpdates()
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 102, in loadUpdates
    if iter and items[iter][3].get_desktop_file_path():
AttributeError: 'TreeSeparator' object has no attribute 'get_desktop_file_path'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 91, in menuChanged
    self.loadUpdates()
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 102, in loadUpdates
    if iter and items[iter][3].get_desktop_file_path():
AttributeError: 'TreeSeparator' object has no attribute 'get_desktop_file_path'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 91, in menuChanged
    self.loadUpdates()
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 102, in loadUpdates
    if iter and items[iter][3].get_desktop_file_path():
AttributeError: 'TreeSeparator' object has no attribute 'get_desktop_file_path'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 91, in menuChanged
    self.loadUpdates()
  File "/usr/lib/python3/dist-packages/Mozo/MainWindow.py", line 102, in loadUpdates
    if iter and items[iter][3].get_desktop_file_path():
AttributeError: 'TreeSeparator' object has no attribute 'get_desktop_file_path'

Steps to reproduce the behaviour

  1. Install Ubuntu MATE 21.04 alpha
  2. Launch Main Menu from the terminal with mozo
  3. Place cursor on any menu item, click New Separator
  4. Click on just created separator item to remove it with Delete

MATE general version

1.24.1

Package version

1.24.0-1

Linux Distribution

Ubuntu MATE 21.04

Link to bugreport of your Distribution (requirement)

https://bugs.launchpad.net/ubuntu/+source/mozo/+bug/1864445 since Ubuntu MATE 20.04 LTS

lukefromdc commented 3 years ago

I can confirm the main issue here on recent git master, though we should not call it a CRASH because mozo both remains open and remains able to do other work(I tested this). This job simply fails

Note that some of the time in my test the separator actually was removed from the menu though this is not displayed in Mozo, and sometimes it wasn't removed at all. Mozo's window stayed open (Mozo didn't close all the way) but the change was either not applied or not seen, and I got the flurry of warnings. In no case did the window close, but Mozo failed to do its job.