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 661501 - clutter_container_add_actor: assertion `CLUTTER_IS_CONTAINER (container)' failed
clutter_container_add_actor: assertion `CLUTTER_IS_CONTAINER (container)' failed
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: General
unspecified
Other Linux
: Normal major
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks: 661500
 
 
Reported: 2011-10-11 22:30 UTC by Guillaume Desmottes
Modified: 2011-11-22 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2011-10-11 22:30:07 UTC
While working on bug #661500 I hit this crash.

I didn't look at it closely but I suspect that champlain is trying to use a container which have been destroyed before the async op completes.

Clutter-CRITICAL **: clutter_container_add_actor: assertion `CLUTTER_IS_CONTAINER (container)' failed

gdb) bt full
  • #0 g_logv
    at gmessages.c line 570
  • #1 g_log
    at gmessages.c line 591
  • #2 g_return_if_fail_warning
  • #3 clutter_container_add_actor
    at ./clutter-container.c line 228
  • #4 champlain_tile_display_content
    at ./champlain-tile.c line 900
  • #5 tile_rendered_cb
    at ./champlain-file-cache.c line 607
  • #6 _champlain_marshal_VOID__POINTER_UINT_BOOLEAN
    at champlain-marshal.c line 124
  • #7 g_closure_invoke
    at gclosure.c line 774
  • #8 signal_emit_unlocked_R
    at gsignal.c line 3272
  • #9 g_signal_emit_valist
    at gsignal.c line 3003
  • #10 g_signal_emit_by_name
    at gsignal.c line 3097
  • #11 render
    at ./champlain-image-renderer.c line 189
  • #12 champlain_renderer_render
    at ./champlain-renderer.c line 97
  • #13 file_loaded_cb
    at ./champlain-file-cache.c line 665
  • #14 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #15 load_contents_close_callback
    at gfile.c line 6264
  • #16 async_ready_close_callback_wrapper
  • #17 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #18 complete_in_idle_cb_for_thread
    at gsimpleasyncresult.c line 817
  • #19 g_idle_dispatch
    at gmain.c line 4801
  • #20 g_main_dispatch
    at gmain.c line 2441
  • #21 g_main_context_dispatch
    at gmain.c line 3011
  • #22 g_main_context_iterate
    at gmain.c line 3089
  • #23 g_main_loop_run
    at gmain.c line 3297
  • #24 gtk_main
    at gtkmain.c line 1362
  • #25 gtk_application_run_mainloop
    at gtkapplication.c line 115
  • #26 g_application_run
    at gapplication.c line 1323
  • #27 main
    at empathy.c line 841

Comment 1 Jiri Techet 2011-10-16 20:30:23 UTC
Hmm, I haven't been able to reproduce it but I confess I haven't had time to try your branch yet. Under what situation do you experience the crash? Can you reproduce it with libchamplain demos too or is it specific to your use?

I've also had a look at the code but everything seems to be OK there. From the trace it seems that priv->content_group doesn't exist when display_content() is called. But this container is only released when the whole tile is destroyed. You're right that the tiles are filled asynchronously but I have checked how they are filled and it appears that they are correctly reffed before starting the asynchronous operation so they shouldn't be destroyed before the operation completes.
Comment 2 Guillaume Desmottes 2011-10-17 07:48:09 UTC
It happens when moving the mouse over my contact list. Tooltips are quickly created/destroyed which I think trigger the crash.
Comment 3 Jiri Techet 2011-10-17 11:13:41 UTC
I see, you create/destroy the whole ChamplainView very quickly. At the moment we don't have a suitable demo for this use case - I'll create one and try to fix the crash. I guess it's because when the container with tiles gets destroyed, it calls clutter_actor_destroy() on the tiles inside which destroys them immediately no matter whether they have been reffed previously.
Comment 4 Jiri Techet 2011-11-21 12:25:08 UTC
I have finally found some time to have a look at it. 

The reason for the error were idle functions which were called after clutter_actor_destroy() was called on ChamplainView. Even though the view was reffed before the idle function to prevent its destruction, clutter_actor_destroy() calls dispose immediately so the references inside ChamplainView became NULL.

I've changed libchamplain to check whether the contained references are NULL in idle functions and if so, leave the idle function immediately.

Please test if this fixes the issue for you.
Comment 5 Guillaume Desmottes 2011-11-21 13:41:29 UTC
Yep that seems to work now, thanks!

Any plan to make a 0.13 release so Empathy can depend on it?
Comment 6 Jiri Techet 2011-11-22 18:31:13 UTC
I'm planning to make a bugfix 0.12.1 release soon so you could depend on that one. 

Actually I'm considering skipping the release of 0.14 this release cycle because unless I have more time (which seems very probable now), all the changes will be backwards-compatible fixes and improvements which can go to 0.12.