ata4 / disunity

An experimental toolset for Unity asset and asset bundle files.
The Unlicense
2.69k stars 662 forks source link

java.io.EOFException #114

Open Tristian opened 9 years ago

Tristian commented 9 years ago

This may be due to unexpected file structure. I believe the asset file is from Unity 4.6

> java -cp disunity-dist-0.4.0-SNAPSHOT.jar info.ata4.disunity.cli.DisUnityCli extract  mainData

[warning] FileCommand: Can't process file mainData, caused by java.io.EOFException
    at info.ata4.io.buffer.source.ReadableByteChannelSource.requestRead(Readabl ByteChannelSource.java:114)
    at info.ata4.io.buffer.source.SeekableByteChannelSource.requestRead(SeekableByteChannelSource.java:150)
    at info.ata4.io.DataReader.readInt(DataReader.java:83)
    at info.ata4.unity.asset.FieldType.read(FieldType.java:138)
    at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:37)
    at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:42)
    at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:42)
    at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:42)`

The last line is repeated more than 1000 times.

DarkFlamex1 commented 9 years ago

same for me!

On Sat, Mar 28, 2015 at 11:15 PM, Tristian notifications@github.com wrote:

This may be due to unexpected file structure. I believe the asset file is from Unity 4.6

java -cp disunity-dist-0.4.0-SNAPSHOT.jar info.ata4.disunity.cli.DisUnityCli extract mainData

[warning] FileCommand: Can't process file mainData, caused by java.io.EOFException at info.ata4.io.buffer.source.ReadableByteChannelSource.requestRead(Readabl ByteChannelSource.java:114) at info.ata4.io.buffer.source.SeekableByteChannelSource.requestRead(SeekableByteChannelSource.java:150) at info.ata4.io.DataReader.readInt(DataReader.java:83) at info.ata4.unity.asset.FieldType.read(FieldType.java:138) at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:37) at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:42) at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:42) at info.ata4.unity.asset.FieldTypeNode.read(FieldTypeNode.java:42)`

The last line is repeated more than 1000 times.

— Reply to this email directly or view it on GitHub https://github.com/ata4/disunity/issues/114.

carl3399 commented 9 years ago

Same here...

viplzm commented 8 years ago

Same here...

shadow0162 commented 8 years ago

me too!

Sembiance commented 8 years ago

Trying to extract a unity 5 file from hearthstone with the very latest src code as of Oct-1-2015 yields:

java -jar disunity-dist-0.4.0-SNAPSHOT.jar extract cardxml0.unity3d 
[info] DisUnity v0.4.0
[info] Processing cardxml0.unity3d
[info] Processing CAB-cardxml0
[warning] FileCommand: Can't process file cardxml0.unity3d, caused by java.io.EOFException
    at info.ata4.io.buffer.source.ReadableByteChannelSource.requestRead(ReadableByteChannelSource.java:114)
    at info.ata4.io.buffer.source.SeekableByteChannelSource.requestRead(SeekableByteChannelSource.java:150)
    at info.ata4.io.DataReader.readInt(DataReader.java:83)
    at info.ata4.unity.asset.AssetFile.loadMetadata(AssetFile.java:200)
    at info.ata4.unity.asset.AssetFile.load(AssetFile.java:136)
    at info.ata4.disunity.cli.command.AssetFileCommand.handleAssetBundleEntry(AssetFileCommand.java:82)
    at info.ata4.disunity.cli.command.AssetFileCommand.handleAssetBundleFile(AssetFileCommand.java:62)
    at info.ata4.disunity.cli.command.AssetFileCommand.handleFile(AssetFileCommand.java:48)
    at info.ata4.disunity.cli.command.FileCommand.processFile(FileCommand.java:35)
    at info.ata4.disunity.cli.command.MultiFileCommand.run(MultiFileCommand.java:54)
    at info.ata4.disunity.cli.DisUnityCli.run(DisUnityCli.java:117)
    at info.ata4.disunity.cli.DisUnityCli.main(DisUnityCli.java:131)

bundle-info:

