format icon indicating copy to clipboard operation
format copied to clipboard

Eof exception when reading data from SWF file

Open FeldrinH opened this issue 3 years ago • 1 comments

I attempted to read data from the following SWF files:

http://i.flipline.com/gamefiles/cactusmccoycot/cactusmccoy_v2_1.swf http://i.flipline.com/gamefiles/cactusmccoy2/cactusmccoy2_v2_1.swf

with the following code:

final handle = File.read(swfPath, true);
final swfReader = new Reader(handle);
trace(swfReader.read().tags.length);

using the --interp target with Haxe 4.2.2 and format 3.5.0.

This resulted in the following error for cactusmccoy_v2_1.swf:

C:\HaxeToolkit\haxe\std/haxe/io/BytesInput.hx:101: characters 4-9 : Uncaught exception Eof
C:\HaxeToolkit\haxe\std/haxe/io/Input.hx:244: characters 13-23 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:963: characters 29-43 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:1354: characters 18-39 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:608: characters 12-21 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:1360: characters 15-28 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:608: characters 12-21 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:1423: characters 11-24 : Called from here
src/export/CMCoyExporter.hx:37: characters 15-31 : Called from here
src/export/CMCoyExporter.hx:16: characters 9-52 : Called from here

and the following error for cactusmccoy2_v2_1.swf:

C:\HaxeToolkit\haxe\std/haxe/io/BytesInput.hx:101: characters 4-9 : Uncaught exception Eof
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:59: characters 12-24 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:961: characters 68-83 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:1354: characters 18-39 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:608: characters 12-21 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:1360: characters 15-28 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:608: characters 12-21 : Called from here
C:\HaxeToolkit\haxe\lib\format/3,5,0/format/swf/Reader.hx:1423: characters 11-24 : Called from here
src/export/CMCoyExporter.hx:37: characters 15-31 : Called from here
src/export/CMCoyExporter.hx:16: characters 9-53 : Called from here

What might be causing this and can it be fixed?

FeldrinH avatar May 25 '21 09:05 FeldrinH

This seems to be fixed in the latest version on GitHub master branch. Probably related to #98. Would be nice if the haxelib version was updated.

FeldrinH avatar May 25 '21 09:05 FeldrinH