shutter-project / shutter

Screenshot tool for Linux
https://shutter-project.org/
GNU General Public License v3.0
503 stars 34 forks source link

Shutter is in unresponsive state after taking a zero size screenshot #570

Closed Photon89 closed 6 months ago

Photon89 commented 1 year ago

Brief summary of issue

When finishing the screenshot with a double click rather than clicking the enter key, and doing the double click outside of the selected area, the selection is reset and thus a screenshot with zero dimensions is taken. It then shows an error message, as in https://github.com/shutter-project/shutter/issues/487 However, after clicking the "Cancel" button in this error message, Shutter is in a state where only Dekstop capture is available while Selection and other modes, and also the tray icon menu, are disabled. However, if you then make a Desktop capture, the other modes get available again.

Steps to reproduce the issue

  1. Use the Selection mode the zero size area, e.g. by finishing with a double click outside of the selected area.
  2. Observe the error message and press the "Cancel" button.
  3. Observe that only the Desktop mode is available.

Error output

GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67.
 at /usr/share/shutter/resources/modules/Shutter/Screenshot/SelectorAdvanced.pm line 1001.
    Shutter::Screenshot::SelectorAdvanced::take_screenshot(Shutter::Screenshot::SelectorAdvanced=HASH(0x55e18fd70190), HASH(0x55e18f33fa70), Gtk3::Gdk::Pixbuf=HASH(0x55e18fc5b9f0)) called at /usr/share/shutter/resources/modules/Shutter/Screenshot/SelectorAdvanced.pm line 407
    Shutter::Screenshot::SelectorAdvanced::__ANON__(Gtk3::ImageView=HASH(0x55e18fc5baf8), Gtk3::Gdk::EventButton=SCALAR(0x55e18fb0a8e0)) called at /usr/share/perl5/vendor_perl/Gtk3.pm line 572
    eval {...} called at /usr/share/perl5/vendor_perl/Gtk3.pm line 572
    Gtk3::main("Gtk3") called at /usr/share/shutter/resources/modules/Shutter/Screenshot/SelectorAdvanced.pm line 712
    Shutter::Screenshot::SelectorAdvanced::select_advanced(Shutter::Screenshot::SelectorAdvanced=HASH(0x55e18fd70190)) called at /usr/bin/shutter line 6042
    Shutter::App::fct_take_screenshot(Gtk3::ToolButton=HASH(0x55e18f370c30), "select", undef, undef) called at /usr/bin/shutter line 3038
    Shutter::App::__ANON__() called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
    eval {...} called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
    Glib::Object::Introspection::__ANON__(Shutter::App=HASH(0x55e18e2e2a30)) called at /usr/bin/shutter line 10944
