Re: Android samples crashing on HTC One X

339 views
Skip to first unread message

Andrey Kamaev

unread,
Aug 22, 2012, 3:13:46 AM8/22/12
to android...@googlegroups.com
Hi,

Both problems are known (crash and black screen on reopening). Fix for the crash is being tested and will be available within a week.

/Andrey

On Wednesday, August 22, 2012 4:02:07 AM UTC+4, Alex wrote:
Hello,

I'm trying to run OpenCV Android samples from OpenCV-2.4.2-android-sdk, and most of them are crashing on HTC One X.
I installed OpenCV Manager, and OCV 2.4 pack NVIDIA Tegra 3, and tried all APKs. The working ones are: tutorial-0, 1, 3, 4. The rest, including tutorial-2-opencvcamera crash.
Tried to build the samples myself - nothing changed.

It looks like those, which are working, use the standard Android class Camera, and those which crash use opencv's VideoCapture.

The crash call stack usually looks like this:

    #00  pc 00014122  /system/lib/libc.so (dlmalloc)
    #01  pc 000150f0  /system/lib/libc.so (dlcalloc)
    #02  pc 0001646c  /system/lib/libc.so (calloc)
    #03  pc 0005ef54  /system/lib/libdvm.so
    #04  pc 0005fc9c  /system/lib/libdvm.so (_Z21dvmCreateInterpThreadP6Objecti)
    #05  pc 00073fbe  /system/lib/libdvm.so
    #06  pc 00030d0c  /system/lib/libdvm.so
    #07  pc 0003499c  /system/lib/libdvm.so (_Z12dvmInterpretP6ThreadPK6MethodP6JValue)
    #08  pc 0006d1ce  /system/lib/libdvm.so (_Z15dvmInvokeMethodP6ObjectPK6MethodP11ArrayObjectS5_P11ClassObjectb)
    #09  pc 00074926  /system/lib/libdvm.so
    #10  pc 00030d0c  /system/lib/libdvm.so
    #11  pc 0003499c  /system/lib/libdvm.so (_Z12dvmInterpretP6ThreadPK6MethodP6JValue)
    #12  pc 0006d49e  /system/lib/libdvm.so (_Z14dvmCallMethodVP6ThreadPK6MethodP6ObjectbP6JValueSt9__va_list)
    #13  pc 0005579a  /system/lib/libdvm.so
    #14  pc 00047702  /system/lib/libandroid_runtime.so
    #15  pc 000483c6  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcS2_)
    #16  pc 00008f0a  /system/bin/app_process
    #17  pc 00016b0c  /system/lib/libc.so (__libc_init)

For the face-detection sample it's different though:

    #00  pc 00002778  /system/lib/libnvrm_graphics.so (NvRmChannelGetModuleWaitBase)
    #01  pc 00001f6a  /system/lib/libnvrm_graphics.so (NvRmStreamInitEx)
    #02  pc 00001ff0  /system/lib/libnvrm_graphics.so (NvRmStreamInit)
    #03  pc 00004280  /system/lib/libnvddk_2d_v2.so
    #04  pc 0000730a  /system/lib/libnvddk_2d_v2.so
    #05  pc 0000c96c  /system/lib/libnvddk_2d_v2.so (NvDdk2dBlitExt)
    #06  pc 00005918  /system/lib/hw/gralloc.tegra.so
    #07  pc 00005cac  /system/lib/hw/gralloc.tegra.so (NvGr2DClear)
    #08  pc 00002de8  /system/lib/hw/gralloc.tegra.so
    #09  pc 00010dd0  /system/lib/libui.so (_ZN7android22GraphicBufferAllocator5allocEjjiiPPK13native_handlePi)
    #10  pc 0001074a  /system/lib/libui.so (_ZN7android13GraphicBuffer8initSizeEjjij)
    #11  pc 00010abe  /system/lib/libui.so (_ZN7android13GraphicBufferC1Ejjij)
    #12  pc 00218a84  /data/data/org.opencv.lib_v24_tegra3/lib/libopencv_java.so (_ZNK5tegra12GpuConnector22constructGraphicBufferEPKNS_17GraphicBufferStubEjjij)
    #13  pc 00217ea6  /data/data/org.opencv.lib_v24_tegra3/lib/libopencv_java.so (_ZN5tegra9GpuBufferC1EttPKv)

