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


bug #26329: Drawing API bug

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

Add a New Comment (Rich MarkupRich 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 Feb 8 15:22:56 2016, 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:

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:

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

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

(file #36276)

Nutchanon Wetchasit <nachanon>
Tue Jul 7 20:51:20 2009, 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 Jul 7 20:43:33 2009, 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 Jul 7 20:35:52 2009, 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 Jul 7 11:16:40 2009, comment #7:

Tests added.

Benjamin Wolsey <bwy>
Project Member
Thu Jul 2 14:23:51 2009, 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 Jul 2 14:15:20 2009, 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 Jul 2 13:29:42 2009, 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 Jul 2 13:28:43 2009, 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 Jul 2 13:25:57 2009, 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

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

The bug is visible in this real-life case:


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 Apr 24 09:28:49 2009, 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);

col = 0xff0000;
colc = 100;
x = 20;
y = 20;
xr = 100;
yr = 100;








Benjamin Wolsey <bwy>
Project Member


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

Attach File(s):

Attached Files
file #36276:  linereset-star.zip added by nachanon (25kB - application/zip - Star-rendering test SWF file (Flash 7), with source code, screenshots, and logs)
file #18379:  fills.patch added by strk (4kB - text/x-diff)
file #18378:  fills.as added by strk (1kB - 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 (88kB - 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 Feb 8 15:22:56 2016nachanonAttached File-=>Added linereset-star.zip, #36276
    Tue Jul 7 20:51:20 2009strkAttached File-=>Added fills.patch, #18379
    Tue Jul 7 20:43:33 2009strkAttached File-=>Added fills.as, #18378
    Thu Jul 2 14:23:51 2009strkAttached File-=>Added bf2.as, #18352
    Thu Jul 2 13:28:43 2009strkStatusNone=>Confirmed
    Fri Apr 24 09:33:30 2009bwyAttached File-=>Added SuperShape_preview.swf, #18006
    Fri Apr 24 09:28:49 2009bwyAttached File-=>Added bf.as, #18004
      Attached File-=>Added bf.swf, #18005

    Back to the top

    Powered by Savane 3.1-cleanup1