Hi,
I would like to develop Apps with OSG and Qt for BlackBerry10 devices.
I've built OSG for BlackBerry10 using the CMake GUI and the ARM toolchain which
is provided by the BlackBerry Native SDK. In CMake, I added
the include path and the library of GDAL which I also built from source
with the ARM toolchain
GLESv1 (I've used the settings as descibed in the OSG Wiki)
Qt4 dependencies. Therefor I've used the already existing Qt libraries
which are preinstalled on BlackBerry10
the zlib include directory and library
Further CMake configuration I set:
BUILD_OPENTHREADS_WITH_QT: ON
OSG_WINDOWING_SYSTEM: Qt
CMAKE_EXE_LINKER_FLAGS: -V4.6.3,gcc_ntoarmv7le -g -O0 -Y_gpp -D__QNX__
-D_QT -fstack-protector-strong
The Toolchain:
CMAKE_AR: ntoarm-ar.exe
CMAKE_ASM_COMPILER: qcc.exe
CMAKE_CXX_COMPILER: gcc.exe
CMAKE_C_COMPILER: gcc.exe
CMAKE_LINKER: ntoarmv7-ld.exe
CMAKE_NM: ntoarmv7-nm.exe
CMAKE_OBJCOPY: ntoarmv7-objcopy.exe
CMAKE_OBJDUMP: ntoarmv7-objdump.exe
CMAKE_RANLIB: ntoarm-ranlib.exe
CMAKE_STRIP: ntoarm-strip.exe
When I run following simple code the app crashes immediately.
Code:
#include <bb/cascades/Application>
#include <QLocale>
#include <QTranslator>
#include "applicationui.hpp"
#include <Qt/qdeclarativedebug.h>
#include <osgViewer/CompositeViewer>
using namespace bb::cascades;
class ViewerWidget : public osgViewer::CompositeViewer
{
};
Q_DECL_EXPORT int main(int argc, char **argv)
{
Application app(argc, argv);
// Create the Application UI object, this is where the main.qml file
// is loaded and the application scene is set.
new ApplicationUI(&app);
osgViewer::CompositeViewer vWidget;
// Enter the application main event loop.
return Application::exec();
}
I don't get any error messages. In debugging mode, the back trace gives me
following information:
#0 0x016634ac in SignalKill () from
C:\bbndk\runtime_10_2_1_3175\qnx6\armle-v7\lib\libc.so.3
#1 0x01652c68 in raise () from
C:\bbndk\runtime_10_2_1_3175\qnx6\armle-v7\lib\libc.so.3
#2 0x01690668 in __ssp_fail () from
C:\bbndk\runtime_10_2_1_3175\qnx6\armle-v7\lib\libc.so.3
#3 0x080b6f66 in std::map<std::string, std::string,
std::less<std::string>, std::allocator<std::pair<std::string const,
std::string> > >::operator
[] (this=0x922e474, __k=...) at
C:/bbndk/target_10_2_0_1155/qnx6/usr/include/c++/4.6.3/bits/stl_map.h:455
#4 0x0820cf76 in osg::ApplicationUsage::addEnvironmentalVariable
(this=<error reading variable: Cannot access memory at address 0x1b>,
option=<error reading variable: Cannot access memory at address 0x17>,
explanation=<error reading variable: Cannot access memory at address 0x13>,
defaultValue=<error reading variable: Cannot access memory at address 0xf>) at
C:\Project\OpenSceneGraph-3.2.0\OpenSceneGraph\src\osg\ApplicationUsage.cpp:69
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
It seems like there must be a memory corruption somewhere. Since the debugger
never reaches main, it is very hard to me to find the issue.
Does anybody have an idea? Please let me know if you need more information.
I would greatly appreciate any help!
Thank you!
Cheers,
Giuseppe
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59973#59973
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org