bugGnash - The GNU Flash player - Bugs: bug #20996, Curveball not replaced due to...

 
 

bug #20996: Curveball not replaced due to unloading during execution

Submitted by:  Benjamin Wolsey <bwy>
Submitted on:  Fri 07 Sep 2007 02:35:08 PM UTC  
 
Category: coreSeverity: 3 - Normal
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)

Mon 01 Oct 2007 04:38:28 PM UTC, comment #12:

The unload of character is triggered by a gotoLabel inside a DOACTION block. compare with feed.swf where it's a button record instead...

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 27 Sep 2007 08:13:00 AM UTC, comment #11:

This bug is closed again, I reintroduced the opcode guard using current target instead of original one (we need a test focused on this in our testsuite).

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 27 Sep 2007 06:55:29 AM UTC, comment #10:

NOTE: this is an SWF5 movie. Do we have tests for SWF5 opcode guard ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 27 Sep 2007 06:54:26 AM UTC, comment #9:

About opcode guard: the problem was:

27607] 08:50:00: DEBUG: Target of action_buffer (_level0.instance40) unloaded by execution of opcode:
PC:381 - EX: GotoLabel ("Serve")
Discarding 6 bytes of remaining opcodes:
PC:390 - EX: Play
PC:391 - EX: SetTarget ("")
PC:395 - EX: <End>

GotoLabel seems to have triggered unload of the sprite.
Still, it seems execution of at least 'play' was needed.
Maybe execution of DisplayList tags for jumps should
be queued as well ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 27 Sep 2007 06:50:52 AM UTC, comment #8:

Glad this works again...

The balls that indicate how many lives are left for each player don't function correctly - they are briefly correct at the end of each rally (when the ball is replaced), but then jump back up to five and then four. You can see balls being removed and it keeps a correct count of the lives, so it basically works - just a display problem. May be a different issue, but if you're going to look at the SWF anyway...

Then also this repeatedly at the end of the game, again a different issue:

22545] 08:43:55: UNIMPLEMENTED: FIXME: can't set _height on character with null or world bounds
22545] 08:43:55: UNIMPLEMENTED: FIXME: can't set _width on character with null or world bounds

Benjamin Wolsey <bwy>
Project Member
Thu 27 Sep 2007 01:51:02 AM UTC, comment #7:

For a record:
onClipInitialize, onClipConstruct, onClipOnload are immune to isUnloaded().
onClipEnterFrame is not.

To test other event handlers(key, mouse), we probably need cpp based testrunners.

We might need a seperate dir for cpp based testrunners. Compiling those files(when 'make check') cost me too much time.

> Fixed by dropping opcode-level unload guard.


Just mention that the internal reason might not be that way. Maybe fix some actions order would also fix this, since incorrect actions order would probably cause some unexpected unloaded characters.

Zou Lunkai <zoulunkai>
Wed 26 Sep 2007 08:53:19 PM UTC, comment #6:

Fixed by dropping opcode-level unload guard.

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

See bug #21069 as another example of failure introduced by the same change.

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

See bug #20974 for the rationale for the change being introduced.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 07 Sep 2007 03:04:45 PM UTC, comment #3:

Not really sure what this is about. It's probably a bit too much (sorry) but I hope it's what you mean. There are only actions in frame 20 of instance40.

Executing 1 tags in frame 20/20 of sprite /instance40
Executing 1 actions in frame 20/20 of sprite /instance40
at ActionExec operator() start, pc=0, stop_pc=396, code.size=396.
Stack:
Global registers (1): "[number:30.6146]" | "[undefined]" | "[undefined]" | "[undefined]"

PC:0 - EX: ActionConstantPool
[12]
0) "_parent"
1) "world"
2) "enemyLives"
3) "level"
4) "Level "
5) "levelNumber"
6) "score"
7) "bonusDisplay"
8) "playerLives"
9) "bonusScore"
10) ""
11) "bonusWord"

After execution, PC is 0.
Stack:
Global registers (1): "[number:30.6146]" | "[undefined]" | "[undefined]" | "[undefined]"

PC:108 - EX: ActionPushData

dict_lookup[0]

0) type=dict8 (0), value=[string:_parent]
After execution, PC is 108.
Stack: "[string:_parent]"
Global registers (1): "[number:30.6146]" | "[undefined]" | "[undefined]" | "[undefined]"

PC:113 - EX: ActionGetVariable

-- get var: _parent=[movieclip:_parent]
After execution, PC is 113.
Stack: "[movieclip:_parent]"
Global registers (1): "[number:30.6146]" | "[undefined]" | "[undefined]" | "[undefined]"

