Crashes on textureloader since uno 1.10

Hello,

Since uno 1.10 we’ve been getting crashes on android when we try to fetch an image. From the adb logcat it seems to be related to the experimental textureloader:

12-14 16:39:05.365 2632 2688 F libc : Fatal signal 7 (SIGBUS), code 1, fault addr 0xf04fb521 in tid 2688 (Thread-4)
12-14 16:39:05.459 2689 2689 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-14 16:39:05.459 2689 2689 F DEBUG : Build fingerprint: ‘samsung/zerofltexx/zeroflte:7.0/NRD90M/G920FXXU6ERF5:user/release-keys’
12-14 16:39:05.459 2689 2689 F DEBUG : Revision: ‘11’
12-14 16:39:05.459 2689 2689 F DEBUG : ABI: ‘arm’
12-14 16:39:05.459 2689 2689 F DEBUG : pid: 2632, tid: 2688, name: Thread-4 >>> nl.section5.spakler <<<
12-14 16:39:05.459 2689 2689 F DEBUG : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xf04fb521
12-14 16:39:05.459 2689 2689 F DEBUG : r0 f04fb521 r1 00000001 r2 00000000 r3 f08df2f4
12-14 16:39:05.459 2689 2689 F DEBUG : r4 f04fb519 r5 f0880000 r6 cd861108 r7 f08df2f4
12-14 16:39:05.459 2689 2689 F DEBUG : r8 f04fb521 r9 000003fe sl f08da008 fp f08df2f4
12-14 16:39:05.459 2689 2689 F DEBUG : ip f08d585c sp c5ddd430 lr f08a274b pc f0894a8a cpsr 40070030
12-14 16:39:05.468 2689 2689 F DEBUG :
12-14 16:39:05.468 2689 2689 F DEBUG : backtrace:
12-14 16:39:05.468 2689 2689 F DEBUG : #00 pc 00047a8a /system/lib/libc.so (pthread_mutex_lock+21)
12-14 16:39:05.468 2689 2689 F DEBUG : #01 pc 00055747 /system/lib/libc.so (je_arena_dalloc_large+18)
12-14 16:39:05.468 2689 2689 F DEBUG : #02 pc 0006717b /system/lib/libc.so (je_free+74)
12-14 16:39:05.468 2689 2689 F DEBUG : #03 pc 006ed8bb /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN5uBase6StringD1Ev+6)
12-14 16:39:05.468 2689 2689 F DEBUG : #04 pc 006831f3 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN6uImage10JpegReader9errorExitEP18jpeg_common_struct+94)
12-14 16:39:05.468 2689 2689 F DEBUG : #05 pc 0069c4c1 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so
12-14 16:39:05.468 2689 2689 F DEBUG : #06 pc 0069bc23 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so
12-14 16:39:05.468 2689 2689 F DEBUG : #07 pc 0069b48f /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (jpeg_consume_input+86)
12-14 16:39:05.468 2689 2689 F DEBUG : #08 pc 0069b411 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (jpeg_read_header+36)
12-14 16:39:05.468 2689 2689 F DEBUG : #09 pc 00682c4d /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN6uImage10JpegReaderC2EPN5uBase6StreamE+200)
12-14 16:39:05.468 2689 2689 F DEBUG : #10 pc 00682b6f /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN6uImage4Jpeg12CreateReaderEPN5uBase6StreamE+18)
12-14 16:39:05.468 2689 2689 F DEBUG : #11 pc 005c4c63 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN1g12Experimental13TextureLoader17TextureLoaderImpl24JpegByteArrayToTexture2DEPNS_3Uno6BufferEPNS1_8CallbackE+78)
12-14 16:39:05.468 2689 2689 F DEBUG : #12 pc 005c4ad3 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN1g12Experimental13TextureLoader13TextureLoader24JpegByteArrayToTexture2DEPNS_3Uno6BufferEP9uDelegate+22)
12-14 16:39:05.468 2689 2689 F DEBUG : #13 pc 005c495b /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN1g12Experimental13TextureLoader13TextureLoader31ByteArrayToTexture2DContentTypeEPNS_3Uno6BufferEP7uStringP9uDelegate+70)
12-14 16:39:05.468 2689 2689 F DEBUG : #14 pc 00499cf3 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN1g4Fuse9Resources35HttpImageSourceImpl__BackgroundLoad3RunEv+46)
12-14 16:39:05.468 2689 2689 F DEBUG : #15 pc 0045c163 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (_ZN1g4Fuse14GraphicsWorker3RunEv+134)
12-14 16:39:05.468 2689 2689 F DEBUG : #16 pc 00435dcb /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so (ZN1g3Uno9Threading6Thread10ThreadMainEPS2+58)
12-14 16:39:05.468 2689 2689 F DEBUG : #17 pc 00435e33 /data/app/nl.section5.spakler-1/lib/arm/libSpaklerFuse.so
12-14 16:39:05.468 2689 2689 F DEBUG : #18 pc 00047493 /system/lib/libc.so (_ZL15__pthread_startPv+22)
12-14 16:39:05.468 2689 2689 F DEBUG : #19 pc 00019f6d /system/lib/libc.so (__start_thread+6)

It is tested on a samsung S8 and a samsung S6. On the S8 we’re not getting this crashes if we downgrade the libs. On the s6 we’re getting these crashes working with fuselibs 1.9 and upwards with uno 1.10. No issues when working with uno 1.9. Does anybody have any clue what is going wrong or even where to look at to prevent/fix this? We’re a bit stuck. And a bit out of ideas what to look at.

Problem found. Apparently our API was serving png images as jpeg and the loader couldn’t handle this properly. Strange thing remains that this is something the API was doing for a long time, but the app only crashed after upgrading to uno 1.10. After fixing the way our API serves the images the problem was solved.

1 Like