Gradle(new) inconsistencies - 2017.1.1p3 (Latest)

Hi,
We see lot of inconsistencies from the gradle(new) export which is not happening when selecting internal/default option while exporting.

For instance, We can’t override a debug build with release build as its throwing
INSTALL_FAILED_UPDATE_INCOMPATIBLE and stops installing.

Another scenario where once we build with Release mode For first time installation, it crashes with below hard crash.

Crash on Nexus 5X

09-28 13:02:44.027 632 - I /system/bin/tombstoned received crash request for pid 881
09-28 13:02:44.030 2129 - I crash_dump32 performing dump of process 881 (target tid = 932)
09-28 13:02:44.031 2129 - F DEBUG *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-28 13:02:44.031 2129 - F DEBUG Build fingerprint: ‘google/bullhead/bullhead:8.0.0/OPR4.170623.006/4286358:user/release-keys’
09-28 13:02:44.031 2129 - F DEBUG Revision: ‘rev_1.0’
09-28 13:02:44.031 2129 - F DEBUG ABI: ‘arm’
09-28 13:02:44.031 2129 - F DEBUG pid: 881, tid: 932, name: UnityMain >>> com.voxelbusters.nativepluginsdemo <<<
09-28 13:02:44.031 2129 - F DEBUG signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xcb300000
09-28 13:02:44.031 2129 - F DEBUG r0 be720000 r1 cb2ffff0 r2 00000fc0 r3 00000000
09-28 13:02:44.031 2129 - F DEBUG r4 cb300fd0 r5 be721000 r6 00000001 r7 00001000
09-28 13:02:44.031 2129 - F DEBUG r8 00000001 r9 00001000 sl 00001000 fp cee83eac
09-28 13:02:44.031 2129 - F DEBUG ip dc62aec4 sp cee83a28 lr dc52060f pc ee329e54 cpsr 20070010
09-28 13:02:44.149 2129 - F DEBUG
09-28 13:02:44.149 2129 - F DEBUG backtrace:
09-28 13:02:44.149 2129 - F DEBUG #00 pc 00018e54 /system/lib/libc.so (memcpy+100)
09-28 13:02:44.149 2129 - F DEBUG #01 pc 0016660b /vendor/lib/egl/libGLESv2_adreno.so (_ZN9BltDevice17ExecFastCopyBlockEPvPKvjjjjPK7BltRectS5_i+106)
09-28 13:02:44.149 2129 - F DEBUG #02 pc 00166a8d /vendor/lib/egl/libGLESv2_adreno.so (_ZN9BltDevice14ExecFastSwCopyEP13BltExecSwCopy+844)
09-28 13:02:44.149 2129 - F DEBUG #03 pc 0016d121 /vendor/lib/egl/libGLESv2_adreno.so (_ZN9BltDevice18ExecSwCopyInternalEP13BltExecSwCopy+7584)
09-28 13:02:44.149 2129 - F DEBUG #04 pc 0016d20d /vendor/lib/egl/libGLESv2_adreno.so (_ZN9BltDevice10ExecSwCopyEP13BltExecSwCopy+172)
09-28 13:02:44.149 2129 - F DEBUG #05 pc 00140eb5 /vendor/lib/egl/libGLESv2_adreno.so (_ZN9EsxBltLib16CopyHostPtrBltSwEPK17EsxBltCopyHostPtr+1236)
09-28 13:02:44.149 2129 - F DEBUG #06 pc 001133b7 /vendor/lib/egl/libGLESv2_adreno.so (_ZN11EsxResource23UpdateSubResourceDirectEP10EsxContextjPK6EsxBoxPK20EsxSurfaceAccessDesci+1398)
09-28 13:02:44.149 2129 - F DEBUG #07 pc 000ceeeb /vendor/lib/egl/libGLESv2_adreno.so (_ZN10EsxContext17UpdateSubResourceEP11EsxResourcejPK6EsxBoxPK20EsxSurfaceAccessDesc+682)
09-28 13:02:44.149 2129 - F DEBUG #08 pc 00126433 /vendor/lib/egl/libGLESv2_adreno.so (_ZN15EsxBufferObject6UpdateEP10EsxContextyjPKv+114)
09-28 13:02:44.150 2129 - F DEBUG #09 pc 000b48e5 /vendor/lib/egl/libGLESv2_adreno.so (_ZN10EsxContext12GlBufferDataEjlPKvj+100)
09-28 13:02:44.150 2129 - F DEBUG #10 pc 0009c001 /vendor/lib/egl/libGLESv2_adreno.so (glBufferData+32)
09-28 13:02:44.150 2129 - F DEBUG #11 pc 009fc3a8 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN7ApiGLES12CreateBufferEN2gl12BufferTargetElPKvj+164)
09-28 13:02:44.150 2129 - F DEBUG #12 pc 009c687c /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN14DataBufferGLES16RecreateWithDataEjPKv+116)
09-28 13:02:44.150 2129 - F DEBUG #13 pc 009c6480 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN19ConstantBuffersGLES13UpdateBuffersE21MonoOrStereoscopicEyeb+220)
09-28 13:02:44.150 2129 - F DEBUG #14 pc 009d6cf8 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN13GfxDeviceGLES14BeforeDrawCallEv+2204)
09-28 13:02:44.150 2129 - F DEBUG #15 pc 009d81fc /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN13GfxDeviceGLES11DrawBuffersEP9GfxBufferPK18VertexStreamSourceiPK16DrawBuffersRangeiP17VertexDeclaration17ShaderChannelMask+140)
09-28 13:02:44.150 2129 - F DEBUG #16 pc 004e6868 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN17GenericDynamicVBO17DrawChunkInternalERK21DynamicVBOChunkHandle17ShaderChannelMaskS3_P17VertexDeclarationP16DrawBuffersRangeij+564)
09-28 13:02:44.150 2129 - F DEBUG #17 pc 004e4b78 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN10DynamicVBO9DrawChunkERK21DynamicVBOChunkHandle17ShaderChannelMaskS3_P17VertexDeclarationPKNS_10DrawParamsEi+648)
09-28 13:02:44.150 2129 - F DEBUG #18 pc 00873b94 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_ZN13DrawImmediate11FlushBufferEv+372)
09-28 13:02:44.150 2129 - F DEBUG #19 pc 0046fc54 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (ZL8DrawQuadRK5RectTIfEfP7TextureRK10ColorRGBAfS2+856)
09-28 13:02:44.150 2129 - F DEBUG #20 pc 00416ddc /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_Z16DrawSplashScreenb+1392)
09-28 13:02:44.150 2129 - F DEBUG #21 pc 00a62108 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_Z15UnityPlayerLoopv+1180)
09-28 13:02:44.150 2129 - F DEBUG #22 pc 00a6492c /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/lib/arm/libunity.so (_Z12nativeRenderP7_JNIEnvP8_jobject+264)
09-28 13:02:44.150 2129 - F DEBUG #23 pc 0001c5b3 /data/app/com.voxelbusters.nativepluginsdemo-FjFvfPdug0UyrGOMDF6DzQ==/oat/arm/base.odex (offset 0x1b000)
09-28 13:02:46.765 632 - E /system/bin/tombstoned Tombstone written to: /data/tombstones//tombstone_04
09-28 13:02:46.770 792 2139 W ActivityManager Force finishing activity com.voxelbusters.nativepluginsdemo/com.unity3d.player.UnityPlayerActivity
09-28 13:02:46.774 792 1096 I BootReceiver Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
09-28 13:02:46.787 881 2069 W AudioTrack releaseBuffer() track 0xcda08e80 disabled due to previous underrun, restarting
09-28 13:02:46.790 792 1070 I ActivityManager Showing crash dialog for package com.voxelbusters.nativepluginsdemo u0

