gnome-screenshot fails to grab current window after 10 sec if right click window, grab whole Desktop instead

Bug #334156 reported by tdflanders
2
Affects Status Importance Assigned to Milestone
gnome-utils (Ubuntu)
Invalid
Low
Ubuntu Desktop Bugs

Bug Description

This bug is the opposite of:

https://bugs.launchpad.net/ubuntu/+source/gnome-utils/+bug/269888

thomas@thomas-laptop:~$ gdb gnome-screenshot 2>&1 | tee gdb-gnome-screenshot.txtGNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) set pagination 0
(gdb) set logging file gdb-gnome-screenshot.log
(gdb) set logging file on
(gdb) run --window --delay=10
Starting program: /usr/bin/gnome-screenshot --window --delay=10
[Thread debugging using libthread_db enabled]
[New Thread 0xb6d89700 (LWP 28377)]
[New Thread 0xb6c0bb90 (LWP 28582)]

** (gnome-screenshot:28377): WARNING **: Couldn't find window manager window
[New Thread 0xb59ddb90 (LWP 28583)]
[New Thread 0xb51dcb90 (LWP 28584)]
[New Thread 0xb49dbb90 (LWP 28586)]
[Thread 0xb59ddb90 (LWP 28583) exited]
[Thread 0xb51dcb90 (LWP 28584) exited]
[Thread 0xb6c0bb90 (LWP 28582) exited]
[New Thread 0xb6c0bb90 (LWP 28964)]
[New Thread 0xb51dcb90 (LWP 28965)]

Program exited normally.
(gdb) backtrace full
No stack.
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) set pagination 0
(gdb) set logging file gdb-gnome-screenshot.log
(gdb) set logging file on
(gdb) run --window --delay=10
Starting program: /usr/bin/gnome-screenshot --window --delay=10
[Thread debugging using libthread_db enabled]
[New Thread 0xb6de3700 (LWP 29905)]
[New Thread 0xb6c65b90 (LWP 30113)]

** (gnome-screenshot:29905): WARNING **: Couldn't find window manager window
[New Thread 0xb5b1db90 (LWP 30114)]
^C[New Thread 0xb51ffb90 (LWP 30116)]
[Thread 0xb6c65b90 (LWP 30113) exited]

Program received signal SIGINT, Interrupt.
[Switching to Thread 0xb6de3700 (LWP 29905)]
0xb804f430 in __kernel_vsyscall ()
(gdb) backtrace full
#0 0xb804f430 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb7506167 in poll () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2 0xb75e2c32 in g_main_context_iterate (context=0x955dc78, block=1, dispatch=1, self=0x9539688) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:3091
 max_priority = 2147483647
 timeout = -1
 some_ready = <value optimized out>
 nfds = 11
 allocated_nfds = <value optimized out>
 fds = (GPollFD *) 0x984f208
 __PRETTY_FUNCTION__ = "g_main_context_iterate"
#3 0xb75e32c2 in IA__g_main_loop_run (loop=0x957f9a8) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
 self = (GThread *) 0x9539688
 __PRETTY_FUNCTION__ = "IA__g_main_loop_run"
#4 0xb7abc309 in IA__gtk_main () at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
 tmp_list = (GList *) 0x0
 functions = (GList *) 0x0
 init = (GtkInitFunction *) 0x0
 loop = (GMainLoop *) 0x957f9a8
#5 0x0804e1ce in main (argc=3, argv=Cannot access memory at address 0xf
) at gnome-screenshot.c:1215
 program = (GnomeProgram *) 0x9541058
 context = <value optimized out>
 window_arg = 1
 include_border_arg = 0
 disable_border_arg = 0
 interactive_arg = 0
 border_effect_arg = (gchar *) 0x0
 delay_arg = 10
 entries = {{long_name = 0x80528fe "window", short_name = 119 'w', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0xbf950e54, description = 0x80524f8 "Grab a window instead of the entire screen", arg_description = 0x0}, {long_name = 0x8052777 "include-border", short_name = 98 'b', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0xbf950e50, description = 0x8052524 "Include the window border with the screenshot", arg_description = 0x0}, {long_name = 0x8052786 "remove-border", short_name = 66 'B', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0xbf950e4c, description = 0x8052554 "Remove the window border from the screenshot", arg_description = 0x0}, {long_name = 0x80528be "delay", short_name = 100 'd', flags = 0, arg = G_OPTION_ARG_INT, arg_data = 0xbf950e40, description = 0x8052584 "Take screenshot after specified delay [in seconds]", arg_description = 0x8052794 "seconds"}, {long_name = 0x805279c "border-effect", short_name = 101 'e', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0xbf950e44, description = 0x80525b8 "Effect to add to the border (shadow, border or none)", arg_description = 0x80527a3 "effect"}, {long_name = 0x80527aa "interactive", short_name = 105 'i', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0xbf950e48, description = 0x80527b6 "Interactively set options", arg_description = 0x0}, {long_name = 0x0, short_name = 0 '\0', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}}
 __PRETTY_FUNCTION__ = "main"
