GNOME Bugzilla – Bug 669743
ObjectInfo property is_actor not correctly set when updating existing actor using ClutterScriptParser
Last modified: 2014-12-15 17:16:13 UTC
Overview: ClutterScriptParser sets ObjectInfo property is_actor to FALSE even if object already exists in ClutterScript, see clutter-script-parser.c (function clutter_script_parser_object_end) After that, if ObjectInfo is not NULL, is_actor property is not updated in _clutter_script_construct_object and valid actor object becomes non-actor. In my case it resulted into that after two merges of the same actor into ClutterScript, setting actor's ObjectInfo property is_unmerged to TRUE didn't result in actor disappearing from stage, as soon as it didn't pass is_actor property check, and therefore clutter_actor_destroy for this actor wasn't called. Steps to Reproduce: Merge same object into ClutterScript twice. Set actor's ObjectInfo property is_unmerged to TRUE. Actual Results: clutter_actor_destroy on the specified actor wasn't called Expected Results: clutter_actor_destroy called on the specified actor Build Date & Platform: Build 2012-02-09 on Debian 6 kernel version 2.6.32-5-amd64
Created attachment 292715 [details] [review] script: Do not overwrite ObjectInfo fields When merging multiple definitions it's possible that the ObjectInfo fields may get overwritten. Instead of trampling over the fields, we should reset them only when they actually change — especially the "is_actor" one, which controls the destruction of the objects when unmerging happens.
Attachment 292715 [details] pushed as d005c6a - script: Do not overwrite ObjectInfo fields