bugGnash - The GNU Flash player - Bugs: bug #45731, Gnash treats `undefined` line...

 
 

bug #45731: Gnash treats `undefined` line thickness in MovieClip.lineStyle() incorrectly

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Tue 11 Aug 2015 06:41:50 AM UTC
   
 
Category:  None Severity:  3 - Normal
Release:  master Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 18 Feb 2016 11:38:42 AM UTC, comment #4: 

Patch included for fixing `Infinity` stroke size, see patch: #8904 comment 2.

After applied the patch, from screenshot you'd see
that `infstroke.html` is now correctly displaying filled orange square
with hairline border:

Gnash: 0.8.11dev (patched against git 051aa9c 15-Feb-2016) NPAPI
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Wed 17 Feb 2016 05:27:57 PM UTC, comment #3: 

I have made more test SWFs that tries to use other improbable stroke sizes
like negative number, `Infinity`, `-Infinity`, `NaN`, `null`, non-number
String, numeric String, `true`, `false`, attached as `impossiblestrokes.zip`
(rendering screenshots on Gnash and Flash Player also included).

Gnash seems to render most tests in this set correctly, except the `Infinity`
stroke size; Flash Player treated it as 0 (hairline stroke), but Gnash
treated it like a largest stroke size (255-px).

http://i.imgur.com/KXayjIe.png
This is a correct result from viewing `infstroke.html` on browser with
Flash Player. You'll see that the orange square has a hairline stroking.

http://i.imgur.com/XmGR4K5.png
This is an image result from viewing `infstroke.html` on browser with
current Gnash 0.8.11dev git. You'll see that there's a very thick stroke
around the orange square.

Gnash: 0.8.11dev (git 051aa9c 15-Feb-2016) NPAPI
Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

P.S. Screenshots were captured at 2x of original SWF dimension to emphasize
the difference between hairline stroke and 1-px stroke.


(file #36368)

Nutchanon Wetchasit <nachanon>
Mon 08 Feb 2016 03:31:04 PM UTC, comment #2: 

I found that there is another problem when `MovieClip.lineStyle()`
was used in the middle of drawing operation rather than at the start,
it would (unexpectedly) close the drawing path.

This problem is reported as bug #26329.

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

Nutchanon Wetchasit <nachanon>
Fri 05 Feb 2016 07:06:08 AM UTC, comment #1: 

Patch included for fixing `undefined` stroke width issue, see patch #8904.

After applied the patch, from screenshot you'd see that
`undefstroke.html` is now correctly displaying filled square without hairline border.

Other impossible stroke sizes, especially `Infinity` are remaining to be tested.

Gnash: 0.8.11dev (patched against git 02ec1e6 3-Feb-2016)
Browser: Iceweasel 10.0.12
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Tue 11 Aug 2015 06:41:50 AM UTC, original submission:  

I have created s simple Flash file using MTASC (Flash 8) which tries to draw
an orange-colored square with `undefined` line thickness (no line stroking, according to docs).


with(mc) {
        lineStyle(undefined,0x000000,100);
        moveTo(10,10);
        beginFill(0xFF9900);
        lineTo(60,10);
        lineTo(60,60);
        lineTo(10,60);
        lineTo(10,10);
        endFill();
}


But when I viewed the file on Gnash, the square was shown
with hairline stroking instead, which is incorrect.

http://i.imgur.com/laFr08z.png
This is a 'correct' result from viewing `undefstroke.html` on browser with Adobe Flash Player.
You'll see that the orange square has no border stroking.

http://i.imgur.com/Zccy8s6.png
This is an image result from viewing `undefstroke.html` on browser with current Gnash 0.8.11dev git.
You'll notice that there's a hairline-width black stroke around the orange square.

Test Flash/HTML file, source code, build script and screenshot
of both cases are attached (undefstroke.zip).

Note: Screenshots were captured at 640x480 display size rather than original
320x240 SWF size, to emphasize the fact that it was hairline-width stroke,
not 1-px stroke.

Gnash: 0.8.11dev (git 6b269f9 24-May-2015) NPAPI
Adobe Flash Player: 11.2 r202 (11.2.202.491) NPAPI binary
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #36381:  infstroke_gnash0.8.11dev-051aa9c.patched1.png added by nachanon (785B - image/png - Screenshot of `infstroke.html` on browser using Gnash 0.8.11dev git 051aa9c with second patch of patch #8904)
file #36368:  impossiblestrokes.zip added by nachanon (25KiB - application/zip - Test Flash/HTML file on other impossible line thickness, with screenshots)
file #36251:  undefstroke_gnash0.8.11dev-02ec1e6.patched1.png added by nachanon (779B - image/png - Screenshot of `undefstroke.html` on browser using Gnash 0.8.11dev git 02ec1e6 with first patch of patch #8904)
file #34625:  undefstroke.zip added by nachanon (3KiB - application/zip - Test Flash/HTML file on undefined line thickness case, with screenshots)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nachanon (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-18 nachanon Attached File- Added infstroke_gnash0.8.11dev-051aa9c.patched1.png, #36381
    2016-02-17 nachanon Attached File- Added impossiblestrokes.zip, #36368
    2016-02-05 nachanon Attached File- Added undefstroke_gnash0.8.11dev-02ec1e6.patched1.png, #36251
    2015-08-11 nachanon Attached File- Added undefstroke.zip, #34625

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code