Ask Your Question
0

Segmentation fault on imread after upgrading to Ubuntu 13.10

asked 2014-02-02 22:08:26 -0600

tarun gravatar image

I upgraded to Ubuntu 13.10 and now get a segfault on imread. I've run the same code on 13.04 and there were no issues. I then tried to use the script at: https://help.ubuntu.com/community/OpenCV. The script installed OpenCV 2.4.8 fine, but the same issue happened when running my binary. I ran valgrind to try to find the source of the error, but I'm stumped.

tarun@heron:~$ valgrind ./DisplayImage Documents/getwell/war/rock.gif
==23413== Memcheck, a memory error detector
==23413== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==23413== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==23413== Command: ./DisplayImage Documents/getwell/war/rock.gif
==23413== 
==23413== Jump to the invalid address stated on the next line
==23413==    at 0x0: ???
==23413==    by 0x13D81DE6: ??? (in /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so)
==23413==    by 0x13D87821: ??? (in /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so)
==23413==    by 0x12C9FE05: ??? (in /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0)
==23413==    by 0x12CA04D3: ??? (in /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0)
==23413==    by 0x12CA0C5C: p11_kit_initialize_registered (in /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0)
==23413==    by 0x109AFDB9: gnutls_pkcs11_init (in /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.6)
==23413==    by 0x1099A40F: gnutls_global_init (in /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.6)
==23413==    by 0x98D7BED: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.1)
==23413==    by 0x991973E: avformat_network_init (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.1)
==23413==    by 0x506A753: _GLOBAL__sub_I_cap_ffmpeg.cpp (in            /usr/local/lib/libopencv_highgui.so.2.4.8)
==23413==    by 0x400F855: call_init.part.0 (dl-init.c:84)
==23413==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==23413== 
==23413== 
==23413== Process terminating with default action of signal 11 (SIGSEGV)
==23413==  Bad permissions for mapped region at address 0x0
==23413==    at 0x0: ???
==23413==    by 0x13D81DE6: ??? (in /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so)
==23413==    by 0x13D87821: ??? (in /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so)
==23413==    by 0x12C9FE05: ??? (in /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0)
==23413==    by 0x12CA04D3: ??? (in /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0)
==23413==    by 0x12CA0C5C: p11_kit_initialize_registered (in /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0)
==23413==    by 0x109AFDB9: gnutls_pkcs11_init (in /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.6)
==23413==    by 0x1099A40F: gnutls_global_init (in /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.6)
==23413==    by 0x98D7BED: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.1)
==23413==    by 0x991973E: avformat_network_init (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.1)
==23413==    by 0x506A753: _GLOBAL__sub_I_cap_ffmpeg.cpp (in /usr/local/lib/libopencv_highgui.so.2.4.8)
==23413==    by 0x400F855: call_init.part.0 (dl-init.c:84)
==23413== 
==23413== HEAP SUMMARY:
==23413==     in use at exit: 92,860 bytes in 1,285 blocks
==23413==   total heap usage: 1,848 allocs, 563 frees, 181,192 bytes allocated
==23413== 
==23413== LEAK SUMMARY:
==23413==    definitely lost: 0 bytes in 0 blocks
==23413==    indirectly lost: 0 bytes in 0 blocks
==23413==      possibly lost: 4,936 bytes in 88 blocks
==23413==    still reachable: 87,924 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-05 10:42:11 -0600

Since you have upgraded your system,most of libraries you installed for 13.04 version(while installing opencv) are sometimes not compatible to 13.10.SO i would say u should remove opencv and install it again. LINK to install opencv: http://abhishek4273.wordpress.com/2014/02/05/install-opencv/

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-02 22:08:26 -0600

Seen: 544 times

Last updated: Feb 05 '14