Error loading any IGES


I've tried the IGES loading in x86_64-linux, and I have a 'throw' at the middle of the loading. This happens for any IGES file I try to load. I don't get any error on Windows 32bit. Any help?

Specifically, in frame 5 (CheckSurfaceData), the failing condition:
48 if (SPoles.ColLength () 49 Standard_ConstructionError::Raise("Geom_BSplineSurface");
50 }

The value for the CheckSurfaceData arguments are:
(gdb) print SPoles
$6 = (const TColgp_Array2OfPnt &) @0x7fffffff4dd0: {myLowerRow = 1, myLowerColumn = 1,
myUpperRow = 6, myUpperColumn = 0, myDeletable = 1, myData = 0x7fffe70162a8}
(gdb) print SUKnots
$7 = (const TColStd_Array1OfReal &) @0x7fffffff4f30: {myLowerBound = 1, myUpperBound = 2,
myStart = 0x99ba38, isAllocated = 1}
(gdb) print SVKnots
$8 = (const TColStd_Array1OfReal &) @0x7fffffff4eb0: {myLowerBound = 1, myUpperBound = 1,
myStart = 0xb89008, isAllocated = 1}
(gdb) print SUMults
$9 = (const TColStd_Array1OfInteger &) @0x7fffffff4f10: {myLowerBound = 1, myUpperBound = 2,
myStart = 0xb88a7c, isAllocated = 1}
(gdb) print SVMults
$10 = (const TColStd_Array1OfInteger &) @0x7fffffff4e90: {myLowerBound = 1, myUpperBound = 1,
myStart = 0xb8902c, isAllocated = 1}

First part of the backtrace:

#0 0x00007ffff03e4d00 in __cxa_throw ()
from /nix/store/shh00siazqrksamqqn2rm4yyjl4jlxnx-gcc-4.4.3/lib64/
#1 0x00007ffff4806722 in Standard_ConstructionError::Throw (this=0x7fffe6dc1700)
at ../../../drv/Standard/Standard_ConstructionError_0.cxx:52
#2 0x00007ffff48a79d0 in Standard_Failure::Reraise (this=0x7fffe6dc1700)
at ../../../src/Standard/Standard_Failure.cxx:132
#3 0x00007ffff48a7997 in Standard_Failure::Reraise (this=0x7fffe6dc1700,
AString=0x7fffef6dd4b0 "Geom_BSplineSurface")
at ../../../src/Standard/Standard_Failure.cxx:123
#4 0x00007ffff4806614 in Standard_ConstructionError::Raise (
AString=0x7fffef6dd4b0 "Geom_BSplineSurface")
at ../../../drv/Standard/Standard_ConstructionError_0.cxx:42
#5 0x00007fffef670bcc in CheckSurfaceData (SPoles=@0x7fffffff4dd0, SUKnots=@0x7fffffff4f30,
SVKnots=@0x7fffffff4eb0, SUMults=@0x7fffffff4f10, SVMults=@0x7fffffff4e90, UDegree=5,
VDegree=5, UPeriodic=0, VPeriodic=0) at ../../../src/Geom/Geom_BSplineSurface.cxx:49
#6 0x00007fffef671d6d in Geom_BSplineSurface (this=0x7fffe68f85d0, Poles=@0x7fffffff4dd0,
UKnots=@0x7fffffff4f30, VKnots=@0x7fffffff4eb0, UMults=@0x7fffffff4f10,
VMults=@0x7fffffff4e90, UDegree=5, VDegree=5, UPeriodic=0, VPeriodic=0)
at ../../../src/Geom/Geom_BSplineSurface.cxx:223
#7 0x00007ffff6aaf0dd in IGESToBRep_BasicSurface::TransferBSplineSurface (this=0x7fffffff5410,
start=@0x7fffffff52a0) at ../../../src/IGESToBRep/IGESToBRep_BasicSurface.cxx:830
#8 0x00007ffff6aaafd6 in IGESToBRep_BasicSurface::TransferBasicSurface (this=0x7fffffff5410,
start=@0x7fffffff6470) at ../../../src/IGESToBRep/IGESToBRep_BasicSurface.cxx:179
#9 0x00007ffff6ac55ad in IGESToBRep_TopoSurface::TransferTopoBasicSurface (this=0x7fffffff5840,
st=@0x7fffffff6470) at ../../../src/IGESToBRep/IGESToBRep_TopoSurface.cxx:293
#10 0x00007ffff6ac4d41 in IGESToBRep_TopoSurface::TransferTopoSurface (this=0x7fffffff5840,
st=@0x7fffffff6470) at ../../../src/IGESToBRep/IGESToBRep_TopoSurface.cxx:225
#11 0x00007ffff6ab1375 in IGESToBRep_CurveAndSurface::TransferCurveAndSurface (
this=0x7fffffff63a0, start=@0x7fffffff6470)
at ../../../src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx:208
#12 0x00007ffff6ab17d2 in IGESToBRep_CurveAndSurface::TransferGeometry (this=0x7fffffff63a0,
start=@0x7fffffff6470) at ../../../src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx:276
#13 0x00007ffff6a9afe4 in IGESToBRep_Actor::Transfer (this=0x20006258, start=@0x7fffffff68e0,
TP=@0x7fffffff6580) at ../../../src/IGESToBRep/IGESToBRep_Actor.cxx:172

Lluís's picture

For what I could test, (this was OCC 6.3.0), a problem appears in some destructors of objects created in a Raise() case. These lead to segfault in x86_64-linux.
On some other cases, I get invalid addresses in pointers:
==9125== Invalid read of size 8
==9125== at 0x61CF831: IGESToBRep_BasicCurve::TransferBSplineCurve(Handle_IGE
SGeom_BSplineCurve const&) (IGESToBRep_BasicCurve.cxx:1099)
==9125== Address 0xfefdfefdfefd0000 is not stack'd, malloc'd or (recently) free

I tried in i686-linux the same case, and I get the very same 'throws', although they are properly handled and never end on segfault. And I don't get any 'invalid read'. So all runs fine there.

Is there any hope for the users of the free releases to get fixes for x86_64?


Chris's picture

I have a similar problem with the Open Cascade Qt Import-Export Example. I compiled it for x86_64-linux Debian Lenny with qmake. The "CXXFLAGS += -m64 -D_OCC64" and _OCC64 are contained in the Makefile and the application works fine. However it I try to import larger IGES files the program crashes frequently. I think that the problem is a result of the build system and that there are possibly some ambigius compiler flags for 64 bit platforms. I also implemented a simple test program with an IGES import for the same operating system with the same Open Cascade library (6.3.0) based on cmake without using QT, and everything works perfect. Unfortunately I have not yet identified how to change to fix the problem.