Here are the complete logs from the crashes:
http://pastebin.com/uh4id8GQ
http://pastebin.com/BDNtHYL6
http://pastebin.com/mq4WB7na

Tried on Samsung Note with Android 4.0.4 as well. The same samples work, and those, which crashed on the One X, just freeze with black screen on the Note.

Is there a fix for this?

Thanks,
Alex

Alex

unread,
Aug 30, 2012, 3:23:33 PM8/30/12
to android...@googlegroups.com
Hi Andrey and OpenCV Team,

Is this fix already available? If so, where can I find it?
As far as I understand, the next OpenCV release will be only in several months, meanwhile are there any "developer's builds", or intermediate "unstable versions", or is the only way to get a fix to apply a specific patch?

Thanks,
Alex

Rui Marques

unread,
Sep 2, 2012, 4:55:02 PM9/2/12
to android...@googlegroups.com
Yes there is a developer build here that you can compile  http://code.opencv.org/projects/opencv/repository/show?rev=master

Rui Marques

unread,
Sep 4, 2012, 4:36:00 AM9/4/12
to android...@googlegroups.com
To clarify, my previous post i was just pointing the "developer build". About the fix I do not know if it is available =)

Alex

unread,
Sep 5, 2012, 1:24:37 AM9/5/12
to android...@googlegroups.com
OK, I've tried to build from the trunk.
Apparently the problem is still there. The same samples crash on my HTC One X.

Here's the crash stack from example-color-blob-detection:

 #00  pc 00013ccc  /system/lib/libc.so (dlmalloc)
 #01  pc 000165a4  /system/lib/libc.so (malloc)
 #02  pc 00020daa  /system/lib/libutils.so (_ZN7android12SharedBuffer5allocEj)
 #03  pc 0002225e  /system/lib/libutils.so (_ZN7android8String16C1EPKtj)
 #04  pc 0001edda  /system/lib/libbinder.so (_ZNK7android6Parcel12readString16Ev)
 #05  pc 0001eeba  /system/lib/libbinder.so (_ZNK7android6Parcel16enforceInterfaceERKNS_8String16EPNS_14IPCThreadStateE)
 #06  pc 0001ef3e  /system/lib/libbinder.so (_ZNK7android6Parcel14checkInterfaceEPNS_7IBinderE)
 #07  pc 0001e238  /system/lib/libgui.so (_ZN7android16BnSurfaceTexture10onTransactEjRKNS_6ParcelEPS1_j)
 #08  pc 00018024  /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j)
 #09  pc 0001b512  /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi)
 #10  pc 0001b0e2  /system/lib/libbinder.so (_ZN7android14IPCThreadState15waitForResponseEPNS_6ParcelEPi)
 #11  pc 0001b7fc  /system/lib/libbinder.so (_ZN7android14IPCThreadState8transactEijRKNS_6ParcelEPS1_j)
 #12  pc 00018636  /system/lib/libbinder.so (_ZN7android8BpBinder8transactEjRKNS_6ParcelEPS1_j)
 #13  pc 00014e14  /system/lib/libcamera_client.so
 #14  pc 00012c68  /system/lib/libcamera_client.so (_ZN7android6Camera17setPreviewTextureERKNS_2spINS_15ISurfaceTextureEEE)


Is it a new issue, or just not yet fixed known one?

Alex

Alex

unread,
Sep 25, 2012, 3:41:05 AM9/25/12
to android...@googlegroups.com
The samples built from the trunk are still crashing the same way in dlmalloc.
Is there any plan to look at this issue?

Thanks,
Alex
Reply all
Reply to author
Forward
0 new messages