Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Photon89 opened this issue Mar 27, 2023 · 0 comments · Fixed by #605
Closed

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

Photon89 opened this issue Mar 27, 2023 · 0 comments · Fixed by #605
Labels
bug Something isn't working

Comments

@Photon89
Copy link
Member

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 #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.

@Photon89 Photon89 added the bug Something isn't working label Mar 27, 2023
Photon89 added a commit that referenced this issue Aug 6, 2023
Move the error handling to an earlier point, which prevents the erroneous state after a zero width or height area screenshot. Actually, the error handling should be taken care of by the Shutter::Screenshot::Error module but it seems to fails for this particular error.
@Photon89 Photon89 linked a pull request Aug 6, 2023 that will close this issue
Photon89 added a commit that referenced this issue Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant