bugGnash - The GNU Flash player - Bugs: bug #40459, master-21901-77966b2 doesn’t...

 
 

bug #40459: master-21901-77966b2 doesn’t show downloaded bytes

Submitted by:  Pablo Rodríguez <ousia>
Submitted on:  Sun 03 Nov 2013 06:37:15 PM UTC  
 
Category: ActionScriptSeverity: 3 - Normal
Release: masterStatus: 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)

Tue 19 Nov 2013 08:34:07 PM UTC, comment #16:

I know what happens with this issue.

Both onLoadStart and onLoadProgress are executed after the file has been completely loaded.

See the trace:

1890:2] 2686 UNIMPLEMENTED: Undocumented tag NAMECHARACTER encountered. Please report this to the Gnash developers!
1890:3] 6868 SECURITY: Checking security of URL 'http://www.archive.org/download/Lessig-Free_Culture/lessig-freeculture.swf'
1890:3] 6868 SECURITY: Load from host http://www.archive.org granted (default)
1890:4] 8563 UNIMPLEMENTED: Bounds table in DefineFont2Tag
1890:4] 10470 UNIMPLEMENTED: Different stream/playback sound rate (5512/11025). This seems common in SWF files, so we'll warn only once.
1890:4] 10470 UNIMPLEMENTED: Different stream/playback sample size (32/16). This seems common in SWF files, so we'll warn only once.
1890:1] 40460 TRACE: onLoadStart timer: 37764
1890:1] 40460 TRACE: onLoadStart reached
1890:1] 40461 TRACE: Real download time: 1
1890:1] 40461 TRACE: First download time: 0.001
1890:1] 40462 TRACE: _root.load_text: 100% (8899984 KB/s)
1890:1] 40462 TRACE: Last timer: 37766
1890:1] 40462 TRACE: KB loaded 8899.984375
1890:1] 40462 TRACE: KB total 8912.3408203125
1890:1] 40463 TRACE: onLoadProgress reached
1890:1] 40463 TRACE: onLoadComplete reached

onLoadStart is to be executed when access to the file has been granted.

onLoadProgress is to be executed after the first byte has been received.

I attach a newer version of the script that includes the traces that show the issues with onLoadStart and onLoadProgress.

Many thanks for your help,

Pablo

