bugGnash - The GNU Flash player - Bugs: bug #25081, Enumeration failures

 
 

bug #25081: Enumeration failures

Submitted by:  None
Submitted on:  Sat 13 Dec 2008 03:42:26 AM UTC  
 
Category: ActionScriptSeverity: 3 - Normal
Release: trunkStatus: Fixed
Privacy: PublicAssigned to: None
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)

Fri 10 Jul 2009 06:04:34 AM UTC, comment #12:

It was purely an enumeration problem because of the weird way haxe finds member objects and functions.

Benjamin Wolsey <bwy>
Project Member
Wed 20 May 2009 09:35:35 PM UTC, comment #11:

Just as confirmation of some kind, as of 10894, I can run a haxe produced test cases, using swf versions up to v8, and they now work fine, assuming it's actually implemented. I just checked in a test case (Mouse class) to testsuite/as3/classes/ui, that works with Gnash up to v8. The v9 version still currently fails, but I think that's a different bug.

While this doesn't apply directly to the BitmapData problem, the stack issue appears to be fixed.

Rob Savoye <rsavoye>
Project Administrator
Wed 20 May 2009 12:00:02 PM UTC, comment #10:

This failed due to certain objects not being enumerated, which the haxe bytecode relies on (I'm still not really sure how). For instance, It calls MovieClip.attachBitmap without directly referring to it. But the voodoo also works in Gnash, and this should be fixed as of revision 10894.

I guess the anonymous reporter won't respond, so any other confirmation would be helpful.

Benjamin Wolsey <bwy>
Project Member
Fri 26 Dec 2008 09:39:09 AM UTC, comment #9:

Not really sure about feature requests. Anyway, this is now a real bug, but not one to do with attachBitmap, which is now implemented in trunk and will work (though only for BitmapData.fillRect()) when compiled with makeswf or the Adobe compiler.

By the way, any patches for improvements to BitmapData and the new Bitmap character class are welcome, as it's not very attractive right now.

Benjamin Wolsey <bwy>
Project Member
Thu 25 Dec 2008 09:42:47 PM UTC, comment #8:

For future reference, are "feature requests" supposed to go somewhere other than the bug tracker?

Anonymous
Tue 16 Dec 2008 07:57:12 PM UTC, comment #7:

> ACTIONSCRIPT ERROR: Reference to undefined member [string:_MovieClip] of object [object(gnash::as_object):0x20d9900]
> ACTIONSCRIPT ERROR: Top of stack not an object [undefined] at ActionEnum2 execution


Looks to me to be something like:

for (i in anObject._MovieClip) ...

The first arg to attachBitmap shown by listswf_d
is this:

R3 = new flash.display.BitmapData(80,80,false,16711680);

R-values are registers, it could be we're messing with those,
check with -va.

Sandro Santilli <strk>
Project Member
Tue 16 Dec 2008 07:49:18 PM UTC, comment #6:

Would someone like to have a look at the actions here? I have BitmapData more or less implemented locally, but this movie fails apparently for different reasons:

This is the trace from my copy (only the last two MovieClip.attachBitmap lines should be different):

25880:140507178985248] 20:41:09 ACTIONSCRIPT ERROR: Reference to undefined member [string:_MovieClip] of object [object(gnash::as_object):0x20d9900]
25880:140507178985248] 20:41:09 ACTIONSCRIPT ERROR: Top of stack not an object [undefined] at ActionEnum2 execution
25880:140507178985248] 20:41:09 DEBUG: Loading flash.text package
25880:140507178985248] 20:41:09 DEBUG: Loading flash.filters package
25880:140507178985248] 20:41:09 ACTIONSCRIPT ERROR: Reference to undefined member [string:haxeInitDone] of object [object(gnash::Global):0x1e22f80]
25880:140507178985248] 20:41:09 DEBUG: Loading native class Number
25880:140507178985248] 20:41:09 DEBUG: Loading native class Stage
25880:140507178985248] 20:41:09 DEBUG: Loading native class TextFormat
25880:140507178985248] 20:41:09 DEBUG: Loading native class TextField
25880:140507178985248] 20:41:09 DEBUG: Loading native class Math
25880:140507178985248] 20:41:09 DEBUG: Loading native class TextSnapshot
25880:140507178985248] 20:41:09 DEBUG: Loading native class MovieClip
25880:140507178985248] 20:41:09 ACTIONSCRIPT ERROR: Reference to undefined member [string:StyleSheet] of object [function(gnash::builtin_function):0x210b550]
25880:140507178985248] 20:41:09 ACTIONSCRIPT ERROR: ActionNewMethod: can't find method BitmapData of object [object(gnash::as_object):0x20da000]
25880:140507178985248] 20:41:09 DEBUG: gnash::as_value gnash::<unnamed>::movieclip_attachBitmap(const gnash::fn_call&) enter
25880:140507178985248] 20:41:09 DEBUG: MovieClip.attachBitmap: first argument should be a BitmapData.