We request Unity to let us know if there are any existing issues related to gradle export or its still in beta which we can ignore at the moment.

Please suggest if we are doing anything wrong.

Thanks,
VB Team

Is both debug and release signed with the same keystore? see gradle template

not sure about the crash though

Yes. Both signed with same keystore. I just toggled development build flag alone while exporting.

However, I don’t see the issue with internal default export.

And after further debugging, bug seems to be from
MonoPreInitializationCallback() → nativeResume(_JNIEnv*, _jobject*) →
DrawSplashScreen(bool) →
DrawQuad(RectT const&, float, Texture*, ColorRGBAf const&, RectT const&) →
ApiGLES::CopyTextureImage …

Could you submit a bug please with details steps to reproduce this? Thank you!

Unfortunately the bug reporter is buggy :frowning:
Its not uploading and hanging forever :expressionless:

1 Like

Export works flawlessly for me! :stuck_out_tongue:

The “update incompatible” error is probably related to version codes - new one lower than the old one.
On the crash - if you’re sure your plugin is working correctly - please submit a bug report!

Thanks for jumping in Yury!

I retested and can confirm I didn’t change any except for Development Build flag while exporting with Gradle(new).
Not sure whats failing. btw i’m on 2017.1.1p3

And the crash happens only on Android Oreo alone. As you can see the log mentioned above its crashing with Signal 11 segmentation fault and when displaying Splash Screen.

Thanks,
VB Team

Hi!

Building a development gradle build on top of a release build and vice versa might fail due to the fact that we sign development builds with a debug keystore which is different from the release keystore, so the error is expected. We might be able to work around this/make it more consistent with internal builds in the future.

As for the crash - we’d really like a bug report, since it gives us a lot more data to work with and is a lot easier to handle :slight_smile:

@NinjaCat Thanks for making it clear. So as per your reason its now ignoring the keystore file set in Play Settings when Development build is on right? With Internal build this wasn’t the case. I hope it will be consistent some time soon :slight_smile:
We prefer it the old way as its easy for testing and works as per settings set in editor (mainly Google Play Services - as we just need to generate one SHA key)

Sure, I would like to but the unity bug uploaded is hanging forever.
I already filed the bug (case : 954722)but unable to add the project files. Any other ways to share?

Thanks,
VB Team

@NinjaCat : Seems like it is still the case. Can you please confirm?

Hi! Currently development builds still use the debug keystore, however release builds will also use it if no key is provided (previously they would fail to build without a key).

Thanks Ninjacat for updating.

Can you please list the paths for debug keystore on both mac and windows platforms?

I think we need to create new SHA with debug keystore for testing google play services in development mode right?

Thanks,
Ayyappa

I think the path is
%USERPROFILE%/.android/debug.keystore
Created by Android SDK upon installation or Android Studio when building a project.

Normally, you don’t need to do anything about that. Once again - what is the issue?

Thanks for confirming the paths.

When built with new gradle, as it always uses debug keystore, the apps need to add debug sha fingerprint too( in linked apps) to signin successfully.

Hope this helps others if they face isue when debugging game play services in development mode.