PDA

View Full Version : OpenCascade in QT application



sujan.dasmahapatra
25th November 2009, 11:28
Dear Friends
I am trying to explout OpenCascade from within QT application.There is an example in the opencascade sample folder.
I have checked the example.Its compiling but when I am trying open a new application its crashing. There I can see the View is QWidget on that widget probably they're creating graphics.
In my case I already have a QGLWidget can I exploit graphics in that ?
Any help would be appreciated.

sujan.dasmahapatra
26th November 2009, 09:40
HI friends
I am able to compile the example sample given in qt folder. but when i am launching the application and starting new its crashing so i am trying to debug it using gdb debugger. but i am not able to debug. its howing the symbols not found.

I am doing like this
gdb ./Linux/bin/IESample
break DocumentCommon.cxx:29

its showing symbols not found.
Could u tell me whats going wrong. ?

sujan.dasmahapatra
26th November 2009, 13:32
i am getting some errors even when i debug the sample opencascade.The sample after compilation is not working when i debug i am its crashing at this line.
when i am creating an instantiating Graphic3d_GraphicDevice
defaultdevice = new Graphic3d_GraphicDevice( aDisplay ); // here its crashing

static Handle(Graphic3d_GraphicDevice) defaultdevice;
if( defaultdevice.IsNull() )
defaultdevice = new Graphic3d_GraphicDevice( aDisplay ); // here its crashing
return new V3d_Viewer(defaultdevice,aName,aDomain,ViewSize,Vi ewProj,
Quantity_NOC_GRAY30,V3d_ZBUFFER,V3d_GOURAUD,V3d_WA IT,
ComputedMode,aDefaultComputedMode,V3d_TEX_NONE);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//errors
Program received signal SIGSEGV, Segmentation fault.
0x0000002a95685323 in Handle_Standard_Transient::EndScope ()
from /share/apps/OpenCASCADE6.3.0/Linux/lib/libTKernel.so.0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I have included the lib as
LIBS += -L/share/apps/OpenCASCADE6.3.0/lib -lTKernel


Can anyone tell me whats going wrong in this ! Thanks

NoRulez
26th November 2009, 13:56
Is aDisplay NULL or has it an invalid pointer?

Best Regards
NoRulez

sujan.dasmahapatra
26th November 2009, 15:25
aDisplay is standard_CString which is "Visu3D"

check the backtrace.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 183011805216 (LWP 18689)]
0x0000002a95685323 in Handle_Standard_Transient::EndScope ()
from /share/apps/OpenCASCADE6.3.0/Linux/lib/libTKernel.so.0
(gdb) backtrace
#0 0x0000002a95685323 in Handle_Standard_Transient::EndScope ()
from /share/apps/OpenCASCADE6.3.0/Linux/lib/libTKernel.so.0
#1 0x0000002a956853bf in Handle_Standard_Transient::Assign ()
from /share/apps/OpenCASCADE6.3.0/Linux/lib/libTKernel.so.0
#2 0x0000000000417fbb in Handle_Graphic3d_GraphicDevice::operator= (this=0x53c088, anItem=0x20007880)
at /share/apps/OpenCASCADE6.3.0/inc/Handle_Graphic3d_GraphicDevice.hxx:61
#3 0x00000000004167c8 in DocumentCommon::Viewer (this=0x6a56b0, aDisplay=0x7fbffffeec ":1008.0",
aName=0x20007868, aDomain=0x42c03f "", ViewSize=1000, ViewProj=V3d_XposYnegZpos, ComputedMode=1,
aDefaultComputedMode=1) at src/DocumentCommon.cpp:32
#4 0x0000000000416bcc in DocumentCommon (this=0x6a56b0, theIndex=1, app=0x6a7c50)
at src/DocumentCommon.cpp:53
#5 0x00000000004154ca in ApplicationCommonWindow::onNewDoc (this=0x6a7c50)
at src/ApplicationCommon.cpp:381
#6 0x000000000042a323 in ApplicationCommonWindow::qt_metacall (this=0x6a7c50,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fbfffd4a0) at Linux/src/moc_ApplicationCommon.cpp:85
#7 0x000000000042a051 in ApplicationWindow::qt_metacall (this=0x6a7c50,
_c=QMetaObject::InvokeMetaMethod, _id=31, _a=0x7fbfffd4a0) at Linux/src/moc_Application.cpp:64
#8 0x0000002a9c03764f in QMetaObject::activate (sender=0x6bcac0, from_signal_index=9,
to_signal_index=10, argv=0x7101a0) at kernel/qobject.cpp:3022
#9 0x0000002a9b5b1536 in QAction::activated (this=0xfefd0000, _t1=Variable "_t1" is not available.
)
at .moc/release-shared/moc_qaction.cpp:236
#10 0x0000002a9b5b1889 in QAction::activate (this=0x6bcac0, event=Variable "event" is not available.
) at kernel/qaction.cpp:1128
#11 0x0000002a9b90b1a6 in QAbstractButtonPrivate::click (this=0x6c7d80)
at widgets/qabstractbutton.cpp:520
#12 0x0000002a9b90b431 in QAbstractButton::mouseReleaseEvent (this=0x6c6f80, e=0x7fbfffdc60)
at widgets/qabstractbutton.cpp:1110
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////