disunity icon indicating copy to clipboard operation
disunity copied to clipboard

OutOfMemoryError issue while deserialize

Open nkarabulut opened this issue 10 years ago • 27 comments

[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 avatar Jul 11 '14 23:07 nkarabulut

for version 0.3.1

nkarabulut avatar Jul 11 '14 23:07 nkarabulut

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

ata4 avatar Jul 14 '14 07:07 ata4

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 [email protected].

Neogene avatar Aug 15 '14 18:08 Neogene

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

nkarabulut avatar Aug 15 '14 20:08 nkarabulut

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.

ata4 avatar Aug 17 '14 10:08 ata4

On Sun, Aug 17, 2014 at 1:57 PM, ata4 [email protected] wrote:

I'll upload a compiled release soon.

Thanks for all :)

nkarabulut avatar Aug 18 '14 11:08 nkarabulut

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

Neogene avatar Aug 18 '14 18:08 Neogene

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

nkarabulut avatar Aug 19 '14 19:08 nkarabulut

[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)

nkarabulut avatar Aug 19 '14 19:08 nkarabulut

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

ata4 avatar Aug 19 '14 21:08 ata4

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

Neogene avatar Aug 20 '14 07:08 Neogene

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

nkarabulut avatar Sep 14 '14 18:09 nkarabulut

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

ata4 avatar Sep 20 '14 08:09 ata4

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

DrMcCoy avatar Sep 21 '14 17:09 DrMcCoy

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 ??

nkarabulut avatar Sep 23 '14 07:09 nkarabulut

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.

ata4 avatar Sep 23 '14 09:09 ata4

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

DrMcCoy avatar Sep 23 '14 10:09 DrMcCoy

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 avatar Sep 25 '14 06:09 nkarabulut

ata4 can you contact me [email protected] Thanks.

nkarabulut avatar Sep 25 '14 07:09 nkarabulut

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.

ata4 avatar Sep 25 '14 16:09 ata4

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?

DrMcCoy avatar Sep 25 '14 21:09 DrMcCoy

Thanks ata4. its works. :)

Bless you god.

nkarabulut avatar Sep 25 '14 21:09 nkarabulut

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.

ata4 avatar Sep 26 '14 08:09 ata4

"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?

ZioYuri78 avatar Jan 14 '15 12:01 ZioYuri78

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

ata4 avatar Jan 15 '15 12:01 ata4

Thank you very much :+1:

ZioYuri78 avatar Jan 15 '15 13:01 ZioYuri78

So how about Unity 4.6 database file

baongoccarrot avatar Sep 08 '15 09:09 baongoccarrot