(file #29664)

Pablo Rodríguez <ousia>
Wed 06 Nov 2013 07:55:53 PM UTC, comment #15:

Sandro,

I load a 6.7MB SWF hosted at http://archive.org with an average download speed of 300KB/s. It takes more than 30 seconds to be loaded. And the whole script works with the Adobe player.

You are the expert here and I don’t know how onLoadComplete is handled internally by Gnash. But it works as expected.

The script attached (still a manual testcase) uses onLoadStart, onLoadError, onLoadProgress and onLoadComplete.

I’m not sure whether onLoadStart works fine. And onLoadProgress doesn’t performs it contents.

onLoadError works fine (at least with the script attached).

And onLoadComplete works fine, since lines 106 to 110 in the attached script are only executed once the external SWF has been completely loaded.

I don’t know what I’m missing here. But if onLoadComplete is executed after the SWF header is read, wouldn’t it be possible that the SWF header can be read only after complete loading?

Many thanks for your help.

(file #29551)

Pablo Rodríguez <ousia>
Wed 06 Nov 2013 07:14:01 PM UTC, comment #14:

I'm pretty sure onLoadComplete is invoked as soon as the SWF header is read. It may seem to be working fine only because it's very quick to read files. How did you try ?

It takes a large SWF and a slow network connection (for example).

This is where doing testcases is important.

Thanks for the pointers.

Sandro Santilli <strk>
Project Member
Tue 05 Nov 2013 09:14:46 PM UTC, comment #13:

Sandro,

according to the Adobe documentation (http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001383.html) onLoadComplete is ”[i]nvoked when a file that was loaded with MovieClipLoader.loadClip() is completely downloaded.” This part seems to work fine in Gnash.

onLoadInit is “[i]nvoked when the actions on the first frame of the loaded clip have been executed” (http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001385.html),

onLoadStart is “[i]nvoked when a call to MovieClipLoader.loadClip() has begun to download a file” (http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001387.html).

onLoadError works also fine (at least with the script I provided).

And onLoadProgress is “[i]nvoked every time the loading content is written to the hard disk during the loading process (that is, between MovieClipLoader.onLoadStart and MovieClipLoader.onLoadComplete)” (http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001386.html).

I hope it helps,

Pablo

Pablo Rodríguez <ousia>
Tue 05 Nov 2013 06:37:02 PM UTC, comment #12:

onLoadStart, onLoadProgress, onLoadComplete and onLoadInit all have to be clarified. We currently invoke them in that order as soon as the SWF header of the loaded resource is read.

Sandro Santilli <strk>
Project Member
Tue 05 Nov 2013 06:35:00 PM UTC, comment #11:

Besides, if you read the FIXME lines in the C++ code you see that they also request to research about semantics of onLoadComplete argument.

In particular it's not clear to me if onLoadComplete should be called when the whole resource was loaded or only after the first bytes arrive.

Sandro Santilli <strk>
Project Member
Tue 05 Nov 2013 05:24:35 PM UTC, comment #10:

You don't need to code in C++ as long as you can produce a self-contained testcase (one that printes PASSED/FAILED messages when run).

In orer to compile sound.sc you just type: make sound.swf, the Makefile rule will take care of everything else. The include directive will be processed before invoking swfc. The preprocessor will substitute the MEDIA(sound1.wav).

That said, sound.sc is really not the right place to do your work about MovieLoader, as it's unrelated to sound.

Actually it won't be easy to code a testcase for onLoadProgress because the callback is expected to be called every 65535 bytes parsed, so any test would need to request load of something that is at least 128k big, and we might now want to encode such swf in the testsuite as a payload. The biggest SWF file in misc-swfc.all testsuite is 40k. But there's a ~230k zoomhenge.swf file located in testsuite/movie.all that might be used as payload.

You could also do the test in actioncsript/MovieClipLoader.as, which may be easier as it's already focused on MovieClipLoader.
You'll need libming installed for that one.

Sandro Santilli <strk>
Project Member
Mon 04 Nov 2013 08:34:13 PM UTC, comment #9:

Sandro,

sorry for having expressed myself wrong: I haven’t reported the sound issue yet. (I have to clear other issues before.)

I cannot code and C++ is Greek to me. I can read basic ActionScript (understanding is something different ;-)) and I can write very simple ActionScript. So, I see which FIXME you mean in libcore/MovieLoader.cpp, but not more than that.

I have tried to add checks to the script I provided yesterday, In order to understand how to do it, I wanted to compile testsuite/misc-swfc.all/sound.sc, but I found two issues:

First, on line 8 there is a C++ include directive. As far as I know this cannot be complied with swfc.

Second, as far as I know (I can check this back with the mailing list), line 11 should read
.sound audio "sound1.wav"
instead of
.sound audio MEDIA(sound1.wav)"

I guess I have to be missing something here.

With all these limits, how can I help best to the bug resolution?

Many thanks for your help,

Pablo

Pablo Rodríguez <ousia>
Sun 03 Nov 2013 10:17:25 PM UTC, comment #8:

I just checked, onLoadProgress is indeed only called once at the end of load. The relevant code is in libcore/MovieLoader.cpp and already tagged as FIXME. Surely nothing to do with sound, so if you have to make a test in swfc it would be more appropriate to create a new one, or tweak the one in actionscript.all (you need Ming library to build that one)

Sandro Santilli <strk>
Project Member
Sun 03 Nov 2013 09:46:19 PM UTC, comment #7:

Note that onLoadProgress should be implemented, somewhat tested in testsuite/actionscript.all/MovieClipLoader.as

Sandro Santilli <strk>
Project Member
Sun 03 Nov 2013 09:41:57 PM UTC, comment #6:

Great, it surely helps to know what's missing.
You can take a look at testsuite/misc-swfc.all where other swfc-based testcases are located.

You'll see the use of "Dejagnu.sc" include and related check methods. You could add checks into existing tests, like in sound.sc (simpler) or craft a new one. Crafting a new one would require adding relevant entries in Makefile.am.

Sandro Santilli <strk>
Project Member
Sun 03 Nov 2013 09:21:02 PM UTC, comment #5:

Sandro,

attached you have a test case.

listen_loading.onLoadProgress seems to be the part not working.

I hope it helps,

Pablo

(file #29533)

Pablo Rodríguez <ousia>
Sun 03 Nov 2013 07:27:21 PM UTC, comment #4:

BTW, in the previous comment “how show I make” should read “how should I make”.

Pablo Rodríguez <ousia>
Sun 03 Nov 2013 07:25:00 PM UTC, comment #3:

Sandro, I am the author of both SWF files.

How show I make the test case? Do I have to meet any standards specified somewhere?

Many thanks for your help.

Pablo Rodríguez <ousia>
Sun 03 Nov 2013 07:09:22 PM UTC, comment #2:

Are you the author of the SWF ? Can you prepare a testcase for the gnash testsuite showing this case ?

Sandro Santilli <strk>
Project Member
Sun 03 Nov 2013 07:06:39 PM UTC, comment #1:

FYI: the logged ERROR was downgraded to a DEBUG with http://git.savannah.gnu.org/cgit/gnash.git/commit/?id=1606ab48c70dcdda3ca95ff5212b836418b01c3d

Sandro Santilli <strk>
Project Member
Sun 03 Nov 2013 06:37:15 PM UTC, original submission:

http://www.archive.org/download/Lessig-Free_Culture/lessig-freeculture-loader.swf is a small loader that allows the downloading of http://www.archive.org/download/Lessig-Free_Culture/lessig-freeculture.swf.

It downloads the file, but I’m afraid it doesn’t show the bytes downloaded and total size.

Here you have a minimal log:

$ gtk-gnash -v http://www.archive.org/download/Lessig-Free_Culture/lessig-freeculture-loader.swf
13454:1] 2160 SECURITY: Checking security of URL 'http://www.archive.org/download/Lessig-Free_Culture/lessig-freeculture-loader.swf'
13454:1] 2160 SECURITY: Load from host http://www.archive.org granted (default)
13454:1] 3880 SECURITY: Extensions disabled
13454:2] 3882 UNIMPLEMENTED: Bounds table in DefineFont2Tag
13454:2] 3882 UNIMPLEMENTED: Undocumented tag NAMECHARACTER encountered. Please report this to the Gnash developers!
13454:3] 6257 SECURITY: Checking security of URL 'http://www.archive.org/download/Lessig-Free_Culture/lessig-freeculture.swf'
13454:3] 6257 SECURITY: Load from host http://www.archive.org granted (default)
13454:4] 11330 UNIMPLEMENTED: Different stream/playback sound rate (5512/11025). This seems common in SWF files, so we'll warn only once.
13454:4] 11330 UNIMPLEMENTED: Different stream/playback sample size (32/16). This seems common in SWF files, so we'll warn only once.