java -jar disunity-dist-0.4.0-SNAPSHOT.jar bundle-info cardxml0.unity3d 
[info] DisUnity v0.4.0
[info] Processing /mnt/compendium/data/cardxml0.unity3d
Header:
|--------------------------+----------|
| Field                    | Value    |
|--------------------------+----------|
| signature                | UnityRaw |
| streamVersion            | 3        |
| unityVersion             | 5.x.x    |
| unityRevision            | 5.1.3p2  |
| minimumStreamedBytes     | 17097064 |
| headerSize               | 60       |
| numberOfLevelsToDownload | 1        |
| numberOfLevels           | 1        |
| levelByteEnd[0][0]       | 17097004 |
| levelByteEnd[0][1]       | 17097004 |
| completeFileSize         | 17097064 |
| dataHeaderSize           | 28       |
|--------------------------+----------|

Entries:
|--------------+--------+----------|
| Name         | Offset |     Size |
|--------------+--------+----------|
| CAB-cardxml0 |     28 | 17096976 |
|--------------+--------+----------|
EliteMasterEric commented 8 years ago

Trying to extract a .unity3d file from the Pokemon Trading Card Game Online returns:

[info] DisUnity v0.4.0
[info] Processing sleeves.unity3d
[warning] FileCommand: Can't process file sleeves.unity3d, caused by java.io.EOF Exception
    at info.ata4.io.buffer.source.ReadableByteChannelSource.requestRead(ReadableByteChannelSource.java:114)
    at info.ata4.io.buffer.source.SeekableByteChannelSource.requestRead(SeekableByteChannelSource.java:150)
    at info.ata4.io.DataReader.readInt(DataReader.java:83)
    at info.ata4.unity.asset.TypeTree.read(TypeTree.java:93)
    at info.ata4.io.DataReader.readStruct(DataReader.java:37)
    at info.ata4.unity.asset.AssetFile.loadMetadata(AssetFile.java:185)
    at info.ata4.unity.asset.AssetFile.load(AssetFile.java:136)
    at info.ata4.unity.asset.AssetFile.load(AssetFile.java:114)
    at info.ata4.disunity.cli.command.AssetFileCommand.handleFile(AssetFileCommand.java:53)
    at info.ata4.disunity.cli.command.FileCommand.processFile(FileCommand.java:35)
    at info.ata4.disunity.cli.command.MultiFileCommand.run(MultiFileCommand.java:54)
    at info.ata4.disunity.cli.DisUnityCli.run(DisUnityCli.java:117)
    at info.ata4.disunity.cli.DisUnityCli.main(DisUnityCli.java:131)
welovekah commented 8 years ago

I run into this issue for any command i attempt to run on assetbundles (bundle info, bundle list, bundle unpack, etc.). On a side note, is there a good way to tell what Unity version an assetbundle is from?

[warning] BundleCommand: Can't open asset bundle No_100113.assetbundle, caused b y java.io.EOFException at info.ata4.io.buffer.source.ReadableByteChannelSource.requestRead(Read ableByteChannelSource.java:114) at info.ata4.io.buffer.source.SeekableByteChannelSource.requestRead(Seek ableByteChannelSource.java:150) at info.ata4.io.DataReader.readInt(DataReader.java:83) at info.ata4.io.DataReader.readUnsignedInt(DataReader.java:118) at info.ata4.junity.bundle.BundleHeader.read(BundleHeader.java:86) at info.ata4.io.DataReader.readStruct(DataReader.java:37) at info.ata4.junity.bundle.BundleReader.read(BundleReader.java:46) at info.ata4.disunity.cli.command.bundle.BundleCommand.runFileRecursive( BundleCommand.java:33) at info.ata4.disunity.cli.command.RecursiveFileCommand.runFile(Recursive FileCommand.java:52) at java.util.ArrayList.forEach(Unknown Source) at info.ata4.disunity.cli.command.FileCommand.run(FileCommand.java:32) at info.ata4.disunity.cli.command.Command.run(Command.java:50) at info.ata4.disunity.cli.command.Command.run(Command.java:50) at info.ata4.disunity.cli.command.DisUnityRoot.run(DisUnityRoot.java:62) at info.ata4.disunity.cli.DisUnityCli.main(DisUnityCli.java:46)

iCCupPlatoon commented 7 years ago

Same here...