Program terminates on context menu copy

Bug #1902160 reported by Tomasz Zeman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shutter
New
Undecided
Unassigned

Bug Description

The program terminates after copy of image using context menu.

This happen after copy of jpeg file, and one succuess paste into KolourPaint. Second attempt generated this error:

GLib-CRITICAL **: Source ID 383 was not found when attempting to remove it at /usr/bin/shutter line 7262.
The program 'shutter' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 23028 error_code 3 request_code 18 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Version 0.94
Rev.1290

Revision history for this message
Michael Kogan (michael-kogan) wrote :

Are you possibly using the Shutter snap?

Revision history for this message
Tomasz Zeman (namezis) wrote :

No. It is the one installed with Linux Mint 19.3 Cinnamon.

shutter (0.94-1) unstable; urgency=medium

Revision history for this message
Michael Kogan (michael-kogan) wrote :

Looks like it is a duplicate of https://bugs.launchpad.net/shutter/+bug/1880203

Revision history for this message
Tomasz Zeman (namezis) wrote :
Download full text (4.4 KiB)

Ok, let try this:

$ perl -MDebug::LTrace='*' ./shutter

[....]

fct_update_tray_menu was called by Gnome2::Wnck::Screen=HASH(0x5648f5e9fd90)
TRACE C: | /-main::fct_ret_window_menu() called at ./shutter line 6874 sub main::fct_update_tray_menu
TRACE R: | \_main::fct_ret_window_menu() returned: (bless( {}, 'Gtk2::Menu' )) in 0.000698 sec
TRACE R: \_main::fct_update_tray_menu(bless( {}, 'Gnome2::Wnck::Screen' )) [VOID] in 0.001124 sec
TRACE C: /-main::fct_update_info_and_tray() called at ./shutter line 7274 sub main::__ANON__
TRACE C: | /-main::fct_get_current_file() called at ./shutter line 7295 sub main::fct_update_info_and_tray
TRACE R: | \_main::fct_get_current_file() returned: ('[7] - Selection_999(283).png') in 0.000168 sec
TRACE R: \_main::fct_update_info_and_tray() [VOID] in 0.000725 sec
TRACE C: /-main::fct_update_tray_menu(bless( {}, 'Gnome2::Wnck::Screen' )) called at ./shutter line 2886 sub main::__ANON__

fct_update_tray_menu was called by Gnome2::Wnck::Screen=HASH(0x5648f5e9fd90)
TRACE C: | /-main::fct_ret_window_menu() called at ./shutter line 6874 sub main::fct_update_tray_menu
TRACE R: | \_main::fct_ret_window_menu() returned: (bless( {}, 'Gtk2::Menu' )) in 0.000799 sec
TRACE R: \_main::fct_update_tray_menu(bless( {}, 'Gnome2::Wnck::Screen' )) [VOID] in 0.001125 sec
TRACE C: /-main::evt_tab_button_press(bless( {}, 'Gtk2::EventBox' ),bless( do{\(my $o = '94871381411296')}, 'Gtk2::Gdk::Event::Button' ),'[7] - Selection_999(283).png') called at ./shutter line 2891 sub (eval)
TRACE C: | /-main::fct_ret_program_menu(bless( {}, 'Gtk2::Menu' )) called at ./shutter line 662 sub main::__ANON__
TRACE C: | | /-main::fct_get_current_file() called at ./shutter line 8873 sub main::fct_ret_program_menu
TRACE R: | | \_main::fct_get_current_file() returned: ('[7] - Selection_999(283).png') in 0.000292 sec
TRACE R: | \_main::fct_ret_program_menu(bless( {}, 'Gtk2::Menu' )) returned: (bless( {}, 'Gtk2::Menu' )) in 0.033924 sec
TRACE R: \_main::evt_tab_button_press(bless( {}, 'Gtk2::EventBox' ),bless( do{\(my $o = '94871381411296')}, 'Gtk2::Gdk::Event::Button' ),'[7] - Selection_999(283).png') returned: (1) in 0.038724 sec
TRACE C: /-main::fct_update_tray_menu(bless( {}, 'Gnome2::Wnck::Screen' )) called at ./shutter line 2886 sub main::__ANON__

fct_update_tray_menu was called by Gnome2::Wnck::Screen=HASH(0x5648f5e9fd90)
TRACE C: | /-main::fct_ret_window_menu() called at ./shutter line 6874 sub main::fct_update_tray_menu
TRACE R: | \_main::fct_ret_window_menu() returned: (bless( {}, 'Gtk2::Menu' )) in 0.000837 sec
TRACE R: \_main::fct_update_tray_menu(bless( {}, 'Gnome2::Wnck::Screen' )) [VOID] in 0.001409 sec
TRACE C: /-main::fct_clipboard(bless( {}, 'Gtk2::ImageMenuItem' ),'image') called at ./shutter line 2891 sub (eval)
TRACE C: | /-main::fct_get_current_file(bless( {}, 'Gtk2::ImageMenuItem' ),'image') called at ./shutter line 5781 sub main::fct_clipboard
TRACE R: | \_main::fct_get_current_file(bless( {}, 'Gtk2::ImageMenuItem' ),'image') returned: ('[7] - Selection_999(283).png') in 7.2e-05 sec
TRACE C: | /-main::fct_screenshot_exists('[7] - Selection_999(283).png') called at ./shutter line 5791 sub main::fct_clipboard
TRACE R: | \_main::fct...

Read more...

Revision history for this message
Tomasz Zeman (namezis) wrote :

I opened the image called "Selection_999(283).png".

It is a jpeg.

All these evt_tab_button_press are mouse clicks on the image. The program worked fine.

Then copy from the context menu, followed by crash.

It is always around the function: main::fct_show_status_message()

Revision history for this message
Tomasz Zeman (namezis) wrote :

I do not know much about perl or perl+Glib programming, but from this link:

https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-source-remove

we have:

It is a programmer error to attempt to remove a non-existent source.

More specifically: source IDs can be reissued after a source has been destroyed and therefore it is never valid to use this function with a source ID which may have already been removed. An example is when scheduling an idle to run in another thread with g_idle_add(): the idle may already have run and been removed by the time this function is called on its (now invalid) source ID. This source ID may have been reissued, leading to the operation being performed against the wrong source.

Glib::Idle->add() is called in several places. Could there be a problem?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.