That's simply from the first argument to attachBitmap, which is apparently not an object (to_object() returns 0).

According to listswf_d, this is more or less the AS equivalent:

var R2, R3, R4;
R2 = flash.Lib.current;
R3 = new flash.display.BitmapData(80,80,false,16711680);
R4 = R2.getNextHighestDepth();
R2.attachBitmap(R3,R4);

So I'd guess it's the usual dodgy bytecode from haxe. But the pp still plays it.

Benjamin Wolsey <bwy>
Project Member
Mon 15 Dec 2008 08:25:35 AM UTC, comment #5:

Because it tells you it's unimplemented. If everything unimplemented were also a bug, the tracker would be useless.

It is a high priority anyway, so don't get worked up.

Benjamin Wolsey <bwy>
Project Member
Mon 15 Dec 2008 08:19:44 AM UTC, comment #4:

How on earth is this a feature request rather than a bug?

Anonymous
Sat 13 Dec 2008 09:42:30 AM UTC, comment #3:

We have tests (not automated) for this, and it's not that much work to implement. At the moment it needs the addition of another character (DisplayObject) type, and I've abandoned several attempts because they make the core more rather than less of a mess.

There's an AS3 class called Bitmap, I think. At the moment, I'm inclined to add a new Bitmap (character) class to Gnash that would do this job (that is, display a BitmapData). It also needs some additions to the bitmap_info class to do everything properly.

Benjamin Wolsey <bwy>
Project Member
Sat 13 Dec 2008 09:27:22 AM UTC, comment #2:

It's not a bug, but a feature request.
Anyway, confirmed.

Sandro Santilli <strk>
Project Member
Sat 13 Dec 2008 03:43:25 AM UTC, comment #1:

This test case is for Flash 8.

Anonymous
Sat 13 Dec 2008 03:42:26 AM UTC, original submission:

MovieClip.attachBitmap is currently unimplemented in trunk. The attached test case demonstrates the issue.

Expected result:
The movie should show a red square

Actual result:
The movie shows nothing

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #17041:  attach-bitmap.swf added by None (3KiB - application/x-shockwave-flash - test case)
file #17042:  AttachBitmap.hx added by None (281B - application/octet-stream - test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rsavoye (Posted a comment)
  • -unavailable- added by bwy (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  •  

    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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 10 Jul 2009 06:04:34 AM UTCbwyStatusWorks For Me=>Fixed
      Open/ClosedOpen=>Closed
      SummaryGnash doesn\'t handle haxe\'s funny stack behaviour=>Enumeration failures
    Wed 20 May 2009 09:35:35 PM UTCrsavoyeStatusReady For Test=>Works For Me
    Wed 20 May 2009 12:00:02 PM UTCbwyStatusConfirmed=>Ready For Test
    Fri 26 Dec 2008 09:39:09 AM UTCbwySummaryMovieClip.attachBitmap not implemented=>Gnash doesn't handle haxe's funny stack behaviour
    Sat 13 Dec 2008 09:27:22 AM UTCstrkCategorycore=>ActionScript
      StatusNone=>Confirmed
    Sat 13 Dec 2008 03:42:26 AM UTCNoneAttached File-=>Added attach-bitmap.swf, #17041
      Attached File-=>Added AttachBitmap.hx, #17042

    Back to the top


    Powered by Savane 3.1-cleanup1