Android bob.jar bundling crash (SOLVED)

#1

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
path_settings {
  path: "**"
  profile: "CompressedOnMobile"
}
profiles {
  name: "Default"
  platforms {
    os: OS_ID_GENERIC
    formats {
      format: TEXTURE_FORMAT_RGBA
      compression_level: BEST
      compression_type: COMPRESSION_TYPE_DEFAULT
    }
    mipmaps: true
  }
}
profiles {
  name: "CompressedOnMobile"
  platforms {
    os: OS_ID_GENERIC
    formats {
      format: TEXTURE_FORMAT_RGBA
      compression_level: BEST
      compression_type: COMPRESSION_TYPE_DEFAULT
    }
    mipmaps: true
  }
  platforms {
    os: OS_ID_ANDROID
    formats {
      format: TEXTURE_FORMAT_RGBA
      compression_level: BEST
      compression_type: COMPRESSION_TYPE_WEBP_LOSSY
    }
    mipmaps: false
  }
}
2 Likes

#2

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.

1 Like

#3

Oh, I think we must have missed this. Sorry. @JCash can help soon.

2 Likes

#4

@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.

0 Likes

#5

I don’t have a small repro case right now, but I can give you access to the Interrogation repo if that helps you.

I’m not sure it has something to do with a recent change. This is the first time we tried texture compression in Interrogation.

1 Like

#6

Yes, please share the project with me (mathias . westerdahl at king . com)

0 Likes

#7

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.

1 Like

#8

Hmm, I cannot find the invite :confused:
Did you send it to mathiaswking or JCash? (I cannot see it in either, but any info would help I guess)

0 Likes

#9

I sent it to jcash, but I’ll send it to the other one as well.

1 Like

#10

Thanks, I got it now (it never showed on the github page, I had to check the email for that :/)

0 Likes

#11

Yeah. They don’t show on Github. Got burned like that a few times as well.

1 Like

#12

Hmm, first try and I didn’t get any errors:

$ java -jar bob.jar --email a@b.com --auth abc123 resolve
$ java -jar bob.jar build --archive --platform=armv7-android --texture-compression true --brhtml index.html
$ java -jar bob.jar bundle --platform=armv7-android

This is the beta bob, I’ll try the 1.2.165 bob next, and then also from the 165 editor

0 Likes

#13

Since this is zip related, and we use the zip on the OSX system:

$ zip --version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
0 Likes

#14

Hmmm. I’ll see if I can repro again. Are you sure you’re on the texture-compression branch?

0 Likes

#15

GAH! no, I’m not…

I though “switch branch now”, and immediately forgot…

1 Like

#16

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

#17

Yeah, I’m thinking something goes wrong with the writing of that zip file.

0 Likes

#18

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.

3 Likes