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

Multiple GifImageView's causing crash #434

Closed
DanielSobczak opened this issue Aug 4, 2017 · 2 comments
Closed

Multiple GifImageView's causing crash #434

DanielSobczak opened this issue Aug 4, 2017 · 2 comments
Labels

Comments

@DanielSobczak
Copy link

DanielSobczak commented Aug 4, 2017

Hi, when I was implementing your library I found out that I can't use GifImageView's in a ViewPager because it causing library to crash.

Here is the stacktrace

08-04 08:01:06.027 11660-11713/pl.droidsonroids.gif.sample A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xa0535325 in tid 11713 (pool-3-thread-1)
08-04 08:01:06.080 16452-16452/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-04 08:01:06.080 16452-16452/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/MMB29K/2419427:user/release-keys'
08-04 08:01:06.080 16452-16452/? A/DEBUG: Revision: '0'
08-04 08:01:06.080 16452-16452/? A/DEBUG: ABI: 'arm'
08-04 08:01:06.080 16452-16452/? A/DEBUG: pid: 11660, tid: 11713, name: pool-3-thread-1  >>> pl.droidsonroids.gif.sample <<<
08-04 08:01:06.080 16452-16452/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa0535325
08-04 08:01:06.112 16452-16452/? A/DEBUG:     r0 9eb60393  r1 a0535325  r2 00000001  r3 00000000
08-04 08:01:06.112 16452-16452/? A/DEBUG:     r4 00000001  r5 acc20430  r6 00000000  r7 9eb60388
08-04 08:01:06.112 16452-16452/? A/DEBUG:     r8 00000000  r9 00000001  sl aa786440  fp 9eb603b8
08-04 08:01:06.112 16452-16452/? A/DEBUG:     ip 80000000  sp 9eb60370  lr 9f9f5307  pc b6d296ae  cpsr 800b4430
08-04 08:01:06.169 16452-16452/? A/DEBUG: backtrace:
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #00 pc 000176ae  /system/lib/libc.so (__memcpy_base+165)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #01 pc 00003303  /data/app/pl.droidsonroids.gif.sample-2/base.apk (offset 0x11f000)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #02 pc 000039f9  /data/app/pl.droidsonroids.gif.sample-2/base.apk (offset 0x11f000)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #03 pc 00002505  /data/app/pl.droidsonroids.gif.sample-2/base.apk (offset 0x11f000)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #04 pc 00001fb7  /data/app/pl.droidsonroids.gif.sample-2/base.apk (offset 0x11f000)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #05 pc 00910d21  /data/app/pl.droidsonroids.gif.sample-2/oat/arm/base.odex (offset 0x421000) (long pl.droidsonroids.gif.GifInfoHandle.renderFrame(long, android.graphics.Bitmap)+116)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #06 pc 009128d7  /data/app/pl.droidsonroids.gif.sample-2/oat/arm/base.odex (offset 0x421000) (long pl.droidsonroids.gif.GifInfoHandle.renderFrame(android.graphics.Bitmap)+90)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #07 pc 0091e3e3  /data/app/pl.droidsonroids.gif.sample-2/oat/arm/base.odex (offset 0x421000) (void pl.droidsonroids.gif.RenderTask.doWork()+134)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #08 pc 00907615  /data/app/pl.droidsonroids.gif.sample-2/oat/arm/base.odex (offset 0x421000) (void pl.droidsonroids.gif.SafeRunnable.run()+104)
08-04 08:01:06.169 16452-16452/? A/DEBUG:     #09 pc 71c7c8af  /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1ec9000)

On my fork you can find code that is causing the crash, to reproduce it just launch app and scroll through ViewPager

I tested it on two devices (same result):

  • Nexus 5 (6.0.1)
  • Samsung Galaxy Note 4 (6.0.1)
@koral-- koral-- added the bug label Aug 4, 2017
@koral--
Copy link
Owner

koral-- commented Aug 4, 2017

OK, I'll investigate that.

@koral--
Copy link
Owner

koral-- commented Aug 6, 2017

That's because there were no strong/global references to byte buffers so they were garbage collected causing heap corruption.
Fixed in 1.2.8-SNAPSHOT.
Thanks for the report.

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

2 participants