(gdb) info registers
eax 0xfffffdfc -516
ecx 0xb 11
edx 0xffffffff -1
ebx 0x984f208 159707656
esp 0xbf950bc4 0xbf950bc4
ebp 0xbf950be8 0xbf950be8
esi 0xffffffff -1
edi 0xb7588ff4 -1218932748
eip 0xb804f430 0xb804f430 <__kernel_vsyscall+16>
eflags 0x200246 [ PF ZF IF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) thread apply all backtrace

Thread 4 (Thread 0xb51ffb90 (LWP 30116)):
#0 0xb804f430 in __kernel_vsyscall ()
#1 0xb759a10b in read () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb75e063d in child_watch_helper_thread (data=0x0) at /usr/include/bits/unistd.h:45
#3 0xb760a02f in g_thread_create_proxy (data=0x985a010) at /build/buildd/glib2.0-2.18.2/glib/gthread.c:635
#4 0xb759350f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5 0xb7510a0e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread 0xb5b1db90 (LWP 30114)):
#0 0xb804f430 in __kernel_vsyscall ()
#1 0xb75973a2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb7d420bd in g_cond_timed_wait_posix_impl (cond=0xb5200e80, entered_mutex=0x80, abs_time=0x1) at /build/buildd/glib2.0-2.18.2/gthread/gthread-posix.c:242
#3 0xb75b9269 in g_async_queue_pop_intern_unlocked (queue=0x955e598, try=<value optimized out>, end_time=0xb5b1d334) at /build/buildd/glib2.0-2.18.2/glib/gasyncqueue.c:365
#4 0xb75b9367 in IA__g_async_queue_timed_pop (queue=0x955e598, end_time=0xb5b1d334) at /build/buildd/glib2.0-2.18.2/glib/gasyncqueue.c:491
#5 0xb760b633 in g_thread_pool_thread_proxy (data=0x9593820) at /build/buildd/glib2.0-2.18.2/glib/gthreadpool.c:121
#6 0xb760a02f in g_thread_create_proxy (data=0x95e6c28) at /build/buildd/glib2.0-2.18.2/glib/gthread.c:635
#7 0xb759350f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8 0xb7510a0e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb6de3700 (LWP 29905)):
#0 0xb804f430 in __kernel_vsyscall ()
#1 0xb7506167 in poll () from /lib/tls/i686/cmov/libc.so.6
#2 0xb75e2c32 in g_main_context_iterate (context=0x955dc78, block=1, dispatch=1, self=0x9539688) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:3091
#3 0xb75e32c2 in IA__g_main_loop_run (loop=0x957f9a8) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#4 0xb7abc309 in IA__gtk_main () at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
#5 0x0804e1ce in main (argc=3, argv=Cannot access memory at address 0xf
) at gnome-screenshot.c:1215
(gdb) quit
The program is running. Exit anyway? (y or n) y
thomas@thomas-laptop:~$

Revision history for this message
tdflanders (thomasdelbeke) wrote :
Revision history for this message
tdflanders (thomasdelbeke) wrote :

Note that this only works if process is interrupted with Ctrl+C, if instead cancel is pressed:

thomas@thomas-laptop:~$ gdb gnome-screenshot 2>&1 | tee gdb-gnome-screenshot.txtGNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) set pagination 0
(gdb) set logging file gdb-gnome-screenshot.log
(gdb) set logging on
Copying output to gdb-gnome-screenshot.log.
(gdb) run
Starting program: /usr/bin/gnome-screenshot
[Thread debugging using libthread_db enabled]
[New Thread 0xb6d9c700 (LWP 24181)]
[New Thread 0xb6c1eb90 (LWP 24372)]