And I don’t know whether this comes from the patch from https://savannah.gnu.org/bugs/?24638#comment8:

13454:5] 91855 ERROR: AudioDecoderFfmpeg: could not find a complete frame in the last 124 bytes of input (malformed SWF or FLV?)
13454:5] 108252 ERROR: AudioDecoderFfmpeg: could not find a complete frame in the last 39 bytes of input (malformed SWF or FLV?)
13454:5] 124702 ERROR: AudioDecoderFfmpeg: could not find a complete frame in the last 164 bytes of input (malformed SWF or FLV?)

Just in case it could be fixed.

Many thanks for your help,

Pablo

Pablo Rodríguez <ousia>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29664:  freeculture-loader.sc added by ousia (5kB - application/vnd.ibm.secure-container - script version with traces)
file #29551:  freeculture-loader.sc added by ousia (4kB - application/vnd.ibm.secure-container - clearer version of the script)
file #29533:  freeculture-loader.sc added by ousia (4kB - application/vnd.ibm.secure-container - freeculture-loader from the Internet Archive)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by ousia (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 19 Nov 2013 08:34:07 PM UTCousiaAttached File-=>Added freeculture-loader.sc, #29664
    Wed 06 Nov 2013 07:55:52 PM UTCousiaAttached File-=>Added freeculture-loader.sc, #29551
    Sun 03 Nov 2013 10:17:34 PM UTCstrkStatusNone=>Confirmed
    Sun 03 Nov 2013 09:46:19 PM UTCstrkCategoryNone=>ActionScript
    Sun 03 Nov 2013 09:21:02 PM UTCousiaAttached File-=>Added freeculture-loader.sc, #29533

    Back to the top


    Powered by Savane 3.1-cleanup