bugGnash - The GNU Flash player - Bugs: bug #20974, assertion failure while playing...

 
 

bug #20974: assertion failure while playing sonic.swf

Submitted by:  Sandro Santilli <strk>
Submitted on:  Tue 04 Sep 2007 08:32:01 PM UTC  
 
Category: coreSeverity: 4 - Important
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 26 Sep 2007 08:54:51 PM UTC, comment #6:

Dropping opcode-level unload guard didn't reintroduce the problem.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 26 Sep 2007 08:03:43 PM UTC, comment #5:

Another regression due to the same opcode guard:
bug #21069

The fix was surely overkill... I'm reopening this bug.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 07 Sep 2007 06:25:41 PM UTC, comment #4:

This implementation (opcode guard) seems to have introduced a regression in another movie. See bug #20996.

Sandro Santilli <strk>
Project MemberIn charge of this item.
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.

Zou Lunkai <zoulunkai>
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.

Zou Lunkai <zoulunkai>
Tue 04 Sep 2007 11:00:32 PM UTC, comment #1:

Committed a patch fixing this by always checking if execution of CONSTRUCT, LOAD or ENTERFRAME unloaded us. Would be better to have some tests for these cases in our testsuite. Zou ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
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).

Sandro Santilli <strk>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by zoulunkai (Posted a comment)
  • -unavailable- added by strk
  • -unavailable- added by strk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 26 Sep 2007 08:54:51 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 26 Sep 2007 08:03:43 PM UTCstrkStatusFixed=>Ready For Test
      Open/ClosedClosed=>Open
    Mon 10 Sep 2007 07:10:42 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue 04 Sep 2007 11:00:32 PM UTCstrkStatusIn Progress=>Ready For Test
    Tue 04 Sep 2007 08:32:01 PM UTCstrkCarbon-Copy-=>Added zoulunkai

    Back to the top


    Powered by Savane 3.1-cleanup1