** (gnome-screenshot:24181): WARNING **: Couldn't find window manager window
[New Thread 0xb59d2b90 (LWP 24391)]
[New Thread 0xb51d1b90 (LWP 24392)]
[New Thread 0xb49d0b90 (LWP 24394)]
[Thread 0xb59d2b90 (LWP 24391) exited]
[Thread 0xb6c1eb90 (LWP 24372) exited]
[New Thread 0xb6c1eb90 (LWP 24638)]

Program exited normally.
(gdb) backtrace full
No stack.
(gdb) info registers
The program has no registers now.
(gdb) thread apply all backtrace
No registers.
(gdb) quit

Revision history for this message
tdflanders (thomasdelbeke) wrote :

See screenshot:

the whole Desktop was grabbed instead of current window, which was the selected option.

Revision history for this message
tdflanders (thomasdelbeke) wrote :
Download full text (4.0 KiB)

These were the lines added to xsession-errors during the gdb sessions:

checking for valid crashreport now
checking for valid crashreport now
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

checking for valid crashreport now
checking for valid crashreport now
checking for valid crashreport now
checking for valid crashreport now

Previously I had:

(gnome-screenshot:20748): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

** (gnome-screenshot:20748): WARNING **: Couldn't find window manager window

(gnome-screenshot:20748): GLib-GIO-CRITICAL **: g_file_new_for_uri: assertion `uri != NULL' failed

(gnome-screenshot:20748): GLib-GIO-CRITICAL **: g_file_get_parent: assertion `G_IS_FILE (file)' failed

(gnome-screenshot:20748): GLib-GIO-CRITICAL **: g_file_get_basename: assertion `G_IS_FILE (file)' failed

(gnome-screenshot:20748): GLib-GIO-CRITICAL **: g_file_get_uri: assertion `G_IS_FILE (file)' failed

(gnome-screenshot:20748): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(gnome-screenshot:20748): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(gnome-screenshot:20748): Gtk-CRITICAL **: gtk_file_chooser_set_current_folder_uri: assertion `uri != NULL' failed

(gnome-screenshot:20748): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed

(gnome-screenshot:20748): GLib-CRITICAL **: g_strrstr_len: assertion `haystack != NULL' failed

(gnome-screenshot:21504): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

** (gnome-screenshot:21504): WARNING **: Couldn't find window manager window

(gnome-screenshot:21504): GLib-GIO-CRITICAL **: g_file_new_for_uri: assertion `uri != NULL' failed

(gnome-screenshot:21504): GLib-GIO-CRITICAL **: g_file_get_parent: assertion `G_IS_FILE (file)' failed

(gnome-screenshot:21504): GLib-GIO-CRITICAL **: g_file_get_basename: assertion `G_IS_FILE (file)' failed

(gnome-screenshot:21504): GLib-GIO-CRITICAL **: g_file_get_uri: assertion `G_IS_FILE (file)' failed

(gnome-screenshot:21504): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(gnome-screenshot:21504): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(gnome-screenshot:21504): Gtk-CRITICAL **: gtk_file_chooser_set_current_folder_uri: assertion `uri != NULL' failed

(gnome-screenshot:21504): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed

(gnome-screenshot:21504): GLib-CRITICAL **: g_strrstr_len: assertion `haystack != NULL' failed

(gnome-screenshot:21977): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

** (gnome-screenshot:21977): WARNING **: Couldn't find window manager window

(gnome-screenshot:21977): GLib-GIO-CRITICAL **: g_file_new_for_uri: assertion `uri != NULL' failed

(gnome-screenshot:21977): GLib-GIO-CRITICAL **: g_file_get_parent...

Read more...

Revision history for this message
tdflanders (thomasdelbeke) wrote :
Revision history for this message
tdflanders (thomasdelbeke) wrote :
Revision history for this message
Pedro Villavicencio (pedro) wrote :

there's no need to get a backtrace,strace or a valgrind log for such issues, those are only needed if the program crashes it only create noise and makes the report harder to read. thanks.

Changed in gnome-utils:
assignee: nobody → desktop-bugs
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

 * Is this reproducible?
 * If so, what specific steps should we take to recreate this bug?
 * What ubuntu version do you use?

 This will help us to find and resolve the problem.

Changed in gnome-utils:
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in gnome-utils (Ubuntu):
status: Incomplete → Invalid
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.