Wed 05 Sep 2007 06:26:55 AM UTC, comment #3:
> Committed a patch fixing this by always checking if execution of
>CONSTRUCT, LOAD or ENTERFRAME unloaded us.
If CONSTRUCT/LOAD/ENTERFRAME trigger any actions(eg. onClip handlers or user defined handlers exist), it's not surprising that the sprites might kill themselves. To solve this problem, all the event handlers should be queued to the global list, and guarded at opcode level.
|
Wed 05 Sep 2007 01:10:36 AM UTC, comment #2:
No problem, I still work on testing the related stuff.
>It looks like we're executing frame tags of an unloaded character,
>which in turn tries to move an already unloaded character.
This should not happen anyway. Placement tags should not have any chance to touch any unloaded or destroyed characters. If this happens, we have done something wrong in the higher level. eg. forget to shift unloaded characters or forget to destroy unloaded characters.
|
Tue 04 Sep 2007 08:32:01 PM UTC, original submission:
dlist.cpp:407: void gnash::DisplayList::move_display_object(int, const gnash::cxform, const gnash::matrix, int, int): Assertion `!ch->isUnloaded()' failed.
#3 0xb743143b in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7dbc8f5 in gnash::DisplayList::move_display_object (this=0x8efc224, depth=-16383, color_xform=0x8cb011c, mat=0x8cb013c, ratio=-1) at dlist.cpp:407
#5 0xb7d64de4 in gnash::sprite_instance::add_display_object (this=0x8efc160, character_id=2294, name=0x0, event_handlers=@0x8cb0168, depth=-16383,
color_transform=@0x8cb011c, mat=@0x8cb013c, ratio=-1, clip_depth=-1000000) at sprite_instance.h:421
#6 0xb7d826f2 in gnash::SWF::PlaceObject2Tag::execute (this=0x8cb0108, m=0x8efc160) at swf/PlaceObject2Tag.cpp:365
#7 0xb7d83908 in gnash::SWF::DisplayListTag::execute_state (this=0x8cb0108, m=0x8efc160) at swf/DisplayListTag.h:71
#8 0xb7d6506a in gnash::sprite_instance::execute_frame_tags (this=0x8efc160, frame=0, typeflags=2) at sprite_instance.cpp:2544
#9 0xb7d6558f in gnash::sprite_instance::restoreDisplayList (this=0x8efc160, tgtFrame=0) at sprite_instance.cpp:2484
#10 0xb7d6e550 in gnash::sprite_instance::advance_sprite (this=0x8efc160, delta_time=1) at sprite_instance.cpp:2321
#11 0xb7d62c3a in gnash::sprite_instance::advance (this=0x8efc160, delta_time=1) at sprite_instance.cpp:2423
#12 0xb7d6e5fa in gnash::sprite_instance::advance_sprite (this=0x8ef02f8, delta_time=1) at sprite_instance.cpp:1717
#13 0xb7d62c3a in gnash::sprite_instance::advance (this=0x8ef02f8, delta_time=1) at sprite_instance.cpp:2423
#14 0xb7d6e5fa in gnash::sprite_instance::advance_sprite (this=0x8264ca0, delta_time=1) at sprite_instance.cpp:1717
#15 0xb7d5990f in gnash::movie_instance::advance (this=0x8264ca0, delta_time=1) at movie_instance.cpp:92
#16 0xb7d59e0a in gnash::movie_root::advanceMovie (this=0x826d670, movie=@0xbfa31978, delta_time=1) at movie_root.cpp:1223
It looks like we're executing frame tags of an unloaded character, which in turn tries to move an already unloaded character.
IIRC the origin of all problem was an onEnterFrame unloading self or similar thing. My attempt to fix this in a clean way brought me to push all actions to the global list, which also fixed copter.swf "race condition". I'm still on it fixing other introduced problems.
A quick fix for this would be always checking isUnloaded() after calling on_event(). And giving up in that case (in advance_sprite, after executing ENTER_FrAME, for instance).
|