Ask Your Question

WillJonesMagic's profile - activity

2015-12-10 11:37:30 -0600 received badge  Editor (source)
2015-12-10 08:19:54 -0600 asked a question Android SIGSEGV on Gaussian filter (Issue appears to be inside Mat class)

Hi all,

I have an android application with a JavaCameraView in my activity and I'm modifying the camera feed through onCameraFrame. I'm applying a Gaussian Blur followed by a Laplacian filter and merging the two together. Due to this being quite computationally heavy I've offloaded this processing onto another thread which runs every other camera frame and updates a Mat field variable (I don't mind the Laplaced image being a bit behind the camera feed). The app will run perfectly fine for around 30 seconds or so and then crash.

EDIT: I've done some more investigation and this isn't the only problem that there appears to be. Removing the Gaussian filter statement merely serves to delay the inevitable as there's another issue that occurs in addWeighted when it calls Mat::deallocate (which in turn runs MatAllocator::unmap where I get the same problem.

I've traced this back through LogCat and have the following stack trace:


12-10 13:27:50.022 2466-3521/uk.co.willjonesmagic.app A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xd4a51008 in tid 3521 (AsyncTask #3)
12-10 13:27:50.123 349-349/? D/clmlib: Got activities:0x0000000E
12-10 13:27:50.125 349-349/? I/DEBUG: *
12-10 13:27:50.125 349-349/? I/DEBUG: UUID: 08c1056a-52a9-4cfa-92d3-8c81bf9b290b
12-10 13:27:50.126 349-349/? I/DEBUG: Build fingerprint: 'Sony/C6903/C6903:5.1.1/14.6.A.1.236/2031203603:user/release-keys'
12-10 13:27:50.126 349-349/? I/DEBUG: Revision: '0'
12-10 13:27:50.126 349-349/? I/DEBUG: ABI: 'arm'
12-10 13:27:50.127 349-349/? I/DEBUG: pid: 2466, tid: 3521, name: AsyncTask #3 >>> uk.co.willjonesmagic.app <<<
12-10 13:27:50.127 349-349/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xd4a51008
12-10 13:27:50.162 349-349/? I/DEBUG: r0 b4a5100c r1 b6ec87f4 r2 b4a51000 r3 ffffffe0
12-10 13:27:50.163 349-349/? I/DEBUG: r4 00000001 r5 07ffffff r6 00000000 r7 b6ec880c
12-10 13:27:50.163 349-349/? I/DEBUG: r8 00000000 r9 fffffffc sl b6ec87f4 fp 00000003
12-10 13:27:50.164 349-349/? I/DEBUG: ip 00000037 sp 98ed80e4 lr b6e958a1 pc b6e943c6 cpsr 000f0030
12-10 13:27:50.166 349-349/? I/DEBUG: #00 pc 0003d3c6 /system/lib/libc.so (arena_run_reg_alloc+101)
12-10 13:27:50.166 349-349/? I/DEBUG: #01 pc 0003e89d /system/lib/libc.so (je_arena_tcache_fill_small+96)
12-10 13:27:50.166 349-349/? I/DEBUG: #02 pc 0004c447 /system/lib/libc.so (je_tcache_alloc_small_hard+14)
12-10 13:27:50.167 349-349/? I/DEBUG: #03 pc 0004801b /system/lib/libc.so (je_malloc+302)
12-10 13:27:50.167 349-349/? I/DEBUG: #04 pc 0000fe1f /system/lib/libc.so (malloc+10)
12-10 13:27:50.168 349-349/? I/DEBUG: #05 pc 0063e4a0 /data/app/uk.co.willjonesmagic.app-2/lib/arm/libopencv_java3.so (operator new(unsigned int)+24)
12-10 13:27:50.168 349-349/? I/DEBUG: #06 pc 0016decd /data/app/uk.co.willjonesmagic.app-2/lib/arm/libopencv_java3.so
12-10 13:27:50 ...




















(more)