MantisBT - Community
View Issue Details
0022871Community[OCCT] OCCT:Data Exchangepublic2011-12-21 11:502012-11-16 13:18
szy 
ika 
normalcrash 
closedfixed 
[OCCT] 6.5.2 
[OCCT] 6.5.4[OCCT] 6.5.4 
bugs step (008) : bug22871
0022871: Step Reader raises exception on invalid entity (null swept curve)
Post from the Forum (author: heyuqi) - http://www.opencascade.org/org/forum/thread_22439/. [^]
"
Hi all,

Attached please find the sample STEP file.

Because if a SEH exception raised, the Windows API will says ceaselessly that the SEH exception is not handled. User can not do nothing but close the application.

So I think the STEP importer should raise a C++ exception or return false in case of null curve in StepToGeom_MakeCurve::Convert function.

Standard_Boolean StepToGeom_MakeCurve::Convert (const Handle(StepGeom_Curve)& SC, Handle(Geom_Curve)& CC)
{
+ if (SC.IsNull ()) {
+ return Standard_False;
+ }
+
if (SC->IsKind(STANDARD_TYPE(StepGeom_Line))) {
"
================================
Exception is reproduced in Draw:
Draw[9]> stepread null-swept-curve.stp s *
      ... Step File Reading : null-swept-curve.stp
      ... STEP File Read ...
Elapsed time: 0 Hours 0 Minutes 0.0237310774974 Seconds
CPU user time: 0.015625 seconds
CPU system time: 0.015625 seconds
      ... Step File loaded ...
Elapsed time: 0 Hours 0 Minutes 0.0364317887579 Seconds
CPU user time: 0.03125 seconds
CPU system time: 0.015625 seconds
   7442 records (entities,sub-lists,scopes), 21701 parameters

      ... Parameters prepared ... Elapsed time: 0 Hours 0 Minutes 0.0584807984706 Seconds
CPU user time: 0.046875 seconds
CPU system time: 0.015625 seconds
Report : 8 unknown entities.
      ... Objets analysed ...
Elapsed time: 0 Hours 0 Minutes 0.076792697655 Seconds
CPU user time: 0.0625 seconds
CPU system time: 0.015625 seconds
  STEP Loading done : 3754 Entities
Preprocessor version detected: Open CASCADE STEP processor 6.3
Warning: StepToGeom_MakeSurface: Exception:0054F990 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0xFEFD0000 during 'READ' operation
//What is?// NB COMPOUNDS: 1
//What is?// NB SOLIDS: 0
//What is?// NB SHELLS: 0
//What is?// OPEN SHELLS: 0
//What is?// CLOSED SHELLS: 0
//What is?// NB FACES: 0
//What is?// NB WIRES: 0
//What is?// NB EDGES: 0
//What is?// NB VERTEXES: 0
 File STEP to read : null-swept-curve.stp
 -- Names of variables BREP-DRAW prefixed by : s
Transferrable Roots : Nb entities selected : 1
Transfer entity n0 5 OK -> DRAW Shape: s_1
Now, 1 Shapes produced
pload ALL
stepread null-swept-curve.stp s *
No tags attached.
? null-swept-curve.stp (281,553) 2011-12-21 11:50
https://tracker.dev.opencascade.org/
Issue History
2011-12-21 11:50szyNew Issue
2011-12-21 11:50szyAssigned To => gka
2011-12-21 11:50szyFile Added: null-swept-curve.stp
2011-12-21 11:51szyOSL =>
2011-12-21 11:51szyOS VersionL =>
2011-12-21 11:51szyPlatformA =>
2012-01-12 09:57abvSummaryStep Reader 6.5.2 raises exception => Step Reader raises exception on invalid entity (null swept curve)
2012-02-09 08:56abvTarget Version6.5.3 => 6.5.4
2012-10-19 17:23gkaAssigned Togka => ika
2012-10-19 17:24gkaStatusnew => assigned
2012-10-19 17:54ikaNote Added: 0021858
2012-10-19 17:55ikaStatusassigned => resolved
2012-10-19 17:56ikaAssigned Toika => gka
2012-10-19 18:00gkaNote Added: 0021859
2012-10-19 18:00gkaStatusresolved => reviewed
2012-10-23 16:42mkvAssigned Togka => mkv
2012-10-26 12:56mkvNote Added: 0021968
2012-10-26 13:00mkvTest case number => bugs step (008) : bug22871
2012-10-26 13:00mkvStatusreviewed => tested
2012-10-29 12:54ikaChangeset attached => occt master fb20c143
2012-10-29 12:54ikaAssigned Tomkv => ika
2012-10-29 12:54ikaStatustested => verified
2012-10-29 12:54ikaResolutionopen => fixed
2012-11-16 13:14bugmasterFixed in Version => 6.5.4
2012-11-16 13:18bugmasterStatusverified => closed

Notes
(0021858)
ika   
2012-10-19 17:54   
Offered checking has been added.

Git branch CR22871 is ready to be reviewed.

Sear GKA,
Please review.
(0021859)
gka   
2012-10-19 18:00   
Dear Bugmaster.

Branch CR22871 is ready to test.
(0021968)
mkv   
2012-10-26 12:56   
Dear BugMaster,
Branch CR22871 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Regressions:
Not detected

Improvements:
Not detected

Testing cases:
bugs step (008) : bug22871 - OK.