ata4 / disunity

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

OutOfMemoryError issue while deserialize #40

Open nkarabulut opened 10 years ago

nkarabulut commented 10 years ago

[error] DisUnityCli: Fatal error, caused by java.lang.OutOfMemoryError: Java heap space at java.util.ArrayList.(ArrayList.java:148) at info.ata4.unity.serdes.Deserializer.readArray(Deserializer.java:230) at info.ata4.unity.serdes.Deserializer.readCollection(Deserializer.java:242) at info.ata4.unity.serdes.Deserializer.readValue(Deserializer.java:135) at info.ata4.unity.serdes.Deserializer.readObject(Deserializer.java:104) at info.ata4.unity.serdes.Deserializer.readValue(Deserializer.java:143) at info.ata4.unity.serdes.Deserializer.readObject(Deserializer.java:104) at info.ata4.unity.serdes.Deserializer.deserialize(Deserializer.java:74) at info.ata4.unity.cli.extract.AssetExtractor.extract(AssetExtractor.java:159) at info.ata4.unity.cli.action.ExtractAction.processAsset(ExtractAction.java:53) at info.ata4.unity.cli.DisUnityProcessor.processAsset(DisUnityProcessor.java:242) at info.ata4.unity.cli.DisUnityProcessor.run(DisUnityProcessor.java:119) at info.ata4.unity.cli.DisUnityCli.run(DisUnityCli.java:119) at info.ata4.unity.cli.DisUnityCli.main(DisUnityCli.java:55)

nkarabulut commented 10 years ago

for version 0.3.1

ata4 commented 10 years ago

Looks like a deserialization error. I think I'll need the binary file to investigate that.

Neogene commented 10 years ago

Hi i have the same problem, i tried increasing the xmx and xms without success, i can share the .assets file in dropbox, write me or on neogene@tin.it.

nkarabulut commented 10 years ago

ata4 you can try these files https://www.dropbox.com/s/7ljuo466zmj74ql/Archive.zip Error : [error] DisUnityCli: Fatal error, caused by java.lang.OutOfMemoryError: Java heap space at java.util.ArrayList.(ArrayList.java:148)... Thanks

ata4 commented 10 years ago

The file works with the latest version in the repository. I'll upload a compiled release soon.

Edit: okay, try the 0.3.2 release.

nkarabulut commented 10 years ago

On Sun, Aug 17, 2014 at 1:57 PM, ata4 notifications@github.com wrote:

I'll upload a compiled release soon.

Thanks for all :)

Neogene commented 10 years ago

Hi in my case 0.3.2 doesn't fix the problem, url is https://www.dropbox.com/s/9eu2xw8ml3v19pg/sharedassets0.assets

nkarabulut commented 10 years ago

Yes doesn't fix the problem. My file doesnt work.

nkarabulut commented 10 years ago

[error] DisUnityCli: Fatal error, caused by java.lang.OutOfMemoryError: Java heap space at java.util.ArrayList.(ArrayList.java:148) at info.ata4.unity.serdes.Deserializer.readArray(Deserializer.java:238) at info.ata4.unity.serdes.Deserializer.readCollection(Deserializer.java:250) at info.ata4.unity.serdes.Deserializer.readValue(Deserializer.java:126) at info.ata4.unity.serdes.Deserializer.readObject(Deserializer.java:95) at info.ata4.unity.serdes.Deserializer.readValue(Deserializer.java:134) at info.ata4.unity.serdes.Deserializer.readObject(Deserializer.java:95) at info.ata4.unity.serdes.Deserializer.deserialize(Deserializer.java:72) at info.ata4.unity.cli.extract.AssetExtractor.extract(AssetExtractor.java:160) at info.ata4.unity.cli.cmd.ExtractCmd.processAsset(ExtractCmd.java:43) at info.ata4.unity.cli.cmd.AssetCommand.processAssetFile(AssetCommand.java:100) at info.ata4.unity.cli.cmd.AssetCommand.processFile(AssetCommand.java:90) at info.ata4.unity.cli.cmd.FileCommand.processPath(FileCommand.java:58) at info.ata4.unity.cli.cmd.FileCommand.run(FileCommand.java:76) at info.ata4.unity.cli.DisUnityCli.run(DisUnityCli.java:110) at info.ata4.unity.cli.DisUnityCli.main(DisUnityCli.java:123)

