GNOME Bugzilla – Bug 661501
clutter_container_add_actor: assertion `CLUTTER_IS_CONTAINER (container)' failed
Last modified: 2011-11-22 18:31:13 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
+ Trace 228753
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.
It happens when moving the mouse over my contact list. Tooltips are quickly created/destroyed which I think trigger the crash.
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.
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.
Yep that seems to work now, thanks! Any plan to make a 0.13 release so Empathy can depend on it?
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.