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 656886 - Dragging preview crashes empathy-call
Dragging preview crashes empathy-call
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: VoIP
unspecified
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-19 10:09 UTC by Jonny Lamb
Modified: 2011-08-30 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
CallWindow: destroy the preview clone when restarting the pipeline (3.20 KB, patch)
2011-08-30 15:07 UTC, Emilio Pozuelo Monfort
committed Details | Review

Description Jonny Lamb 2011-08-19 10:09:43 UTC
(empathy-call:30835): Clutter-CRITICAL **: clutter_actor_meta_get_actor: assertion `CLUTTER_IS_ACTOR_META (meta)' failed

(empathy-call:30835): GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'

(empathy-call:30835): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(empathy-call:30835): Clutter-CRITICAL **: clutter_actor_meta_get_actor: assertion `CLUTTER_IS_ACTOR_META (meta)' failed

(empathy-call:30835): GLib-GObject-WARNING **: instance of invalid non-instantiatable type `(null)'

(empathy-call:30835): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

Program received signal SIGSEGV, Segmentation fault.
_clutter_stage_set_motion_events_enabled (stage=0x0, enabled=1) at ./clutter-stage.c:3483
3483	./clutter-stage.c: No such file or directory.
	in ./clutter-stage.c
(gdb) bt
  • #0 _clutter_stage_set_motion_events_enabled
    at ./clutter-stage.c line 3483
  • #1 emit_drag_end
    at ./clutter-drag-action.c line 233
  • #2 on_captured_event
    at ./clutter-drag-action.c line 271
  • #3 _clutter_marshal_BOOLEAN__BOXED
    at clutter-marshal.c line 85
  • #4 g_closure_invoke
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gclosure.c line 767
  • #5 signal_emit_unlocked_R
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gsignal.c line 3322
  • #6 g_signal_emit_valist
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gsignal.c line 2993
  • #7 g_signal_emit
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gobject/gsignal.c line 3040
  • #8 clutter_actor_event
    at ./clutter-actor.c line 8040
  • #9 _clutter_process_event_details
    at ./clutter-main.c line 2417
  • #10 _clutter_process_event
    at ./clutter-main.c line 2552
  • #11 _clutter_stage_process_queued_events
    at ./clutter-stage.c line 730
  • #12 clutter_clock_dispatch
    at ./clutter-master-clock.c line 360
  • #13 g_main_dispatch
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 2440
  • #14 g_main_context_dispatch
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 3013
  • #15 g_main_context_iterate
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 3091
  • #16 g_main_loop_run
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./glib/gmain.c line 3299
  • #17 gtk_main
    at /scratch/build-area/gtk+3.0-3.0.8/./gtk/gtkmain.c line 1358
  • #18 g_application_run
    at /build/buildd-glib2.0_2.28.6-2-amd64-N0qtaT/glib2.0-2.28.6/./gio/gapplication.c line 1322
  • #19 main
    at empathy-call.c line 180

Comment 1 Jonny Lamb 2011-08-19 10:21:22 UTC
I should have mentioned that this crash happens when releasing the preview onto a new location.
Comment 2 Emilio Pozuelo Monfort 2011-08-19 11:37:14 UTC
Is this reproducible? Dragging the preview always works for me. I've tried both clutter 1.6 and master.

Would be good to get a backtrace on the first warning.
Comment 3 Jonny Lamb 2011-08-19 12:47:59 UTC
Here are backtraces for all the warnings. (Note that I actually broke on g_logv so that the actual messages are printed after the backtrace).

http://paste.debian.net/126712/
Comment 4 Jonny Lamb 2011-08-19 13:52:04 UTC
1. Make a call you know is going to fail or you know will be rejected.

2. Whilst connecting, start dragging the preview but just keep dragging it and wait.

3. The call fails or is rejected.

4. Let go of your left mouse button. If you wait and don't let go you get more warnings but the outcome is still a segfault.

For the record, the warning is this:

(empathy-call:20678): Clutter-WARNING **: Attempting to map a child that does not meet the necessary invariants: the actor 'EmpathyRoundedTexture' has no parent

So, it looks like it breaks because you're destroy the actor when the call ends which is in the process of being dragged around. 

Come to think of it, you can reproduce this by making a successful call, then just getting the other side to hang up while you're half-way through dragging the preview.
Comment 5 Emilio Pozuelo Monfort 2011-08-30 09:29:16 UTC
This is a clutter bug. I've opened bug #657681 for it.

If it isn't fixed for 3.2, we can workaround this by hiding (not destroying) the preview in reset_pipeline(), though this will leak a bunch of actors.
Comment 6 Emilio Pozuelo Monfort 2011-08-30 15:07:51 UTC
Created attachment 195214 [details] [review]
CallWindow: destroy the preview clone when restarting the pipeline
Comment 7 Emilio Pozuelo Monfort 2011-08-30 15:10:55 UTC
There are two bugs here: one is the clutter one, which is fixed in git master and fixes the crash, and an Empathy one which is caused because we don't get ::drag-end when destroying the preview in the middle of a drag, so we need to destroy the drag handle in that case. The attached patch fixes the Empathy bug.
Comment 8 Guillaume Desmottes 2011-08-30 15:16:04 UTC
Review of attachment 195214 [details] [review]:

::: src/empathy-call-window.c
@@ +879,3 @@
   gfloat rel_x, rel_y;
 
+  self->priv->drag_preview = clutter_clone_new (actor);

Is it guaranteed that self->priv->drag_preview is NULL here?
Comment 9 Emilio Pozuelo Monfort 2011-08-30 15:19:54 UTC
(In reply to comment #8)
> Review of attachment 195214 [details] [review]:
> 
> ::: src/empathy-call-window.c
> @@ +879,3 @@
>    gfloat rel_x, rel_y;
> 
> +  self->priv->drag_preview = clutter_clone_new (actor);
> 
> Is it guaranteed that self->priv->drag_preview is NULL here?

Yes, because you can't drag the preview twice at the same time. So either drag-end has been called and thus drag_preview = NULL, or reset_pipeline() has been called and we destroy and set it to NULL there too.

I can add a g_assert or g_warn_if_fail if you want.
Comment 10 Emilio Pozuelo Monfort 2011-08-30 15:23:48 UTC
Attachment 195214 [details] pushed as 61fd1d9 - CallWindow: destroy the preview clone when restarting the pipeline