Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on L preview #68

Closed
spencergriffin opened this issue Jul 2, 2014 · 12 comments
Closed

Crashes on L preview #68

spencergriffin opened this issue Jul 2, 2014 · 12 comments
Assignees
Labels
Milestone

Comments

@spencergriffin
Copy link

heap corruption detected by dlfree
Fatal signal 6 (SIGABRT), code -6

backtrace:
#00 pc 000390d0  /system/lib/libc.so (tgkill+12)
#01 pc 0001636d  /system/lib/libc.so (pthread_kill+64)
#02 pc 00016e41  /system/lib/libc.so (raise+10)
#03 pc 00013cdd  /system/lib/libc.so (__libc_android_abort+36)
#04 pc 000125ac  /system/lib/libc.so (abort+4)
#05 pc 00014e6b  /system/lib/libc.so (__libc_fatal+16)
#06 pc 0000f79d  /system/lib/libc.so (__bionic_heap_corruption_error+8)
#07 pc 0001199d  /system/lib/libc.so (dlfree+312)
#08 pc 0000f557  /system/lib/libc.so (free+10)
#09 pc 001d5ba3  /system/lib/libart.so (art::JNI::ReleaseIntArrayElements(_JNIEnv*, _jintArray*, int*, int)+518)
#10 pc 000d0101  /system/lib/libart.so (art::CheckJNI::ReleaseIntArrayElements(_JNIEnv*, _jintArray*, int*, int)+116)
#11 pc 00001f1b  /data/app-lib/{packagename}/libgif.so
#12 pc 000020d5  /data/app-lib/{packagename}/libgif.so
#13 pc 0000246d  /data/app-lib/{packagename}/libgif.so (Java_pl_droidsonroids_gif_GifDrawable_openByteArray+104)
@koral-- koral-- added the bug label Jul 2, 2014
@koral-- koral-- self-assigned this Jul 2, 2014
@JaredBanyard
Copy link

Yup seeing this too

@koral--
Copy link
Owner

koral-- commented Jul 3, 2014

Usage of pointer returned by GetIntArrayElements changed according to https://developer.android.com/guide/practices/verifying-apps-art.html#JNI_and_GC

Tested only on ARM (Nexus). Need to test on x86, TV and wearables. There is no OOTB L on travis yet.

@Wavesonics
Copy link
Contributor

Yup, seeing this on Nexus 5s running Android L

@koral--
Copy link
Owner

koral-- commented Jul 16, 2014

Did it happen on snapshot version (after d1bf0c5 was included)?

@Wavesonics
Copy link
Contributor

These crashes are in our production app so we're using the latest release: 1.0.8

I don't currently have a L preview device or emulator, if I have time I'll get one later and give it a try.

Would it be worth doing a 1.0.9 release with that fix? If so I could release it in our hotfix and do some pretty wide testing of it.

@koral--
Copy link
Owner

koral-- commented Jul 18, 2014

OK, ndk-r10 with L target is finally out (previous snapshot was compiled by old ndk-9d but new build tools). I've just uploaded build with binaries compiled using it to maven snapshot repository. 64-bit versions are included.
Warnings -Wpointer-to-int-cast started to appearing with the new compiler. After investigating them I will cherry-pick some commits from experimental to master and release 1.0.9.

@ghost
Copy link

ghost commented Jul 20, 2014

As you can see here (https://github.com/koral--/android-gif-drawable/issues/70) many people see that also on 4.x versions...

@koral-- koral-- added this to the 1.0.9 milestone Jul 20, 2014
@koral--
Copy link
Owner

koral-- commented Jul 20, 2014

Travis config updated in f0f5bd0, pointer cast warnings issue moved into #71 (abiFilter all32 added by now). #70 is not related to L but need to be resolved before releasing 1.0.9.

@koral-- koral-- closed this as completed Jul 20, 2014
@spencergriffin
Copy link
Author

I'm still seeing issues using the snapshot.

/system/lib/libart.so (art::CheckJNI::ReleaseIntArrayElements(_JNIEnv*, _jintArray*, int*, int)+116)
/data/app-lib/{PackageName}/libgif.so (Java_pl_droidsonroids_gif_GifDrawable_renderFrame+126)

@koral-- koral-- reopened this Jul 23, 2014
@Wavesonics
Copy link
Contributor

Last I checked the fix was only in the experimental branch, are you sure you're testing a build that actually contains the fix?

I integrated the fix into master locally and it fixed the crash.

@spencergriffin
Copy link
Author

Yes, I tried the experimental branch and I also tried pulling the commit into master and I am still crashing.

@koral--
Copy link
Owner

koral-- commented Jul 24, 2014

@Wavesonics backtrace is different than that in first post.
In the second case possible reason I see now is that GetIntArrayElements returned NULL (which was passed to ReleaseIntArrayElements). It is likely hard to reproduce. I've added some nullchecks, snapshot uploaded to repository.

PS
The easiest way to get snapshot release is to add snapshot repository to repositories in buildscript (usualy found in top-level build.gradle file):

maven{ url('https://oss.sonatype.org/content/repositories/snapshots')}

Snapshot is compiled from the latest commit in experimental branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants