This crash happened after adding texture profiles to my game and tweaking a few game.project settings (namely android bundle ID, version code and immersive mode). It worked before making these changes.
Update: Removed the texture profiles and it bundles fine, so that’s indeed the culprit. I’ll paste my texture profiles below.
INFO: Using extender binary for architecture: Armv7Android
Feb 05, 2020 5:46:16 PM com.dynamo.bob.bundle.AndroidBundler bundleApplication
INFO: armv7-android exe: /Users/da_petcu21/Work/interrogation-builds1/build/armv7-android/libdmengine.so
Feb 05, 2020 5:46:16 PM com.dynamo.bob.bundle.AndroidBundler bundleApplication
INFO: Using extender binary for architecture: Arm64Android
Feb 05, 2020 5:46:16 PM com.dynamo.bob.bundle.AndroidBundler bundleApplication
INFO: arm64-android exe: /Users/da_petcu21/Work/interrogation-builds1/build/arm64-android/libdmengine.so
Exception in thread "main" com.dynamo.bob.CompileExceptionError: -109339156
at com.dynamo.bob.Project.build(Project.java:451)
at com.dynamo.bob.Bob.main(Bob.java:569)
Caused by: java.lang.NegativeArraySizeException: -109339156
at com.dynamo.bob.bundle.AndroidBundler.bundleApplication(AndroidBundler.java:330)
at com.dynamo.bob.Project.bundle(Project.java:592)
at com.dynamo.bob.Project.doBuild(Project.java:875)
at com.dynamo.bob.Project.build(Project.java:441)
... 1 more
Hi! Can we get a bit of help on this, if you have the time? We’re shipping a 700MB game on Android soon and it would be great to bring that down at least a bit.
@dapetcu21 I currently fail to reproduce this issue, would you happen to have a small repro case?
The exception is inside code where we repack the .zip file (apk) to accomodate for files that should not be deflated. We shouldn’t have changed this code though afaik, so it’s a bit strange.
I sent you a Github invite. Also made a texture-compression branch with the texture compression config from above. Sorry for not doing this yesterday. I had to leave and then forgot.
I now get something different. Maybe a miscalculated file size?
INFO: Using extender binary for architecture: Armv7Android
Feb 27, 2020 12:16:02 PM com.dynamo.bob.bundle.AndroidBundler bundleApplication
INFO: armv7-android exe: /Users/da_petcu21/Work/interrogation-builds1/build/armv7-android/libdmengine.so
Feb 27, 2020 12:16:02 PM com.dynamo.bob.bundle.AndroidBundler bundleApplication
INFO: Using extender binary for architecture: Arm64Android
Feb 27, 2020 12:16:02 PM com.dynamo.bob.bundle.AndroidBundler bundleApplication
INFO: arm64-android exe: /Users/da_petcu21/Work/interrogation-builds1/build/arm64-android/libdmengine.so
Exception in thread "main" com.dynamo.bob.CompileExceptionError
at com.dynamo.bob.Project.build(Project.java:451)
at com.dynamo.bob.Bob.main(Bob.java:569)
Caused by: java.lang.OutOfMemoryError
at java.base/java.io.ByteArrayOutputStream.hugeCapacity(ByteArrayOutputStream.java:125)
at java.base/java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:119)
at java.base/java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:95)
at java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:156)
at com.dynamo.bob.bundle.AndroidBundler.bundleApplication(AndroidBundler.java:333)
at com.dynamo.bob.Project.bundle(Project.java:592)
at com.dynamo.bob.Project.doBuild(Project.java:875)
at com.dynamo.bob.Project.build(Project.java:441)
... 1 more
lua: ./deploy/build.lua_:423: deploy/lib/shell.lua_:29: Command exited with non-zero status code
stack traceback:
[C]: in function 'error'
./deploy/build.lua_:423: in function 'deploy.build'
./deploy.lua_:214: in local 'package'
./deploy.lua_:232: in main chunk
[C]: in ?
To close this issue, it was due to a texture profile that included both the compressed and uncompressed textures, leading up to zip file larger than 4gb, which then caused the error.