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 671110 - When taking a photo, Cheese gets stuck after the countdown and no photo is taken
When taking a photo, Cheese gets stuck after the countdown and no photo is taken
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Delegates
0.15.x
Other Linux
: Normal major
: ---
Assigned To: Vala maintainers
Vala maintainers
: 671782 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-03-01 10:17 UTC by Vadim Rutkovsky
Modified: 2012-03-21 16:38 UTC
See Also:
GNOME target: 3.4
GNOME version: ---


Attachments
patch to avoid the problem (1.37 KB, patch)
2012-03-19 23:14 UTC, Matthias Clasen
accepted-commit_after_freeze Details | Review

Description Vadim Rutkovsky 2012-03-01 10:17:52 UTC
Original report: https://bugs.launchpad.net/ubuntu/+source/cheese/+bug/942238

DistroRelease: Ubuntu 12.04
Package: cheese 3.3.90-0ubuntu1

"Today I noticed on my Precise laptop that when using Cheese to try to take a photo, it would countdown, then just get "stuck" when it is supposed to take the picture. It still shows video from the webcam, but all the buttons and most of the menu entries gray out and stay that way until Cheese is closed and restarted.

Running cheese from a terminal shows the following error message after the countdown ends:
** CRITICAL **: cheese_main_window_finish_countdown_callback: assertion `self != NULL' failed

Taking multiple photos in a burst causes Cheese to show multiple countdowns, but can still be interacted with normally. No pictures are actually taken here, either, but it doesn't end up stuck like it would with a single photo.

Recording video still works perfectly."
Comment 1 David King 2012-03-01 11:26:15 UTC
I cannot reproduce this, and that assertion should never be false, as it is from a function internal to the MainWindow class. The only problem that I can imagine is a threading problem. Please provide a backtrace, breaking on cheese_main_window_finish_countdown_callback.
Comment 2 Vadim Rutkovsky 2012-03-04 15:58:21 UTC
Backtrace (also available at https://launchpadlibrarian.net/95241753/gdb-cheese.txt):
[New Thread 0xb0e42b40 (LWP 4591)]

** CRITICAL **: cheese_main_window_finish_countdown_callback: assertion `self != NULL' failed
[New Thread 0xadd4ab40 (LWP 4592)]
[New Thread 0xad549b40 (LWP 4593)]
[New Thread 0xb02bbb40 (LWP 4597)]
[New Thread 0xac9d7b40 (LWP 4598)]

Program received signal SIGINT, Interrupt.
0xb4df6471 in ?? () from /usr/lib/fglrx/dri/fglrx_dri.so
(gdb) backtrace full

Seems to be a problem is in ATI drivers
Comment 3 Vadim Rutkovsky 2012-03-05 06:46:23 UTC
My apologies, I've sent an incorrect backtrace.
Here is the right one (from https://launchpadlibrarian.net/95302356/gdb-cheese.txt):

Starting program: /usr/bin/cheese 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe9252700 (LWP 5241)]
[New Thread 0x7fffe8849700 (LWP 5242)]

Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkToggleButton, but as a GtkBin subclass a GtkToggleButton can only contain one widget at a time; it already contains a widget of type GtkLabel

Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkToggleButton, but as a GtkBin subclass a GtkToggleButton can only contain one widget at a time; it already contains a widget of type GtkLabel

Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkToggleButton, but as a GtkBin subclass a GtkToggleButton can only contain one widget at a time; it already contains a widget of type GtkLabel

Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkButton, but as a GtkBin subclass a GtkButton can only contain one widget at a time; it already contains a widget of type GtkLabel

Gtk-WARNING **: Attempting to add a widget with type GtkGrid to a GtkToggleButton, but as a GtkBin subclass a GtkToggleButton can only contain one widget at a time; it already contains a widget of type GtkLabel

Gtk-WARNING **: Attempting to add a widget with type GtkImage to a GtkButton, but as a GtkBin subclass a GtkButton can only contain one widget at a time; it already contains a widget of type GtkLabel
[New Thread 0x7fffe28d7700 (LWP 5243)]