ata4 commented 10 years ago

Sorry for the confusion, I think I have accidentally uploaded the old version. I uploaded the correct version, now it should work, hopefully.

Neogene commented 10 years ago

Only in repo if i'm not wrong, the release 0.3.2 is still the previous one. Update: no, neither the repo.

nkarabulut commented 10 years ago

ata4 hi, Could you upload correct fixed version. Thanks for all.

ata4 commented 10 years ago

Hi, sorry for the waiting. I published another release that should fix the new issues.

DrMcCoy commented 10 years ago

I have the same issue while using extract on Wasteland 2's resources.assets, even with disunity 0.3.3.

nkarabulut commented 10 years ago

i tried on problem asset and issue continue. i debug assets and version 4.5. I think 4.5 assets have this issue. How can i fix. I look deserializer class and i think file type dont recognized. Breaked file is ktx. but passed other ktx files. one of file throwed.

sory my language :)

How can we fix this ??

ata4 commented 10 years ago

I have the same issue while using extract on Wasteland 2's resources.assets, even with disunity 0.3.3.

Maybe it's a newer Unity game and the database doesn't have the correct information about the data structure. Do you know which Unity version the game uses?

i tried on problem asset and issue continue. i debug assets and version 4.5. I think 4.5 assets have this issue.

Yes, I'll have to parse a few 4.4 and 4.5 games for the new data structures. Should be available next version.

DrMcCoy commented 10 years ago

Maybe it's a newer Unity game and the database doesn't have the correct information about the data structure.

Ah, yes, seems so. At least strings on the binary shows this here:

4.5.3p2 (2cb78f2c67dc)
mainData
Initialize engine version: %s

Yeah, and disunity info on the file also says 4.5.3p2

nkarabulut commented 10 years ago

Hi, i investigate throwed file. Thats material, How to exclude material files on proccess

exclude parameter exists but dont exclude these files

example :

java -jar disunity.jar -x Material extract Data/dfsfsd.assets

-x Material did not work.

These files unity 4.5.x assets

or how to extract spessific types in assets

Thanks.

nkarabulut commented 10 years ago

ata4 can you contact me filikanto@gmail.com Thanks.

ata4 commented 10 years ago

I updated the database file for Unity 4.5. You can update your local installation by placing this file in the DisUnity folder where disunity.jar is located, then it should be able to read newer standalone assets.

DrMcCoy commented 10 years ago

Well, it works if that file is in the current directory, not in the directory where disunity.jar is located. But yes, in general it works, thanks. :)

I guess that updated struct database will be rolled into disunity.jar in the next release?

nkarabulut commented 10 years ago

Thanks ata4. its works. :)

Bless you god.

ata4 commented 10 years ago

Well, it works if that file is in the current directory, not in the directory where disunity.jar is located. But yes, in general it works, thanks. :)

Well yes, the current working directory. It's surprisingly hard to locate the .jar file from which the program was launched in Java. But it should be the same folder when called via the launcher script. :wink:

I guess that updated struct database will be rolled into disunity.jar in the next release?

Sure. Right now, I'm working on a large rewrite, so it'll take a while for the next major release. But maybe there will be a small bugfix release in the meantime, which will include the updated database.

ZioYuri78 commented 9 years ago

"I updated the database file for Unity 4.5. You can update your local installation by placing this file in the DisUnity folder where disunity.jar is located, then it should be able to read newer standalone assets."

Hi ata4, looks like the file you llinked is no longer available, can you upload it again?

ata4 commented 9 years ago

The file is now located here. 0.3.4 should support Unity 4.5 out of the box, though.

ZioYuri78 commented 9 years ago

Thank you very much :+1:

baongoccarrot commented 9 years ago

So how about Unity 4.6 database file