PC:114 - EX: ActionPushData

dict_lookup[1]

0) type=dict8 (1), value=[string:world]
After execution, PC is 114.
Stack: "[movieclip:_parent]" | "[string:world]"
Global registers (1): "[number:30.6146]" | "[undefined]" | "[undefined]" | "[undefined]"

PC:119 - EX: ActionGetMember

ActionGetMember: target: [movieclip:] (object 0x8d58c0)
-- get_member [movieclip:].[string:world]=[object(gnash::object_as_object):0x9f11e0]
After execution, PC is 119.
Stack: "[object(gnash::object_as_object):0x9f11e0]"
Global registers (1): "[number:30.6146]" | "[undefined]" | "[undefined]" | "[undefined]"

PC:120 - EX: ActionPushData

dict_lookup[2]

0) type=dict8 (2), value=[string:enemyLives]
After execution, PC is 120.
Stack: "[object(gnash::object_as_object):0x9f11e0]" | "[string:enemyLives]"
Global registers (1): "[number:30.6146]" | "[undefined]" | "[undefined]" | "[undefined]"

Benjamin Wolsey <bwy>
Project Member
Fri 07 Sep 2007 02:47:07 PM UTC, comment #2:

Although that is hardly surprising, since that's what it's supposed to do. It looks like it either shouldn't abort in that case (it worked before with an ERROR message) or it shouldn't be unloaded.

Benjamin Wolsey <bwy>
Project Member
Fri 07 Sep 2007 02:40:45 PM UTC, comment #1:

SWF version 5
md5sum 3acf7949fd19a21cd0a85c1fbcb2cf1f

It would probably be useful to encode into ExecutableCode what kind of action we're executing... anyway it seems like frame actions of that instance40, go find them....

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 07 Sep 2007 02:35:08 PM UTC, original submission:

curveball.swf doesn't replace the ball after the first time, giving the following messages:

13354] 14:49:49: Advance sprite '/bounds' at frame 0/1 - oldDIsplayList has 1 elements
13354] 14:49:49: Item 0 at depth -16375 (char id 6, name , type gnash::generic_character)
13354] 14:49:49: DEBUG: Target _level0.instance40 of action_buffer unloaded during execution, discarding 6 remaining opcodes
13354] 14:49:49: DEBUG: Sprite _level0.instance39 ignored ENTER_FRAME event (is unloaded)
13354] 14:49:49: DEBUG: Sprite _level0.enemyPaddle ignored ENTER_FRAME event (is unloaded)
13354] 14:49:49: DEBUG: Sprite _level0.playerLives ignored ENTER_FRAME event (is unloaded)
13354] 14:49:49: DEBUG: Sprite _level0.enemyLives ignored ENTER_FRAME event (is unloaded)
13354] 14:49:49: DEBUG: Sprite _level0.bonus ignored ENTER_FRAME event (is unloaded)
13354] 14:49:49: DEBUG: Sprite _level0.userPaddle ignored ENTER_FRAME event (is unloaded)
13354] 14:49:49: DEBUG: Sprite _level0.bonus won't check for user-defined LOAD event (didn't have a clipLoad event defined)
13354] 14:49:49: DEBUG: Sprite _level0.enemyLives won't check for user-defined LOAD event (didn't have a clipLoad event defined)
13354] 14:49:49: DEBUG: Sprite _level0.playerLives won't check for user-defined LOAD event (didn't have a clipLoad event defined)

This was introduced by a commit between 10:00 and 11:00 UTC on 2007-09-04:

  • server/vm/ActionExec.{cpp,h}: add an _abortOnUnload flag

for premature abortion of action buffers being executed,
always false for functions and true by default for
global code (overridable by a third optional constructor
argument). Check target for being unloaded (if _abortOnUnload)
at opcode-level.

  • server/vm/ExecutableCode.h (EventCode): set _abortOnUnload

to false when constructing ActionExec for event code.

Benjamin Wolsey <bwy>
Project Member

 

(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 (Posted a comment)
  • -unavailable- added by bwy (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 27 Sep 2007 08:13:00 AM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 26 Sep 2007 08:53:19 PM UTCstrkStatusNone=>Ready For Test
      Assigned toNone=>strk
    Fri 07 Sep 2007 02:47:07 PM UTCbwySummaryCurveball=>Curveball not replaced due to unloading during execution
    Fri 07 Sep 2007 02:40:45 PM UTCstrkCarbon-Copy-=>Added zoulunkai

    Back to the top


    Powered by Savane 3.1-cleanup1