** CRITICAL **: cheese_main_window_finish_countdown_callback: assertion `self != NULL' failed
[New Thread 0x7fffcffff700 (LWP 5244)]
[New Thread 0x7fffcf7fe700 (LWP 5245)]

Program received signal SIGINT, Interrupt.
0x00007ffff5051d93 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
87	../sysdeps/unix/sysv/linux/poll.c: No such file or directory.

  • #0 __GI___poll
    at ../sysdeps/unix/sysv/linux/poll.c line 87
  • #1 g_main_context_poll
    at /build/buildd/glib2.0-2.31.18/./glib/gmain.c line 3412
  • #2 g_main_context_iterate
    at /build/buildd/glib2.0-2.31.18/./glib/gmain.c line 3113
  • #3 g_main_context_iterate
    at /build/buildd/glib2.0-2.31.18/./glib/gmain.c line 3055
  • #4 g_main_context_iteration
    at /build/buildd/glib2.0-2.31.18/./glib/gmain.c line 3179
  • #5 g_application_run
    at /build/buildd/glib2.0-2.31.18/./gio/gapplication.c line 1496
  • #6 _vala_main
    at src/cheese-main.c line 478
  • #7 __libc_start_main
    at libc-start.c line 226
  • #8 _start

Comment 4 David King 2012-03-10 17:28:58 UTC
*** Bug 671782 has been marked as a duplicate of this bug. ***
Comment 5 Oleksij Rempel 2012-03-17 18:31:50 UTC
David, i can reproduce it with source package from ubuntu.
the fix is simple. Just remove all *.c file in src dir.

rm src/*.c
and compile it again.

I think we should add it to "make clean"
Comment 6 Oleksij Rempel 2012-03-18 08:42:00 UTC
my bad. "make maintainer-clean-generic" doing that.
Comment 7 Arthur Kozek 2012-03-18 20:36:09 UTC
I can confirm this big with ubuntu 12.04 amd64 and all latest updates.
Comment 8 Luciana Fujii 2012-03-19 03:32:37 UTC
From what I understand, this happens in the bug in Ubuntu package only. Since it is already reported in Ubuntu, I will close it. Feel free to reopen if needed.
Comment 9 Matthias Clasen 2012-03-19 23:13:56 UTC
Not an Ubuntu specific bug. It happens on F17 as well. The problem is bad code generated by vala.
Comment 10 Matthias Clasen 2012-03-19 23:14:32 UTC
Created attachment 210122 [details] [review]
patch to avoid the problem
Comment 11 David King 2012-03-20 07:00:01 UTC
Comment on attachment 210122 [details] [review]
patch to avoid the problem

Matthias, thanks for finding the problem! I am not sure if this classifies as a ‘simple build fix’:

http://live.gnome.org/ReleasePlanning/Freezes#Hard_Code_Freeze

so should I ask for a freeze break?
Comment 12 Matthias Clasen 2012-03-20 10:06:19 UTC
asking can't hurt, since we're officially in 'hard code freeze' territory now - but I can't see anybody objecting to making cheese actually take photos...
Comment 13 David King 2012-03-20 17:43:57 UTC
On further investigation, the invalid code generation only occurs with Vala 0.15, and I created the Cheese 3.3.92 tarball with Vala 0.14.2, thus working around this problem for the moment. I will make the 3.4.0 release with Vala 0.14.2 as well, and then push the patch as an improved workaround.
Comment 14 Jürg Billeter 2012-03-21 16:36:33 UTC
(In reply to comment #9)
> Not an Ubuntu specific bug. It happens on F17 as well. The problem is bad code
> generated by vala.

(In reply to comment #10)
> Created an attachment (id=210122) [details] [review]
> patch to avoid the problem

Thanks for tracking this down. Moving bug to vala.
Comment 15 Jürg Billeter 2012-03-21 16:38:00 UTC
commit 7b14d21a881902e19f43efdeae1bfbf3b22db859
Author: Jürg Billeter <j@bitron.ch>
Date:   Wed Mar 21 17:31:04 2012 +0100

    codegen: Fix delegate target C name for static fields
    
    Fixes bug 671110.