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 647677 - Seg Fault when applying effects in Gnome3
Seg Fault when applying effects in Gnome3
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
3.0.x
Other Linux
: High critical
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
: 649344 650388 652221 653839 yulys 657878 658628 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-13 17:04 UTC by Jens
Modified: 2011-09-09 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
trace (7.50 KB, text/plain)
2011-04-14 16:55 UTC, Jens
  Details
Fix crash when user selects an effect (1.13 KB, patch)
2011-05-02 11:16 UTC, Nuno Araujo (IRC: russo79)
none Details | Review
Here's a better patch. Rationale is in the commit message. (1.35 KB, patch)
2011-06-16 05:23 UTC, Cosimo Cecchi
committed Details | Review

Description Jens 2011-04-13 17:04:13 UTC
Choosing an effect ends with a seg fault.

(cheese:3074): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
Speicherzugriffsfehler
Comment 1 Akhil Laddha 2011-04-14 03:20:00 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Jens 2011-04-14 16:55:25 UTC
Created attachment 185968 [details]
trace

I attached the trace output, made with gdb.
Comment 3 Akhil Laddha 2011-04-15 03:42:05 UTC
Can you please install debuginfo packages of gstreamer, cheese, glib and clutter and provide us updated traces, tia.
Comment 4 Jens 2011-04-17 06:51:01 UTC
Uhh.. thats hard, in Archlinux are no *-dbg packages.
Comment 5 Marc Plano-Lesay 2011-04-18 12:58:06 UTC
Here's a stacktrace, cheese built from the git right now :
  • #0 strlen
    from /lib/libc.so.6
  • #1 g_strconcat
    at gstrfuncs.c line 322
  • #2 cheese_camera_element_from_effect
    at cheese-camera.c line 669
  • #3 cheese_camera_set_effect
    at cheese-camera.c line 708
  • #4 cheese_main_window_on_selected_effect_change
    at cheese-window.c line 1629
  • #5 _clutter_marshal_BOOLEAN__BOXED
    at clutter-marshal.c line 85
  • #6 g_closure_invoke
    at gclosure.c line 767
  • #7 signal_emit_unlocked_R
    at gsignal.c line 3256
  • #8 g_signal_emit_valist
    at gsignal.c line 2997
  • #9 g_signal_emit
    at gsignal.c line 3044
  • #10 clutter_actor_event
    at ./clutter-actor.c line 8086
  • #11 emit_event
    at ./clutter-main.c line 2189
  • #12 emit_pointer_event
    at ./clutter-main.c line 2216
  • #13 _clutter_process_event_details
    at ./clutter-main.c line 2513
  • #14 _clutter_process_event
    at ./clutter-main.c line 2552
  • #15 _clutter_stage_process_queued_events
    at ./clutter-stage.c line 730
  • #16 clutter_clock_dispatch
    at ./clutter-master-clock.c line 360
  • #17 g_main_dispatch
    at gmain.c line 2447
  • #18 g_main_context_dispatch
    at gmain.c line 3020
  • #19 g_main_context_iterate
    at gmain.c line 3098
  • #20 g_main_loop_run
    at gmain.c line 3306
  • #21 gtk_main
    at gtkmain.c line 1358
  • #22 g_application_run
    at gapplication.c line 1326
  • #23 _vala_main
    at cheese-main.c line 346
  • #24 __libc_start_main
    from /lib/libc.so.6
  • #25 _start

Comment 6 Akhil Laddha 2011-04-19 03:33:13 UTC
Thanks.
Comment 7 Paul W. Frields 2011-04-23 18:42:57 UTC
Something is not right about the generated C code here, cheese-window.c:1625:

        _tmp0_ = g_object_get_data ((GObject*) (*event).source, "effect");

I get a null (0x0) pointer for that in the debugger.  I'm not that good at C programming, and haven't been able to figure out what really should be happening there.  But (GObject*) (*event).source is a ClutterTexture, for what it's worth.
Comment 8 Nuno Araujo (IRC: russo79) 2011-05-02 11:16:12 UTC
Created attachment 187031 [details] [review]
Fix crash when user selects an effect

Hello
As said before by Paul W. Frieds, it seems that when the user clicks on an effect, the source of the event is the texture that shows the effect preview and not it's container (a ClutterBox).
Since the effect was "attached" to the container instead of the texture, the value read from the event source is null.

This patch "fixes" the problem by attaching the effect to the texture instead of the box.

Some questions remain:
1. Does the fact that now the texture references the effect and vice-versa can create a memory leak or does vala manages it correctly?
2. Is it normal that the source of the event is the texture, or is this a bug in clutter?
Comment 9 Nuno Araujo (IRC: russo79) 2011-05-02 11:27:57 UTC
For info, here are the installed versions of clutter in my computer:

clutter 1.6.14-1
clutter-gtk 1.0.0-1
clutter-gst 1.3.8-1
Comment 10 Cosimo Cecchi 2011-06-16 05:23:23 UTC
Created attachment 190012 [details] [review]
Here's a better patch. Rationale is in the commit message.

window: use the right signature for button-release-event callback

The signature is (ClutterActor, ClutterEvent). Using the event source
there is wrong, as that's not guaranteed to be the same object emitting
the callback (i.e. the object emitting could be just forwarding an event
coming from one of its children).
Comment 11 Luciana Fujii 2011-06-16 19:15:52 UTC
Review of attachment 190012 [details] [review]:

Thanks for the patch. Please, commit it to master and gnome-3-0.
Comment 12 Cosimo Cecchi 2011-06-16 19:50:57 UTC
Thanks, pushed.
Comment 13 Luciana Fujii 2011-06-16 20:09:28 UTC
*** Bug 652221 has been marked as a duplicate of this bug. ***
Comment 14 Luciana Fujii 2011-06-17 14:17:49 UTC
*** Bug 650388 has been marked as a duplicate of this bug. ***
Comment 15 Luciana Fujii 2011-06-20 17:17:59 UTC
*** Bug 649344 has been marked as a duplicate of this bug. ***
Comment 16 Luciana Fujii 2011-07-05 00:38:18 UTC
*** Bug 653839 has been marked as a duplicate of this bug. ***
Comment 17 Luciana Fujii 2011-08-02 01:07:32 UTC
*** Bug 655764 has been marked as a duplicate of this bug. ***
Comment 18 Luciana Fujii 2011-08-31 23:04:02 UTC
*** Bug 657878 has been marked as a duplicate of this bug. ***
Comment 19 Luciana Fujii 2011-09-09 14:59:35 UTC
*** Bug 658628 has been marked as a duplicate of this bug. ***