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 669743 - ObjectInfo property is_actor not correctly set when updating existing actor using ClutterScriptParser
ObjectInfo property is_actor not correctly set when updating existing actor u...
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterScript
1.7.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-09 11:58 UTC by Maxim K
Modified: 2014-12-15 17:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
script: Do not overwrite ObjectInfo fields (3.17 KB, patch)
2014-12-14 23:18 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Maxim K 2012-02-09 11:58:03 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
Comment 1 Emmanuele Bassi (:ebassi) 2014-12-14 23:18:29 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2014-12-15 17:15:57 UTC
Attachment 292715 [details] pushed as d005c6a - script: Do not overwrite ObjectInfo fields