Use of uninitialized value $output in pattern match (m//) at /usr/share/shutter/resources/modules/Shutter/Screenshot/SelectorAdvanced.pm line 1018.
    Shutter::Screenshot::SelectorAdvanced::take_screenshot(Shutter::Screenshot::SelectorAdvanced=HASH(0x55e18fd70190), HASH(0x55e18f33fa70), Gtk3::Gdk::Pixbuf=HASH(0x55e18fc5b9f0)) called at /usr/share/shutter/resources/modules/Shutter/Screenshot/SelectorAdvanced.pm line 407
    Shutter::Screenshot::SelectorAdvanced::__ANON__(Gtk3::ImageView=HASH(0x55e18fc5baf8), Gtk3::Gdk::EventButton=SCALAR(0x55e18fb0a8e0)) called at /usr/share/perl5/vendor_perl/Gtk3.pm line 572
    eval {...} called at /usr/share/perl5/vendor_perl/Gtk3.pm line 572
    Gtk3::main("Gtk3") called at /usr/share/shutter/resources/modules/Shutter/Screenshot/SelectorAdvanced.pm line 712
    Shutter::Screenshot::SelectorAdvanced::select_advanced(Shutter::Screenshot::SelectorAdvanced=HASH(0x55e18fd70190)) called at /usr/bin/shutter line 6042
    Shutter::App::fct_take_screenshot(Gtk3::ToolButton=HASH(0x55e18f370c30), "select", undef, undef) called at /usr/bin/shutter line 3038
    Shutter::App::__ANON__() called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
    eval {...} called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
    Glib::Object::Introspection::__ANON__(Shutter::App=HASH(0x55e18e2e2a30)) called at /usr/bin/shutter line 10944
Parsing wildcards for $name_2023_03_27_15_38_17

fct_update_tray_menu was called by Wnck::Screen=HASH(0x55e18e2f9298)
New uri after exists check: /home/photon/Bilder/Shutter/.png
Trying to save file to /home/photon/Bilder/Shutter/.png
Saving file /home/photon/Bilder/Shutter/.png, png, 9
*** unhandled exception in callback:
***   Can't locate object method "message" via package "Can't call method "save" on an undefined value at /usr/share/shutter/resources/modules/Shutter/Pixbuf/Save.pm line 132.
***     eval {...} called at /usr/share/shutter/resources/modules/Shutter/Pixbuf/Save.pm line 132
***     Shutter::Pixbuf::Save::save_pixbuf_to_file(Shutter::Pixbuf::Save=HASH(0x55e18e2fb038), undef, "/home/photon/Bilder/Shutter/.png", "png", 9) called at /usr/bin/shutter line 6427
***     Shutter::App::fct_take_screenshot(Gtk3::ToolButton=HASH(0x55e18f370c30), "select", undef, undef) called at /usr/bin/shutter line 3038
***     Shutter::App::__ANON__() called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
***     eval {...} called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
***     Glib::Object::Introspection::__ANON__(Shutter::App=HASH(0x55e18e2e2a30)) called at /usr/bin/shutter line 10944
***   " (perhaps you forgot to load "Can't call method "save" on an undefined value at /usr/share/shutter/resources/modules/Shutter/Pixbuf/Save.pm line 132.
***     eval {...} called at /usr/share/shutter/resources/modules/Shutter/Pixbuf/Save.pm line 132
***     Shutter::Pixbuf::Save::save_pixbuf_to_file(Shutter::Pixbuf::Save=HASH(0x55e18e2fb038), undef, "/home/photon/Bilder/Shutter/.png", "png", 9) called at /usr/bin/shutter line 6427
***     Shutter::App::fct_take_screenshot(Gtk3::ToolButton=HASH(0x55e18f370c30), "select", undef, undef) called at /usr/bin/shutter line 3038
***     Shutter::App::__ANON__() called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
***     eval {...} called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
***     Glib::Object::Introspection::__ANON__(Shutter::App=HASH(0x55e18e2e2a30)) called at /usr/bin/shutter line 10944
***   "?) at /usr/share/shutter/resources/modules/Shutter/Pixbuf/Save.pm line 207.
***     Shutter::Pixbuf::Save::save_pixbuf_to_file(Shutter::Pixbuf::Save=HASH(0x55e18e2fb038), undef, "/home/photon/Bilder/Shutter/.png", "png", 9) called at /usr/bin/shutter line 6427
***     Shutter::App::fct_take_screenshot(Gtk3::ToolButton=HASH(0x55e18f370c30), "select", undef, undef) called at /usr/bin/shutter line 3038
***     Shutter::App::__ANON__() called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
***     eval {...} called at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67
***     Glib::Object::Introspection::__ANON__(Shutter::App=HASH(0x55e18e2e2a30)) called at /usr/bin/shutter line 10944
***  ignoring at /usr/lib/perl5/5.36/vendor_perl/Glib/Object/Introspection.pm line 67.
 at /usr/bin/shutter line 10944.

Extra information, such as Shutter version, display server in use (Xorg or Wayland), operating system and ideas for how to solve:

Shutter 0.99.3 on Manjaro Linux, running Xorg.