Skip to content

clutter/actor-destroy: Check that destroying the actor clears the children

Marco Trevisan requested to merge 3v1n0/mutter:test-actor-destroy-fix into master

Commit df7d8e2c highlights a crash on test_destroy_destroy, in fact it could happen that calling clutter_actor_destroy on a child while iterating on the list, would implicitly call test_destroy_remove that tries to modify the list at the same time. Causing a memory error.

So instead of manually free the children list, just ensure that this list is valid and that when the object destruction is done, this is free'd.

See: !576 (merged)

!577 (closed)


This happens 100% of the times when using G_SLICE=debug-blocks or G_SLICE=always-malloc (and probably MALLOC_PERTURB_ and MALLOC_CHECK_ != 0.

Edited by Marco Trevisan

Merge request reports