bugGnash - The GNU Flash player - Bugs: bug #26329, Drawing API bug

 
 

bug #26329: Drawing API bug

Submitted by:  Benjamin Wolsey <bwy>
Submitted on:  Fri 24 Apr 2009 09:28:49 AM UTC  
 
Category: ActionScriptSeverity: 3 - Normal
Release: NoneStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: Open

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 08 Feb 2016 03:22:56 PM UTC, comment #11:

This problem is still reproducible on current Gnash git version, @bwy's
test file (file #18005) is still showing a filled triangle. @strk's patch
(file #18379) doesn't seem to apply on current codebase anymore.

I have made another test SWF file (using libming's makeswf) which tries to
re-demonstate this problem on both object filling and stroking, and also
include point-based `MovieClip.hitTest()` checks on the resulting shape.

This is a correct result from Adobe Flash Player:
http://i.imgur.com/mfaS7BS.png

Player's trace output from the run:

You'd see that the code rendered as a filled star with two unconnected
border lines, and all point-based `MovieClip.hitTest()` checks on the shape
are all passing.

This is an image result from Gnash:
http://i.imgur.com/ijx8lkQ.png

Gnash's trace output from the run:

You'd see that the code rendered as a filled pentagon with star-shaped hole
instead, and two lines drawn are also closed in loop. Point-based
`MovieClip.hitTest()` checks on the shape are also mostly failing.

Test SWF, source code, build script, screenshots, and logs are attached as
`linereset-star.zip`.

Gnash: 0.8.11dev (git 435d3e9 6-Feb-2016)
Adobe Flash Player: 11.2 r202 (11.2.202.491) Standalone
System: Debian GNU/Linux 7.0 Wheezy i386

(file #36276)

Nutchanon Wetchasit <nachanon>
Tue 07 Jul 2009 08:51:20 PM UTC, comment #10:

Just in case of disaster, I attach the fills.patch file fixing the bugs exposed by fills.as. Plan to commit them after the tests in fills.as are integrated into DrawingApiTest.as and runner.

(file #18379)

Sandro Santilli <strk>
Project Member
Tue 07 Jul 2009 08:43:33 PM UTC, comment #9:

The attached fills.as contain more tests which fail with current gnash, and for which I already implemented fixes.
Note that the yellow stroked square behaves in odd ways, leaving leaking fills with pp 9 and using smaller stroke thickness in pp 10.

(file #18378)

Sandro Santilli <strk>
Project Member
Tue 07 Jul 2009 08:35:52 PM UTC, comment #8:

I've noticed that the pp version 10 gives a FAIL in DrawingApiTest.swf, whereas version 9 doesn't:

FAILED: x.hitTest(122, 157, true) [/usr/src/gnash/gnash-head/testsuite/misc-ming.all/DrawingApiTest.as:255]

Does seem related to auto-closup of filled paths

Sandro Santilli <strk>
Project Member
Tue 07 Jul 2009 11:16:40 AM UTC, comment #7:

Tests added.

Benjamin Wolsey <bwy>
Project Member
Thu 02 Jul 2009 02:23:51 PM UTC, comment #6:

The attached bf2.as contains comment showing
where the problem lies (it's 2 of them)

(file #18352)

Sandro Santilli <strk>
Project Member
Thu 02 Jul 2009 02:15:20 PM UTC, comment #5:

If anyone feels like adding the testcase to the existing
misc-ming.all/DrawingApiTest.as and related runner I'll try to fix.

Sandro Santilli <strk>
Project Member
Thu 02 Jul 2009 01:29:42 PM UTC, comment #4:

I've also verified that a beginFill does instead force closeup of previous shape. Even if the fill parameters are the same.

Sandro Santilli <strk>
Project Member
Thu 02 Jul 2009 01:28:43 PM UTC, comment #3:

The problem is that the call to lineStyle forces closeup of the current shape. I've tried having last lineStyle call use a different color to see if that should make a difference, but NOPE: the adobe player still considers it a single rectangle. No forced closeup.

Sandro Santilli <strk>
Project Member
Thu 02 Jul 2009 01:25:57 PM UTC, comment #2:

More interesting things if you do make 'n' and 'a' available
in the .as file:

n = 10;
a = 100;

Gnash renders a diagonal line, the pp doesn't.

Indeed the AS code doesn't contain any diagonal line
AFAICS

Sandro Santilli <strk>
Project Member
Fri 24 Apr 2009 09:33:30 AM UTC, comment #1:

The bug is visible in this real-life case:

http://www.alex-uhlmann.de/flash/animationpackage/ap1/de/alex_uhlmann/animationpackage/drawing/SuperShape_preview.swf

it also has other problems, namely enormous memory usage and not displaying the main shape.

Seems to be free software, so I'm attaching it too.

(file #18006)

Benjamin Wolsey <bwy>
Project Member
Fri 24 Apr 2009 09:28:49 AM UTC, original submission:

The following code (attached as AS and SWF) should create a solid square. Gnash only fills half the square. The problem is in the two lineStyle changes.

createEmptyMovieClip("mc", 4);

with(mc)
{
col = 0xff0000;
colc = 100;
x = 20;
y = 20;
xr = 100;
yr = 100;

beginFill(col,colc);
lineStyle(n,1,a);

moveTo(x,y);
lineTo(x+xr,y);

lineStyle(n,1,a);

lineTo((x+xr),(y+yr));

lineStyle(n,1,a);

lineTo(x,(y+yr));
lineTo(x,y);

endFill();
}

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:
   

Attached Files
file #36276:  linereset-star.zip added by nachanon (25KiB - application/zip - Star-rendering test SWF file (Flash 7), with source code, screenshots, and logs)
file #18379:  fills.patch added by strk (4KiB - text/x-diff)
file #18378:  fills.as added by strk (1KiB - application/x-applix-spreadsheet)
file #18352:  bf2.as added by strk (601B - application/x-applix-spreadsheet - Commented source code)
file #18006:  SuperShape_preview.swf added by bwy (88KiB - application/x-shockwave-flash)
file #18004:  bf.as added by bwy (357B - application/x-applix-spreadsheet)
file #18005:  bf.swf added by bwy (243B - application/x-shockwave-flash)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nachanon (Updated the item)
  • -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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 08 Feb 2016 03:22:56 PM UTCnachanonAttached File-=>Added linereset-star.zip, #36276
    Tue 07 Jul 2009 08:51:20 PM UTCstrkAttached File-=>Added fills.patch, #18379
    Tue 07 Jul 2009 08:43:33 PM UTCstrkAttached File-=>Added fills.as, #18378
    Thu 02 Jul 2009 02:23:51 PM UTCstrkAttached File-=>Added bf2.as, #18352
    Thu 02 Jul 2009 01:28:43 PM UTCstrkStatusNone=>Confirmed
    Fri 24 Apr 2009 09:33:30 AM UTCbwyAttached File-=>Added SuperShape_preview.swf, #18006
    Fri 24 Apr 2009 09:28:49 AM UTCbwyAttached File-=>Added bf.as, #18004
      Attached File-=>Added bf.swf, #18005

    Back to the top


    Powered by Savane 3.1-cleanup1