View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033603 | Community | OCCT:Data Exchange | public | 2024-02-17 05:27 | 2024-03-18 03:25 |
Reporter | lorenzn | Assigned To | vglukhik | ||
Priority | normal | Severity | crash | ||
Status | verified | Resolution | fixed | ||
Platform | x86_64 | OS | Linux | ||
Product Version | 7.8.0 | ||||
Summary | 0033603: Data Exchange, Step Import - Crash reading corrupted STEP file | ||||
Description | Processing a corrupted STEP file in OCCT results in a crash with OSD_SignalMode_Unset. #0 0x00007f883b76dc5e in StepGeom_CartesianPoint::NbCoordinates (this=0x0) at /opt/devel/OCCT-7_8_0/src/StepGeom/StepGeom_CartesianPoint.cxx:86 0000001 0x00007f883b585c5d in StepToGeom::MakeCartesianPoint (SP=..., theLocalFactors=...) at /opt/devel/OCCT-7_8_0/src/StepToGeom/StepToGeom.cxx:1011 0000002 0x00007f883b591b16 in MakeBSplineCurveCommon<NCollection_Array1<gp_Pnt>, Geom_CartesianPoint, gp_Pnt, Geom_BSplineCurve> (theStepGeom_BSplineCurve=..., theLocalFactors=..., thePntGetterFunction=&virtual table offset 64, thePointMakerFunction=0x7f883b585c30 <StepToGeom::MakeCartesianPoint(opencascade::handle<StepGeom_CartesianPoint> const&, StepData_Factors const&)>) at /opt/devel/OCCT-7_8_0/src/StepToGeom/StepToGeom.cxx:757 #3 0x00007f883b584c48 in StepToGeom::MakeBSplineCurve (theStepGeom_BSplineCurve=..., theLocalFactors=...) at /opt/devel/OCCT-7_8_0/src/StepToGeom/StepToGeom.cxx:824 #4 0x00007f883b58063d in StepToGeom::MakeBoundedCurve (SC=..., theLocalFactors=...) at /opt/devel/OCCT-7_8_0/src/StepToGeom/StepToGeom.cxx:262 #5 0x00007f883b586d4d in StepToGeom::MakeCurve (SC=..., theLocalFactors=...) at /opt/devel/OCCT-7_8_0/src/StepToGeom/StepToGeom.cxx:1164 #6 0x00007f883b5ab624 in StepToTopoDS_TranslateEdgeLoop::Init (this=0x7fffd6b29a00, FaceBound=..., Face=..., GeomSurf=..., StepSurf=..., sameSense=true, aTool=..., NMTool=..., theLocalFactors=...) at /opt/devel/OCCT-7_8_0/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx:312 0000007 0x00007f883b5b0a19 in StepToTopoDS_TranslateFace::Init (this=0x7fffd6b29ba0, FS=..., aTool=..., NMTool=..., theLocalFactors=...) at /opt/devel/OCCT-7_8_0/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx:633 0000008 0x00007f883b5b4ec0 in StepToTopoDS_TranslateShell::Init (this=0x7fffd6b29e00, CFS=..., aTool=..., NMTool=..., theLocalFactors=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx:89 0000009 0x00007f883b5960dc in StepToTopoDS_Builder::Init (this=0x7fffd6b2a380, theManifoldSolid=..., theTP=..., theLocalFactors=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/StepToTopoDS/StepToTopoDS_Builder.cxx:141 #10 0x00007f883b5d9dd1 in STEPControl_ActorRead::TransferEntity (this=0xd3c020, start=..., TP=..., theLocalFactors=..., isManifold=true, theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:1457 0000011 0x00007f883b5dc139 in STEPControl_ActorRead::TransferShape (this=0xd3c020, start=..., TP=..., theLocalFactors=..., isManifold=true, theUseTrsf=false, theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:1762 #12 0x00007f883b5d6412 in STEPControl_ActorRead::TransferEntity (this=0xd3c020, sr=..., TP=..., theLocalFactors=..., isBound=@0x7fffd6b2b187: false, theUseTrsf=false, theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:943 0000013 0x00007f883b5d7920 in STEPControl_ActorRead::TransferEntity (this=0xd3c020, und=..., TP=..., theLocalFactors=..., nbrep=2, theUseTrsf=false, theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:1166 0000014 0x00007f883b5d431d in STEPControl_ActorRead::TransferEntity (this=0xd3c020, PD=..., TP=..., theLocalFactors=..., theUseTrsf=false, theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:687 0000015 0x00007f883b5d539d in STEPControl_ActorRead::TransferEntity (this=0xd3c020, NAUO=..., TP=..., theLocalFactors=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:796 0000016 0x00007f883b5d3b65 in STEPControl_ActorRead::TransferEntity (this=0xd3c020, PD=..., TP=..., theLocalFactors=..., theUseTrsf=true, theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:596 0000017 0x00007f883b5dbdb8 in STEPControl_ActorRead::TransferShape (this=0xd3c020, start=..., TP=..., theLocalFactors=..., isManifold=true, theUseTrsf=true, theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:1723 0000018 0x00007f883b5d2716 in STEPControl_ActorRead::Transfer (this=0xd3c020, start=..., TP=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/STEPControl/STEPControl_ActorRead.cxx:337 0000019 0x00007f883ef5cd8e in Transfer_ActorOfTransientProcess::Transferring (this=0xd3c020, ent=..., TP=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/Transfer/Transfer_ActorOfTransientProcess.cxx:40 0000020 0x00007f883ef6de8d in Transfer_ProcessForTransient::TransferProduct (this=0xd3bf20, start=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/Transfer/Transfer_ProcessForTransient_0.cxx:925 0000021 0x00007f883ef6d5f7 in Transfer_ProcessForTransient::Transferring (this=0xd3bf20, start=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/Transfer/Transfer_ProcessForTransient_0.cxx:820 0000022 0x00007f883ef6e101 in Transfer_ProcessForTransient::Transfer (this=0xd3bf20, start=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/Transfer/Transfer_ProcessForTransient_0.cxx:952 0000023 0x00007f883ef74c43 in Transfer_TransferOutput::Transfer (this=0x7fffd6b2cc10, obj=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/Transfer/Transfer_TransferOutput.cxx:67 0000024 0x00007f883eff8215 in XSControl_TransferReader::TransferOne (this=0xa129d0, ent=..., rec=true, theProgress=...) at /opt/devel/OCCT-7_8_0/src/XSControl/XSControl_TransferReader.cxx:812 0000025 0x00007f883eff28f2 in XSControl_Reader::TransferEntity (this=0x7fffd6b2d180, start=..., theProgress=...) at /opt/devel/OCCT-7_8_0/src/XSControl/XSControl_Reader.cxx:258 #26 0x00007f883eff2838 in XSControl_Reader::TransferOne (this=0x7fffd6b2d180, num=17758, theProgress=...) at /opt/devel/OCCT-7_8_0/src/XSControl/XSControl_Reader.cxx:243 #27 0x00007f883c17eee9 in stepread (theDI=..., theNbArgs=4, theArgVec=0x5aede0) at /opt/devel/OCCT-7_8_0/src/XSDRAWSTEP/XSDRAWSTEP.cxx:238 #28 0x00007f884fd367db in Draw_Interpretor::CallBackDataFunc::Invoke (this=0xb8b160, theDI=..., theArgNb=4, theArgVec=0x5aede0) at /opt/devel/OCCT-7_8_0/src/Draw/Draw_Interpretor.hxx:79 0000029 0x00007f884fd42104 in CommandCmd (theClientData=0xb8b160, interp=0x5aabd0, argc=4, argv=0x5aede0) at /opt/devel/OCCT-7_8_0/src/Draw/Draw_Interpretor.cxx:151 #30 0x00007f884d48fa3e in TclInvokeStringCommand (clientData=0x8cb450, interp=0x5aabd0, objc=4, objv=<optimized out>) at /usr/src/debug/tcl-8.6.12-5.fc39.x86_64/generic/tclBasic.c:2509 #31 0x00007f884d490c79 in TclNRRunCallbacks (interp=0x5aabd0, result=0, rootPtr=0x0) at /usr/src/debug/tcl-8.6.12-5.fc39.x86_64/generic/tclBasic.c:4494 #32 0x00007f884d52125c in Tcl_RecordAndEvalObj (interp=interp@entry=0x5aabd0, cmdPtr=cmdPtr@entry=0x5f38d0, flags=flags@entry=0) at /usr/src/debug/tcl-8.6.12-5.fc39.x86_64/generic/tclHistory.c:190 0000033 0x00007f884d5213f4 in Tcl_RecordAndEval (interp=0x5aabd0, cmd=<optimized out>, flags=0) at /usr/src/debug/tcl-8.6.12-5.fc39.x86_64/generic/tclHistory.c:75 0000034 0x00007f884fd43044 in Draw_Interpretor::RecordAndEval (this=0x7f884fdcf5a0 <theCommands>, line=0x7f884fdcf7f0 <Draw_Interprete(char const*)::command+16> "source -encoding utf-8 \"test3.tcl\"", flags=0) at /opt/devel/OCCT-7_8_0/src/Draw/Draw_Interpretor.cxx:493 0000035 0x00007f884fd2c935 in Draw_Interprete (com=0xa0d220 "source -encoding utf-8 \"test3.tcl\"") at /opt/devel/OCCT-7_8_0/src/Draw/Draw.cxx:607 #36 0x00007f884fd2a69a in interpreteTclCommand (theCmd=...) at /opt/devel/OCCT-7_8_0/src/Draw/Draw.cxx:101 #37 0x00007f884fd2a747 in ReadInitFile (theFileName=...) at /opt/devel/OCCT-7_8_0/src/Draw/Draw.cxx:112 #38 0x00007f884fd2c3fa in Draw_Appli (argc=4, argv=0x7fffd6b2ef78, Draw_InitAppli=0x401156 <Draw_InitAppli(Draw_Interpretor&)>) at /opt/devel/OCCT-7_8_0/src/Draw/Draw.cxx:496 #39 0x00007f884fd43c05 in Draw_Main (argc=4, argv=0x7fffd6b2ef78, fDraw_InitAppli=0x401156 <Draw_InitAppli(Draw_Interpretor&)>) at /opt/devel/OCCT-7_8_0/src/Draw/Draw_Main.cxx:111 #40 0x00000000004011b0 in main (argc=4, argv=0x7fffd6b2ef78) at /opt/devel/OCCT-7_8_0/src/DRAWEXE/DRAWEXE.cxx:352 For more background this issue was reported on another project using OCCT: https://github.com/CadQuery/cadquery/issues/1521 The STEP file was tampered with in order to produce a crash. | ||||
Steps To Reproduce | pload XDE VISUALIZATION dsetsignal unset stepread BROKEN_FILE.STEP a * vdisplay a_1 vfit | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Files to reproduce: https://github.com/qbamca/cadquery-bug-repro |
|
Branch CR33603 has been created by ichesnokova. SHA-1: a71d3ecec2f343c8423f5ca551c25810f90bee08 Detailed log of new commits: Author: ichesnok Date: Mon Mar 11 10:13:34 2024 +0000 0033603: Data Exchange, Step Import - Crash reading corrupted STEP file Return error in case of corrupted file. |
|
Branch CR33603 has been updated forcibly by ichesnokova. SHA-1: 79eafe98c8f70e25b85b70a5cf89648365118b52 |
|
Dear ika, please review branch CR33603. Tests: http://jenkins-test-10.nnov.opencascade.com/view/CR33603-master-ichesnok/view/COMPARE/ |
|
No remarks. Dear bugmaster, please integrate OCCT: CR33603. |
|
Combination - OCCT branch : IR-2024-03-15 master SHA - 9d93d9b9b888f8754ea5fa83cd2bbcfb1111bca6 d2ef868da4165400c82322bd7f11b652decce47a Products branch : master SHA - 4019cd9a039aa9bb8252b865410207f8d4cf3eb4 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Ubuntu2004-64: OCCT Total CPU difference: 18392.76999999986 / 18052.86999999987 [+1.88%] Products Total CPU difference: 11191.209999999957 / 11393.919999999946 [-1.78%] Windows-64-VC142: OCCT Total CPU difference: 20708.453125 / 20444.125 [+1.29%] Products Total CPU difference: 12623.671875 / 12572.140625 [+0.41%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR33603 has been deleted by vglukhik. SHA-1: 79eafe98c8f70e25b85b70a5cf89648365118b52 |
occt: master 3888b58c 2024-03-11 10:13:34 ichesnok Committer: vglukhik Details Diff |
0033603: Data Exchange, Step Import - Crash reading corrupted STEP file Crash fixed by checking IsNull(). |
Affected Issues 0033603 |
|
mod - src/StepToGeom/StepToGeom.cxx | Diff File | ||
mod - src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-02-17 05:27 | lorenzn | New Issue | |
2024-02-17 05:27 | lorenzn | Assigned To | => ika |
2024-02-18 13:27 | dpasukhi | Summary | Crash reading corrupted STEP file OSD_SignalMode_Unset => Data Exchange, Step Import - Crash reading corrupted STEP file |
2024-02-18 13:28 | dpasukhi | Assigned To | ika => ichesnokova |
2024-02-18 13:31 | dpasukhi | Note Added: 0115122 | |
2024-03-11 16:41 | git | Note Added: 0115303 | |
2024-03-13 12:53 | git | Note Added: 0115344 | |
2024-03-13 19:56 |
|
Assigned To | ichesnokova => ika |
2024-03-13 19:56 |
|
Status | new => resolved |
2024-03-13 19:56 |
|
Note Added: 0115353 | |
2024-03-14 18:03 | ika | Assigned To | ika => bugmaster |
2024-03-14 18:03 | ika | Status | resolved => reviewed |
2024-03-14 18:03 | ika | Note Added: 0115365 | |
2024-03-18 03:15 | vglukhik | Note Added: 0115385 | |
2024-03-18 03:19 | vglukhik | Changeset attached | => occt master 3888b58c |
2024-03-18 03:19 | vglukhik | Assigned To | bugmaster => vglukhik |
2024-03-18 03:19 | vglukhik | Status | reviewed => verified |
2024-03-18 03:19 | vglukhik | Resolution | open => fixed |
2024-03-18 03:25 | git | Note Added: 0115397 |