bugGnash - The GNU Flash player - Bugs: bug #38625, Gnash initially set Stage.width...

 
 

bug #38625: Gnash initially set Stage.width and Stage.height to SWF metadata regardless what <embed> tag says

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Fri 29 Mar 2013 12:19:34 PM UTC
   
 
Category:  None Severity:  3 - Normal
Release:  0.8.10 Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 02 Apr 2013 04:53:35 PM UTC, comment #3: 

I've created a dummy flash page to demonstrate this problem,
by using 16x16 pixel SWF dimension, set stage to 'noScale' mode in the movie's constructor,
and immediately grab Stage.width, Stage.height
then set the obtained dimension to TextField,
similar to what SounManager2 do at runtime.

My dummy flash page with source code (compiles in MTASC)
and screenshots also attached; file #27747


This is a correct trace output from Adobe Flash Player 11:

<init>: start
w: 500 h: 200 (resized)
w: 500 h: 200
<init>: end

You'd see that Flash Player switched to <embed>'s dimension immediately in Stage.scaleMode="noScale" statement, with resize event instantly fired.
In the screenshot, you'll see that Flash correctly displayed "Hello World".

This is a trace output from Gnash 0.8.10:

3005:1] 214 TRACE: <init>: start
3005:1] 214 TRACE: w: 16 h: 16
3005:1] 227 TRACE: <init>: end
3005:1] 231 TRACE: w: 500 h: 200 (resized)

You'd see that Gnash didn't change to <embed>'s dimension immediately in Stage.scaleMode="noScale" statement.
It instead, delayed until constructor finished execution, then applies the new dimension (with resize event fired afterward).
In the screenshot, you'll see that Gnash displayed only the "He" part.


Gnash: gnash 0.8.10-1~lenny, browser-plugin-gnash 0.8.10-1~lenny from getgnash.org APT repository
Browser: iceweasel 3.0.6-3 from Debian repository (no addons)
System: Debian GNU/Linux 5.0 Lenny on i386

Nutchanon Wetchasit <nachanon>
Tue 02 Apr 2013 04:02:54 PM UTC, comment #2: 

Oh sorry, I described it all the wrong way.

The summary should be this instead:
Gnash didn't change stage dimension immediately when Stage.scaleMode was changed to 'noScale'

since this applies only when movie sets the stage to 100% Mode.
It's not that gnash retains SWF dimension in Stage.width or Stage.height.

The problem is gnash delayed firing of stage resize event.

Nutchanon Wetchasit <nachanon>
Fri 29 Mar 2013 12:32:56 PM UTC, comment #1: 

Also note that this (incorrect) behavior applies to the size
set by Gnash's --width and --height parameter too.

Nutchanon Wetchasit <nachanon>
Fri 29 Mar 2013 12:19:34 PM UTC, original submission:  

This bug is a spin-off from bug #37008 (SoundCloud issue).

SoundManager2's debug screen uses values from Stage.width and
Stage.height to set it's TextField size on startup without
listening for stage's size change event.

SoundManager2's SWF was compiled with 16x16 px size.

When displayed on the HTML page, for example
http://www.schillmania.com/projects/soundmanager2/troubleshoot/
Adobe Flash player takes width and height parameter from
<embed> tag, and use it as an initial Stage.width, Stage.height.
Thus, SoundManager2 gets the correct stage dimension
(500x200 px) and able to set TextField size accordingly.

But on Gnash, Stage.width and Stage.height were initially set to
SWF's dimension (16x16 px) regardless what <embed> tag said.
After SoundManager2's initialization code have already run,
Gnash then fires stage size change event with correct
stage dimension afterward.

The consequence is that TextField's display area was reduced
to a single character, making debug screen unusable.

Gnash: gnash 0.8.10-1~lenny, browser-plugin-gnash 0.8.10-1~lenny
       from getgnash.org APT repository
Browser: iceweasel 3.0.6-3 from Debian repository (no addons)
System: Debian GNU/Linux 5.0 Lenny on 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 #27747:  stagesizetest.zip added by nachanon (4KiB - application/zip - Test flash page and 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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-02 nachanon Attached File- Added stagesizetest.zip, #27747

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code