Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 32
Registered: ‎08-26-2008
My Device: Not Specified

SIGABRT, corrupt stack? after linking with Sqlite

Hi Developers,

 

I am attempting to port a POSIX app to PlayBook. It includes FFMPEG (libavcodec, libavutil, libavformat) and sqlite3.

 

When I don't link against sqlite3, the app works fine.

qcc -o src/miniprobe.o ../src/miniprobe.c -V4.4.2,gcc_ntoarmv7le -w1 -I/Developer/SDKs/bbndk-2.0.0/target/qnx6/usr/include/freetype2 -I/Developer/SDKs/bbndk-2.0.0/target/qnx6/../target-override/usr/include -I/opt/local/cross/bbndk-2.0/arm-qnx6.5.0eabi/sys-root/include -D_FORTIFY_SOURCE=2 -c -O0 -g -fstack-protector-all
qcc -o miniprobe -V4.4.2,gcc_ntoarmv7le -w1 -g -Wl,-z,relro -Wl,-z,now -L/Developer/SDKs/bbndk-2.0.0/target/qnx6/../target-override/armle-v7/lib -L/Developer/SDKs/bbndk-2.0.0/target/qnx6/../target-override/armle-v7/usr/lib -L/opt/local/cross/bbndk-2.0/arm-qnx6.5.0eabi/sys-root/lib src/miniprobe.o -lbps -lsqlite3 -lavutil -lavformat -lavcodec
Build complete for project miniprobe

 

When I link against sqlite3, I get double-free(?) SIGABRT inside libavformat.

bt
#0  0x017cc5d0 in SignalKill () from /Developer/SDKs/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib/ldqnx.so.2
#1  0x017bca80 in raise () from /Developer/SDKs/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib/ldqnx.so.2
#2  0x017b7b5c in __malloc_panic_str () from /Developer/SDKs/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib/ldqnx.so.2
#3  0x017b8d4c in _list_release () from /Developer/SDKs/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib/ldqnx.so.2
#4  0x017ba6ec in __free () from /Developer/SDKs/bbndk-2.0.0/target/qnx6/armle-v7/usr/lib/ldqnx.so.2
#5  0x78067958 in ?? ()
#6  0x78067958 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

STDOUT includes this:

Malloc Check Failed: :/builds/GR2_0_0-Worldbuild/latest/svn/lib/c/alloc/dlist.c:1121


 

 

When I link against sqlite3 and use the Memory Analysis debug option, it doesn't crash either.

 

FFMPEG was cross-compiled like this:

./configure --enable-cross-compile --cross-prefix=arm-unknown-nto-qnx6.5.0eabi- --arch=armv7 --prefix=/opt/local/cross/bbndk-2.0/arm-qnx6.5.0eabi/sys-root --enable-debug --disable-optimizations --disable-asm --disable-static --enable-shared --target-os=qnx --disable-ffplay

 

I am using the gold NDK-2.0, testing on Tablet OS 2.0.0.7971.

 

What is sqlite3 doing?? I'm not even calling any sqlite3 functions, just linking to it!

Any suggestions welcome! I'm pulling out my hair here!

New Contributor
Posts: 4
Registered: ‎01-04-2012
My Device: blackberry playbook

Re: SIGABRT, corrupt stack? after linking with Sqlite

[ Edited ]

i had tried to port ffmpeg and got same problem...