Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029478Community[OCCT] OCCT:Data Exchangepublic2018-02-03 04:082018-02-03 04:08
Assigned Togka 
PlatformVisual Studio 2017 32 bitOSWindowsOS Version10
Product Version[OCCT] 7.1.0 
Target VersionFixed in Version 
Summary0029478: Crash because bSplineSurfaceWithKnots is NULL
DescriptionI created a simplified STP file(see attachment) using WorkXplore 2018.1.0 x64.

The crash happens here:

BS = BSR->BSplineSurfaceWithKnots(); // returns NULL
const Standard_Integer UDeg = BS->UDegree(); // crashes here

Here is the full code:

Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS)
  Standard_Integer i, j;
  Handle(StepGeom_BSplineSurfaceWithKnots) BS;
  Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) BSR;

  if (SS->
      IsKind(STANDARD_TYPE(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface))) {
    BSR =
    BS = BSR->BSplineSurfaceWithKnots();
    BS = Handle(StepGeom_BSplineSurfaceWithKnots)::DownCast(SS);

  const Standard_Integer UDeg = BS->UDegree();
Steps To ReproduceThis is how I'm using the Step Reader. The software crashes in TransferRoots() everytime.

// Remove std::cout from the printer list of OpenCASCADE
// More precisely, remove ALL printers from the list.

// Install our own error printer
std::string error_message;
Message::DefaultMessenger()->AddPrinter(Handle_Message_Printer(new STEPErrorPrinter(&error_message, STEPErrorLevel::FAILURE)));

auto reader = STEPControl_Reader();
TagsNo tags attached.
Test case number
Attached Files? file icon Toy Test 6 d_ok rough_no_groups.stp (10,600 bytes) 2018-02-03 04:08

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-02-03 04:08 stefan New Issue
2018-02-03 04:08 stefan Assigned To => gka
2018-02-03 04:08 stefan File Added: Toy Test 6 d_ok rough_no_groups.stp

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker