bugGnash - The GNU Flash player - Bugs: bug #28563, MovieClips lose custom class...

 
 

bug #28563: MovieClips lose custom class membership when containing MovieClip switches frames

Submitter:  Bernd Kischnick <kisch>
Submitted:  Tue 12 Jan 2010 02:47:23 PM UTC
   
 
Category:  ActionScript Severity:  3 - Normal
Release:  trunk Status:  Fixed
Privacy:  Public Assigned to:  bwy
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 23 Jun 2010 06:34:59 AM UTC, comment #7: 

I meant revision 12270.

Benjamin Wolsey <bwy>
Group Member
Wed 23 Jun 2010 06:33:18 AM UTC, comment #6: 

Should be fixed in trunk as of revision 12269.

Benjamin Wolsey <bwy>
Group Member
Fri 07 May 2010 01:31:51 PM UTC, comment #5: 

I've managed to reproduce something like it, but there are other bugs that make it difficult to tell where the problem is.

As a note: it seems that initaction tags referencing a non-existent character should not be executed, but Gnash does execute them.

Benjamin Wolsey <bwy>
Group Member
Thu 06 May 2010 07:14:51 AM UTC, comment #4: 

It might be related to bug #27050 too
where it's clear that 'unloading' and 'removing' a movieclip is a different thing.

For sure, that other bug reveals that there should be another
MovieClip (or DisplayObject?) state being "unloaded" but still
accessible as AS object (ready for a new .loadMovie, for example).

Bernd, does it sound as a possible reason ?

Sandro Santilli <strk>
Group Member
Mon 18 Jan 2010 02:16:01 PM UTC, comment #3: 

No, I don't think it's related to the looping.
The testcase SWF is a loop only because that's the simplest way to play the same frames multiple times.
The behaviour also occurs if the movie is stopped, and only switched between frames by scripted gotoAndStop() calls.

I've narrowed it down even more to the presence of an onUnload() method in the custom class. If the custom class doesn't contain the onUnload(), then the bug disappears.

If a MovieClip has an onUnload() method, then all implementations (gnash, swfdec, Adobe) seem to delay the destruction of the MovieClip script object by one frame.
When a MovieClip is present and accessible in one frame, and the timeline switches to an empty frame next, then the vanishing MovieClip still seems to be accessible as a script object, although it has disappeared visually.
I didn't find this behaviour documented anywhere, but all the players seem to agree on it.

But now gnash seems to get confused if you switch the timeline back to the frame where the MovieClip is "fully" present.

Bernd Kischnick <kisch>
Mon 18 Jan 2010 09:22:14 AM UTC, comment #2: 

It seems to be to do with the way Gnash loops after reaching the final frame, but I still haven't isolated it in a ming testcase.

Benjamin Wolsey <bwy>
Group Member
Wed 13 Jan 2010 09:52:34 AM UTC, comment #1: 

Thanks for the detailed bug report. We need to reproduce this in ming.

Benjamin Wolsey <bwy>
Group Member
Tue 12 Jan 2010 02:47:23 PM UTC, original submission:  

Attached is a testcase SWF file demonstrating the bug.
The SWF produces trace output in an endless loop.

Expected trace output (Adobe Player v10, swfdec 0.8.4):
2: [type Function]
1: [type Function]
2: [type Function]
1: [type Function]
... two lines repeating endlessly.

Observed trace output (gnash 0.8.5, gnash 0.8.6):
570:1208123072] 01:24:21 TRACE: 2: [type Function]                             
570:1208123072] 01:24:21 TRACE: 1: [type Function]                             
570:1208123072] 01:24:21 TRACE: 2: undefined                                   
570:1208123072] 01:24:21 TRACE: 1: [type Function]                             
... two lines repeating endlessly.
note that the first line "2:" is like expected, only the repetitions differ.

This is the test setup:
the stage contains a movieclip "mc".
This movieclip has 2 frames.
frame 1: an empty movieclip, name "Segments".
frame 2: an empty movieclip, name "Segments", with custom class "Bug".

The custom class has a function "myOnLoad".
Frame 1 of the toplevel timeline contains trace code:
onEnterFrame = function() {
trace(_level0.mc._currentframe + ": " + _level0.mc.Segments["myOnLoad"]);
};

The trace output indicates that the custom-class movieclip in frame 2 somehow loses its class membership after the containing movieclip leaves the frame.
I observed the bug in a larger flash project and stripped it down to the minimum necessary to trigger the behaviour.


Bernd Kischnick <kisch>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #19468:  bug.swf added by kisch (461B - application/x-shockwave-flash - bug.swf is the testcase, bug.fla the CS4 source, Bug.as the definition of the custom class.)
file #19469:  bug.fla added by kisch (118KiB - application/octet-stream - bug.swf is the testcase, bug.fla the CS4 source, Bug.as the definition of the custom class.)
file #19470:  Bug.as added by kisch (246B - application/octet-stream - bug.swf is the testcase, bug.fla the CS4 source, Bug.as the definition of the custom class.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by bwy (Posted a comment)
  • -email is unavailable- added by kisch (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-09 bwy StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2010-06-23 bwy StatusConfirmed Ready For Test
        Assigned toNone bwy
    2010-01-13 bwy Release0.8.5 release trunk
        StatusNone Confirmed
    2010-01-12 kisch Attached File- Added bug.swf, #19468
        Attached File- Added bug.fla, #19469
        Attached File- Added Bug.as, #19470

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code