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

MainWindow.py:500:on_item_tree_popup_menu:AttributeError: 'NoneType' object has no attribute 'popup' #84

Open L-U-T-i opened 3 years ago

L-U-T-i commented 3 years ago

Expected behaviour

Mozo does not crash

Actual behaviour

Mozo crashed: MainWindow.py:500:on_item_tree_popup_menu:AttributeError: 'NoneType' object has no attribute 'popup'

Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/Mozo/MainWindow.py", line 500, in on_item_tree_popup_menu popup.popup(None, None, None, None, button, event_time) AttributeError: 'NoneType' object has no attribute 'popup'

Local variables in innermost frame: self: <Mozo.MainWindow.MainWindow object at 0x7f14882b7c10> item_tree: <Gtk.TreeView object at 0x7f14868baa80 (GtkTreeView at 0x55b523b6a7c0)> event: <Gdk.EventButton object at 0x7f1484747bd0 (void at 0x55b523e24010)> model: <Gtk.ListStore object at 0x7f1484996f80 (GtkListStore at 0x55b523d1dba0)> iter: <Gtk.TreeIter object at 0x7f148499f9a0 (GtkTreeIter at 0x55b523a14380)> button: 3 event_time: 17215070 info: (<Gtk.TreePath object at 0x7f148474ebe0 (GtkTreePath at 0x55b523e4d380)>, <Gtk.TreeViewColumn object at 0x7f1484748d40 (GtkTreeViewColumn at 0x55b523cb4df0)>, 137, 9) path: <Gtk.TreePath object at 0x7f148474ebe0 (GtkTreePath at 0x55b523e4d380)> col: <Gtk.TreeViewColumn object at 0x7f1484748d40 (GtkTreeViewColumn at 0x55b523cb4df0)> cellx: 137 celly: 9 popup: None

Steps to reproduce the behaviour

Don't remember to do anything unusual. Mozo crashed about a minute after clicked "Edit menu" and resized the opened window.

MATE general version

1.26.0

Package version

mozo-1.26.0-1.fc34.noarch

Linux Distribution

Fedora 34 x86_64

Link to bugreport of your Distribution (requirement)

Bug not reported.

raveit65 commented 3 years ago

Is it reproducible or only a one shot?

L-U-T-i commented 3 years ago

I managed to get crashes again. I'm almost sure a right click on an empty space below items in a right pane ("Items") after resizing it (resizing the window or moving a delimiter between both panes) is causing it.

How to reproduce:

  1. Right click on "Applications", click on "Edit Menus"
  2. Resize (increase the width / height) the opened window
  3. Right click at the empty space below the list of items in a right ("Items") pane
  4. (In case of no crash yet) move the delimiter between both panes ("Menus" | "Items") to the left
  5. Right click at the empty space below the list of items in a right ("Items") pane The crash is reported after some seconds, not immediately. In case of no crash, repeat 2, 3, 4 and 5...
raveit65 commented 2 years ago

Can you please test if this scratch build of mate-menus fixes the issue? https://koji.fedoraproject.org/koji/taskinfo?taskID=77341614

L-U-T-i commented 2 years ago

Sorry for a late feedback, I've been away for a while...

For now, I haven't been able to reproduce the issue. I hope it is resolved with that. I will repeat my test a couple of times later, and report if it shows again.

Thank you.

L-U-T-i commented 2 years ago

It seems I've been too quick, mozo crashed again...

Reason: MainWindow.py:500:on_item_tree_popup_menu:AttributeError: 'NoneType' object has no attribute 'popup'

Backtrace: MainWindow.py:500:on_item_tree_popup_menu:AttributeError: 'NoneType' object has no attribute 'popup'

Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/Mozo/MainWindow.py", line 500, in on_item_tree_popup_menu popup.popup(None, None, None, None, button, event_time) AttributeError: 'NoneType' object has no attribute 'popup'

Local variables in innermost frame: self: <Mozo.MainWindow.MainWindow object at 0x7f50ec4597c0> item_tree: <Gtk.TreeView object at 0x7f50e8dc4bc0 (GtkTreeView at 0x55ca8c5bc7c0)> event: <Gdk.EventButton object at 0x7f50e8d63900 (void at 0x55ca8c8dada0)> model: <Gtk.ListStore object at 0x7f50e8d43080 (GtkListStore at 0x55ca8c77b760)> iter: None button: 3 event_time: 2771347 info: None popup: None

rbuj commented 2 years ago

@L-U-T-i can you test if #75 fixes the bug?

raveit65 commented 2 years ago

......can you test if #75 fixes the bug?

Weird, bug description is about mozo.1.26 and your commit is already in 1.25 development release. So how should that fix the issue?

rbuj commented 2 years ago

@raveit65 it was reverted on #82

raveit65 commented 2 years ago

Not in fedora https://src.fedoraproject.org/rpms/mozo/commits/f34

raveit65 commented 2 years ago

@L-U-T-i Can you please test these builds from mozo and mate-menus? https://koji.fedoraproject.org/koji/taskinfo?taskID=77928563 https://koji.fedoraproject.org/koji/taskinfo?taskID=77928499

L-U-T-i commented 2 years ago

Tested, seems promissing. Tried to do as above about 5 times, no crash by now. Hope to remain like that (I will try to test during the day more, and report in case of another crash).

Thank you.

raveit65 commented 2 years ago

I just updated mozo for f34/35 https://bodhi.fedoraproject.org/updates/FEDORA-2021-03d559f6bf https://bodhi.fedoraproject.org/updates/FEDORA-2021-056f24bac1