Skip to content

Error decompressing byte array via ByteCodeType.fromByteArray #75

Open
@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Use ByteCodeType.fromByteArray(ba, ApplicationDomain.currentDomain); where 
ba is the byte array for a swf ( as included in the example 
:[Embed(source="someswf.swf", mimeType="application/octet-stream")]
private var swfInput:Class;
function parseSWF():void {
  var ba:ByteArray = new swfInput() as ByteArray;
  ByteCodeType.fromByteArray(ba, ApplicationDomain.currentDomain);
})

What is the expected output? What do you see instead?
I was expecting some sort of information, but instead I got this error:
Exception fault: Error: Error #2058: There was an error decompressing the data.
    at flash.utils::ByteArray/_uncompress()
    at flash.utils::ByteArray/uncompress()
    at org.as3commons.bytecode.reflect::ReflectionDeserializer/read()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ReflectionDeserializer.as:83]
    at org.as3commons.bytecode.reflect::ByteCodeTypeProvider/fromByteArray()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ByteCodeTypeProvider.as:119]
    at org.as3commons.bytecode.reflect::ByteCodeType$/fromByteArray()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ByteCodeType.as:149]
    at inspect::C()[/Users/george/Documents/fdt/PointTest/src/inspect/C.as:16]

What version of the product are you using? On what operating system?
as3commons-bytecode-1.0-RC5.swc
as3commons-lang-0.3.5-SNAPSHOT.swc
as3commons-logging-2.5.2.swc
as3commons-reflect-1.4.2.swc
Flash Player 11.0.0.60 (Incubator build) on osx 10.6.8

Please provide any additional information below.

This is the first time I use the library, so not sure what to expect in this 
case.
I have however printed some ABC related data via:
var io:SWFFileIO = new SWFFileIO();
var swfFile:SWFFile = io.read(ba);
var abcTags:Array = swfFile.getTagsByType(DoABCTag);
for each(var tag:DoABCTag in abcTags) trace(tag.abcFile);

Any other options for reflection ?

Thank you for your time,
George

Original issue reported on code.google.com by [email protected] on 4 Sep 2011 at 2:19

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions