Archived issue #0002502
Bug in IntCurve_IntPolyPolyGen::Perform
Description
Bug from Open CASCADE community
Author: François Lauzon
http://www.opencascade.org/forumorg/bug.php?bug_id=120&f=8
when I import a step file, it crash in the method Perform of
IntCurve_IntPolyPolyGen around line 475, in the following code:
if(EIP.NbRoots()==0) {
//-- On supprime tous les segments voisins
for(Standard_Integer k=sp+1;k<=Nbsp;k++) {
Standard_Integer kk=TriIndex[k];
if( Abs(SegIndex1-PtrSegIndex1[kk])< Nelarg
&& Abs(SegIndex2-PtrSegIndex2[kk])< Nelarg) {
TriIndex[k]=-k;
}
}
}
what is appening is that kk gets a value of -11, so it's out of bound for
PreSegIndex array and PreSegIndex2 array, if I add a check for negative kk index
it's working, but I guess it might not be a bug fix, you might want to check why
it's not working. If you need the step file, I can supply it, but it's a bit
big to post it.
Author: François Lauzon
http://www.opencascade.org/forumorg/bug.php?bug_id=120&f=8
when I import a step file, it crash in the method Perform of
IntCurve_IntPolyPolyGen around line 475, in the following code:
if(EIP.NbRoots()==0) {
//-- On supprime tous les segments voisins
for(Standard_Integer k=sp+1;k<=Nbsp;k++) {
Standard_Integer kk=TriIndex[k];
if( Abs(SegIndex1-PtrSegIndex1[kk])< Nelarg
&& Abs(SegIndex2-PtrSegIndex2[kk])< Nelarg) {
TriIndex[k]=-k;
}
}
}
what is appening is that kk gets a value of -11, so it's out of bound for
PreSegIndex array and PreSegIndex2 array, if I add a check for negative kk index
it's working, but I guess it might not be a bug fix, you might want to check why
it's not working. If you need the step file, I can supply it, but it's a bit
big to post it.
Public activity
No public notes
Participants are labeled by their role within this record.