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
Contributor
gocolinn
Posts: 11
Registered: ‎01-15-2013
My Device: Playbook 32
My Carrier: n/a

stdc++ library and crash in Simulator

Hello Everyone.  I need some help regarding how to troubleshoot this segmentation fault I get whenever I att stdc++ to the list of libraries to link against.  I am using:

 

Eclipse Momentics (Linux)

Version: 10.0.9
Build id: v201212072306

 

BB Dev Alpha Simulator 10.0.09.2318

 

host_10_0_9_529

target_10_0_9_2318

 

First I create a new Cascades C++ project (Im using HelloCascade).  When running this in the simulator I get no issues. Everything displays/works as expected.   Here is the qcc output

 

**** Build of configuration Simulator-Debug for project HelloCascades ****

make Simulator-Debug
cd x86 && /home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/qmake -spec blackberry-x86-qcc ../HelloCascades.pro  CONFIG+=debug_and_release CONFIG+=simulator
make -C .//translations -f Makefile update
make[1]: Entering directory `/home/colinn/Projects/HelloCascades/translations'
/home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/lupdate HelloCascades.pro
Updating 'HelloCascades.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_en_GB.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_fr.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_it.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_de.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_es.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
make[1]: Leaving directory `/home/colinn/Projects/HelloCascades/translations'
make -C .//translations -f Makefile release
make[1]: Entering directory `/home/colinn/Projects/HelloCascades/translations'
/home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/lrelease HelloCascades.pro
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_en_GB.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_fr.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_it.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_de.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_es.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
make[1]: Leaving directory `/home/colinn/Projects/HelloCascades/translations'
make -C ./x86 -f Makefile debug
make[1]: Entering directory `/home/colinn/Projects/HelloCascades/x86'
make -f Makefile.Debug
make[2]: Entering directory `/home/colinn/Projects/HelloCascades/x86'
qcc -Vgcc_ntox86 -c -Wno-psabi -lang-c++ -fstack-protector-strong -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -o o-g/.obj/hellocascadesapp.o ../src/hellocascadesapp.cpp
qcc -Vgcc_ntox86 -c -Wno-psabi -lang-c++ -fstack-protector-strong -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -o o-g/.obj/main.o ../src/main.cpp
/home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/moc -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -D__QNXNTO__ ../src/hellocascadesapp.h -o o-g/.moc/moc_hellocascadesapp.cpp
qcc -Vgcc_ntox86 -c -Wno-psabi -lang-c++ -fstack-protector-strong -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -o o-g/.obj/moc_hellocascadesapp.o o-g/.moc/moc_hellocascadesapp.cpp
qcc -Vgcc_ntox86 -lang-c++ -Wl,-rpath-link,/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/lib -Wl,-rpath-link,/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib -Wl,-rpath-link,/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib/qt4/lib -o o-g/HelloCascades o-g/.obj/hellocascadesapp.o o-g/.obj/main.o o-g/.obj/moc_hellocascadesapp.o    -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/lib -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib/qt4/lib -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/armle-v7/usr/lib/qt4/lib -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps
make[2]: Leaving directory `/home/colinn/Projects/HelloCascades/x86'
make[1]: Leaving directory `/home/colinn/Projects/HelloCascades/x86'

**** Build Finished ****

 

 

 

When I add -lstdc++ to the LIBS line in the HelloCascades.pro project the HelloCascades app will crash from a segmentation fault prior to main entry.   Here is the qcc output from a clean build.

 

 

**** Build of configuration Simulator-Debug for project HelloCascades ****

make Simulator-Debug 
cd x86 && /home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/qmake -spec blackberry-x86-qcc ../HelloCascades.pro  CONFIG+=debug_and_release CONFIG+=simulator
make -C .//translations -f Makefile update
make[1]: Entering directory `/home/colinn/Projects/HelloCascades/translations'
/home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/lupdate HelloCascades.pro
Updating 'HelloCascades.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_en_GB.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_fr.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_it.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_de.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
Updating 'HelloCascades_es.ts'...
    Found 1 source text(s) (0 new and 1 already existing)
make[1]: Leaving directory `/home/colinn/Projects/HelloCascades/translations'
make -C .//translations -f Makefile release
make[1]: Entering directory `/home/colinn/Projects/HelloCascades/translations'
/home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/lrelease HelloCascades.pro
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_en_GB.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_fr.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_it.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_de.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
Updating '/home/colinn/Projects/HelloCascades/translations/HelloCascades_es.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 1 untranslated source text(s)
make[1]: Leaving directory `/home/colinn/Projects/HelloCascades/translations'
make -C ./x86 -f Makefile debug
make[1]: Entering directory `/home/colinn/Projects/HelloCascades/x86'
make -f Makefile.Debug
make[2]: Entering directory `/home/colinn/Projects/HelloCascades/x86'
qcc -Vgcc_ntox86 -c -Wno-psabi -lang-c++ -fstack-protector-strong -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -o o-g/.obj/hellocascadesapp.o ../src/hellocascadesapp.cpp
qcc -Vgcc_ntox86 -c -Wno-psabi -lang-c++ -fstack-protector-strong -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -o o-g/.obj/main.o ../src/main.cpp
/home/colinn/Developer/bb/10/host_10_0_9_529/linux/x86/usr/bin/moc -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -D__QNXNTO__ ../src/hellocascadesapp.h -o o-g/.moc/moc_hellocascadesapp.cpp
qcc -Vgcc_ntox86 -c -Wno-psabi -lang-c++ -fstack-protector-strong -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/share/qt4/mkspecs/blackberry-x86-qcc -I../../HelloCascades -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtCore -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4/QtDeclarative -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/qt4 -I../src -Io-g/.moc -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include -I../../../Developer/bb/10/target_10_0_9_2318/qnx6/usr/include/freetype2 -I. -o o-g/.obj/moc_hellocascadesapp.o o-g/.moc/moc_hellocascadesapp.cpp
qcc -Vgcc_ntox86 -lang-c++ -Wl,-rpath-link,/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/lib -Wl,-rpath-link,/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib -Wl,-rpath-link,/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib/qt4/lib -o o-g/HelloCascades o-g/.obj/hellocascadesapp.o o-g/.obj/main.o o-g/.obj/moc_hellocascadesapp.o    -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/lib -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/x86/usr/lib/qt4/lib -L/home/colinn/Developer/bb/10/target_10_0_9_2318/qnx6/armle-v7/usr/lib/qt4/lib -lstdc++ -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps 
make[2]: Leaving directory `/home/colinn/Projects/HelloCascades/x86'
make[1]: Leaving directory `/home/colinn/Projects/HelloCascades/x86'

**** Build Finished ****

 



 

What am I missing ?  I need libstdc++ for another project but I can't get past this, what should be, simple library add.  Any ideas?

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: stdc++ library and crash in Simulator

what does stack trace look like when you get segfault?

Please use plain text.
Contributor
gocolinn
Posts: 11
Registered: ‎01-15-2013
My Device: Playbook 32
My Carrier: n/a

Re: stdc++ library and crash in Simulator

Here is the stack.  Is this a GNU/Dinkum issue?

 

/home/colinn/Projects/HelloCascades/x86/o-g/HelloCascades [22388867]	
	Thread [1] (Suspended : Signal : SIGSEGV:Segmentation fault)	
		0xb9541835	
		0xb8984f4c	
		0xb8984f61	

 

Please use plain text.
New Developer
frisko
Posts: 9
Registered: 2 weeks ago
My Device: Z10
My Carrier: Vodafone

Re: stdc++ library and crash in Simulator

How did you fix this issue?
Please use plain text.