qt4, QtOCC 0.9

Can't compile QtOcc 0.9 on Linux, Debian, gcc/g++ 4.1.2, Qt 4.2.1:

from src/QoccApplication.cpp:26:
/usr/include/qt4/QtCore/qdatastream.h:31:2: error: #error qdatastream.h must be included before any header file that defines Status

Any suggestions ?

Markus's picture

Thank you!

Works fine with kubuntu 7.04, Open Cascade 6.1.0 and QT 4.2 here!

Markus

P Dolbey's picture

:-)

Pete

P Dolbey's picture

I've had modification to qtoccharness.pro from Alvaro that solves his 64-bit problem which I have tested on Win32 and OpenSUSE. It also removed the -fpermissive and -ffriend-injection flags without issue. I've made this available as a version 0.11 on

http://myweb.tiscali.co.uk/dolbey/QtOpenCascade/QtOCC-0.10.zip

However, we're not out of the woods quite yet. Whilst the "bottle" appears fine, I'm observing some unusual results when loading some of the brep files. For instance this image shows bottom.brep in both win32 and OpenSUSE.

http://myweb.tiscali.co.uk/dolbey/QtOpenCascade/QtOCC-Oops1.PNG

This is reminiscent of a problem reported to me some time ago by Ray Betterini - but its looks almost likes its an OCC problem - I'll need to check this hypothesis by using one of the original qt3 demos. If you've seen this type of thing before and/or fixed it, please let me know.

Pete

P Dolbey's picture

...and running the "standard" OCC qt3 standrard example shows exactly the same problem when importing the same file. If the forum moderators are monitoring these threads, then this should be considered to be an OCC bug. It is not related to the Qt4 porting.

Pete

Alvaro's picture

Pete,

I tried quite some of the models and they work perfectly on my Fedora core 6, 64bits, qt 4.3.1

I would say that it could be related to the opengl drivers you are using, which probably aren't the native nvidia as you are under a VM. Am I right?

:-) Anyway, I think is relatively good news that under native 64bits linux is working fine, because it can be directly related to any thing we are not really aware going on anywhere behind scenes.

Here you have a link to the same test under my computer:
http://www.alvarocastro.es/external/Qt-Linux-64bits-FedoraCore6-VisTest.jpg
(don't pay attention to the black square, that's a qt thing that happens with all opengl apps)

By the way, you put the link without the changes I sent you. I'm sure you meant this link ;-)
http://myweb.tiscali.co.uk/dolbey/QtOpenCascade/QtOCC-0.11.zip

.alvaro.

Alvaro's picture

By the way, is there a place to send bugs? Eventhough I'm using this as opensource they should be interested in bugs found the community, not only their official clients.

??

Stefan Boeykens's picture

It works for me too (finally).

OCC 6.2.0
Windows XP SP2 32-bit
Visual Studio 2005
Qt 4.2.2 OpenSource + VC2005 patches
Hardware: nVidia Quadro FX 1400 with recent drivers

Haven't tried the other platforms yet, but so far it looks fine.

P.S. I have used the 'D' for all the debug libraries, so had to change that in the *.pri file. Only a minor issue... But leads me to think that the whole release-debug situation for OCC is not fully cleared out. And the porting to VC2005 was also exposing many smaller problems.

P Dolbey's picture

Alvaro,

Thanks for the source location correction. The VM emulates an S3 card with no native acceleration. Ray was using Debian, but I don't know what card he used.

Pete

Alvaro's picture

It went successfully on the following systems:

(All) qt 4.3.1, occ 6.2
-fedora core 6, 64 bits, ati card (don't know model)
-fedora core 6, 64 bits, intel chipset (don't know model)
-gentoo, latest nvidia drivers, nvidia Quadro FX 1400

P Dolbey's picture

There's an interesting announcement that TrollTech now support Visual Studio Express with the GPL Windows version of Qt4, from Qt 4.3.2 upwards. This means that current Qt4 snaphots should no longer be dependent on the Qtwin patches to make them compatible with OpenCASCADE on Windows. Qt 4.4 snapshot seems to be building OK, but I haven't let it finish yet.

Pete

Fernando Ghedin's picture

I think I am facing a similar "segmentation fault" as the one described by Alvaro, back in 2007. I am using OpenCASCADE 6.3.0 and Qt4 with win32-msvc2005. After Upgrading to Windows 7, QTOccHarness 0.1 crashes imediately after it is lauched. Debugging it, I can see that the crash happens at line number 150 of qoccviewwidget.cpp, which is: "myView->SetWindow( myWindow, rc , paintCallBack, this );"

The crash happens at the destructor of Handle(Standard_Transient):

handle_standard_transient.hxx:71
//! Destructor
Standard_EXPORT ~Handle(Standard_Transient)()
{
EndScope();
}

The same issue happens to other applications as well (i.e.: occ samples, even the ones which are based on MFC and not QT).

Here goes the call stack:

Unhandled exception at 0x069d3e88 in QtOCCHarness.exe: 0xC0000005: Access violation writing location 0x09000000.
ig4dev32.dll!069d3e88()
[Frames below may be incorrect and/or missing, no symbols loaded for ig4dev32.dll]
ig4dev32.dll!069d897e()
ig4icd32.dll!0672129e()
ig4icd32.dll!0671ba19()
ig4icd32.dll!06661a1f()
kernel32.dll!7603f003()
ig4dev32.dll!069daf62()
ig4icd32.dll!065451d9()
TKOpenGl.dll!03e7a927()
TKOpenGl.dll!03e78174()
TKOpenGl.dll!03e8a24b()
TKOpenGl.dll!03e54daa()
TKV3d.dll!027cd6aa()
TKV3d.dll!027cd95d()
TKV3d.dll!0277fe89()
TKernel.dll!00203320()
QtOCCHarness.exe!Handle_Standard_Transient::~Handle_Standard_Transient() Line 72 C++
QtOCCHarness.exe!Handle_MMgt_TShared::~Handle_MMgt_TShared() + 0xf bytes C++
049f55c4()
QtOCCHarness.exe!QoccViewWidget::initializeOCC(const Handle_AIS_InteractiveContext & aContext={...}) Line 152 C++
QtOCCHarness.exe!QoccViewWidget::paintEvent(QPaintEvent * __formal=0x0012da30) Line 200 C++
QtGui4.dll!65062a87()
ntdll.dll!76fa316f()
QtGui4.dll!652d735d()
QtCore4.dll!670dba4d()
(... cut ...)
QtGui4.dll!650779df()
QtCore4.dll!670daed0()
QtCore4.dll!670deee6()
> QtOCCHarness.exe!main(int argc=1, char * * argv=0x02cf5148) Line 40 + 0x6 bytes C++

BTW, my video card is Intel 945GM and the platform is win32.

Any ideas? Is anyone facing similar problems with Windows 7 ? (the app works fine under Linux and Win XP)

Thanks a lot in advance.
Fernando