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 775439 - Catch AttributeError additionally to GLib.Error
Catch AttributeError additionally to GLib.Error
Status: RESOLVED INCOMPLETE
Product: meld
Classification: Other
Component: general
3.16.x
Other All
: Normal critical
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2016-12-01 02:18 UTC by Andrey Gursky
Modified: 2017-10-20 22:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (868 bytes, patch)
2016-12-01 02:21 UTC, Andrey Gursky
none Details | Review

Description Andrey Gursky 2016-12-01 02:18:23 UTC
Hi,

I've noticed a bug report on Debian with the following exception [1]

Traceback (most recent call last):
  • File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 72 in do_startup
    self.new_window()
  • File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 138 in new_window
    window = meldwindow.MeldWindow()
  • File "/usr/lib/python2.7/dist-packages/meld/meldwindow.py", line 266 in __init__
    self.widget.set_help_overlay(shortcut_window)
AttributeError: 'ApplicationWindow' object has no attribute 'set_help_overlay'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 78, in do_command_line
    tab = self.parse_args(command_line)
  File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 336, in parse_args
    focus=i == 0)
  File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 149, in open_files
    window = self.get_meld_window()
  File "/usr/lib/python2.7/dist-packages/meld/meldapp.py", line 144, in get_meld_window
    return self.get_active_window().meldwindow
AttributeError: 'NoneType' object has no attribute 'meldwindow'

I guess the the attached patch should fix the issue.

Thanks,
Andrey

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824603
Comment 1 Andrey Gursky 2016-12-01 02:21:08 UTC
Created attachment 341101 [details] [review]
Proposed fix
Comment 2 Kai Willadsen 2016-12-01 21:03:03 UTC
I'm sure your patch fixes this, but I don't see how this can happen in any sane, release version of GTK+. The line:

    shortcut_window = builder.get_object("shortcuts-meld")

should throw the GLib.Error being caught because it can't instantiate GtkShortcutsWindow. Best I can see, this traceback would require someone to have GtkShortcutsWindow but not set_help_overlay, but they were both included in the same stable release.

Also, checking the debian bug report, Meld depends on GTK+ (etc.) 3.20 already, which (to me) means that this really, really can't happen if the reporter has their install in a sane state.
Comment 3 Kai Willadsen 2017-10-20 22:59:22 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!