gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Weird actionscript bug


From: Udo Giacomozzi
Subject: Re: [Gnash-dev] Weird actionscript bug
Date: Thu, 6 Dec 2007 17:19:02 +0100

Ok, after loosing the whole day fiddling with automated test cases I
could manage to produce a small test case that shows the problem.

I noticed that it only happens when:

- I jump to a different frame from within a setInterval handler
- movieclips in the target frame call a function of the parent
- that function calls another function

This would be the correct output:
-------------8<----------------------------------------------------
_level0.instance1 --> 1 =
_level0.instance1 --> 2 == / 1091
_level0.instance1 --> 3 === / 1091
_level0.instance1 --> 4 ====
_level0.instance3 --> 1 =
_level0.instance3 --> 2 == / 1091
_level0.instance3 --> 3 === / 1091
_level0.instance3 --> 4 ====
_level0.instance5 --> 1 =
_level0.instance5 --> 2 == / 1091
_level0.instance5 --> 3 === / 1091
_level0.instance5 --> 4 ====
-------------8<----------------------------------------------------


Instead, Gnash produces this:
-------------8<----------------------------------------------------
16018] 17:11:59: TRACE: _level0.instance1 --> 1 =
16018] 17:11:59: TRACE: _level0.instance3 --> 1 =
16018] 17:11:59: TRACE: _level0.instance5 --> 1 =
16018] 17:11:59: TRACE: _level0.instance5 --> 2 == / 1120
16018] 17:11:59: TRACE: _level0.instance5 --> 3 === / 1120
16018] 17:11:59: TRACE: _level0.instance5 --> 4 ====
16018] 17:11:59: TRACE: _level0.instance3 --> 2 == / 1119
16018] 17:11:59: TRACE: _level0.instance3 --> 3 === / 1120
16018] 17:11:59: TRACE: _level0.instance3 --> 4 ====
16018] 17:11:59: TRACE: _level0.instance1 --> 2 == / 1119
16018] 17:11:59: TRACE: _level0.instance1 --> 3 === / 1120
16018] 17:11:59: TRACE: _level0.instance1 --> 4 ====
-------------8<----------------------------------------------------


Code:
-------------8<----------------------------------------------------

// ### FRAME 1 ####################################################

function local_whatever() {
        return getTimer();
}

stop();

setInterval(
        function() {
                if (_currentframe!=1) return;
                
                gotoAndStop(3);
        }

        ,1000);

        
// ### FRAME 3 ####################################################

stop();

function init_me(obj) {
        trace(obj+" --> 1 =");
        trace(obj+" --> 2 == / "+local_whatever());
        trace(obj+" --> 3 === / "+local_whatever());
        trace(obj+" --> 4 ====");
}

// ### FRAME 1 OF MOVIECLIP #######################################

_parent.init_me(this);

-------------8<----------------------------------------------------


The compiled SWF file is attached.

I could not make a swfc-based Testcase as I don't know how to define
movieclips.


Zou suggested to remove ActionExec.cpp:470:

- VM::get().getRoot().flushHigherPriorityActionQueues();

This helps in this specific case but brings up other problems.
However, these other problems may be because of a buggy gotoAndPlay()
implementation, as Strk says (setting PLAY state after the jump).

I don't know enough about our VM to judge what is correct.

So, please, if someone can help me get this fixed I would greatly
appreciate. This bug is making me loose much time on a already
mission-impossible-timeline :-/

Thanks,
Udo

Attachment: init-order.swf
Description: application/shockwave-flash


reply via email to

[Prev in Thread] Current Thread [Next in Thread]