MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026321Community[OCCT] OCCT:Meshpublic2015-06-06 20:112016-12-09 16:37
Reporterventu 
Assigned Tobugmaster 
PrioritynormalSeveritycrash 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0026321: Crash in BRepMesh_FastDiscret::Add
DescriptionThis function:
1) starts with a try block,
2) there, it nullifies myAttribute;
3) construct a new BRepMesh_FaceAttribute and assigns it to myAttribute;
4) does other things;
5) catches Standard_Failure;
6) uses myAttributes within the catch block.

This leads to dereferencing a nullptr if an exception is thrown during the construction of the BRepMesh_FaceAttribute object.

This happened to me while meshing an imported STeP file which has a surface with an edge that has trimming limits outside its bounds.
The problem is however general.
Steps To ReproduceNot applicable
TagsNo tags attached.
Test case numberNot needed
Attached Fileszip file icon sample.zip (3,102,244 bytes) 2015-07-16 16:21

- Relationships

-  Notes
(0042946)
oan (developer)
2015-07-13 10:08

Dear Ventu,

could you please attach problematic shape for QA reasons.
(0043170)
ventu (reporter)
2015-07-17 22:41

Shape attached.
(0043193)
oan (developer)
2015-07-20 15:14

Dear Ventu,

Thank you! We will check and fix cause of the problem.
(0043196)
oan (developer)
2015-07-20 16:14

Dear Ventu,

I just have tried to reproduce reported problem using OCCT 6.8.0 built in release mode via Draw test environment. I tried to change meshing parameters, but I did not face any crash.

I see possible bottleneck in the source code and we can fix it as is. However, it would be better to localize the problem using live data in order to register this case and prevent the similar ones in further.

Therefore, could you please specify exact meshing parameters or, probably, exact face using which crash can be reproduced? Additional question, do you use some specific parameters for STEP importer or parameters are default?

Thank you in advance,
Oleg.
(0043612)
ventu (reporter)
2015-07-28 10:33

I'm not familiar with DRAW: I'm using OC as a library from a C++ program.

I'm reading the file through STEPCAFControl_Reader class, I believe with standard parameters.
I then use XCAFDoc_DocumentTool::ShapesLabel(Doc->Main()) to get all shapes.

On the first FACE of the first SHAPE, I do:
BRepMesh_IncrementalMesh M(Face,0.01,Standard_False,0.5,Standard_True);

Hence the crash.


Please let me know if this is enough or if I need to do something else.
(0050774)
git (administrator)
2016-02-15 18:19

Branch CR26321 has been created by oan.

SHA-1: 4298fdbaf4ed4494e5fa0f537e66a20a180ea54e


Detailed log of new commits:

Author: oan
Date: Mon Feb 15 18:05:33 2016 +0300

    0026321: Crash in BRepMesh_FastDiscret::Add
    
    BRepMesh_FaceAttribute: distinguish constructor and parameters initialization.
(0050797)
oan (developer)
2016-02-16 11:35

Dear Mikhail,

please review branch CR26321.
(0050801)
msv (developer)
2016-02-16 12:04

src\BRepMesh\BRepMesh_FaceAttribute.hxx

1) Line 35 is to be removed.
(0050847)
git (administrator)
2016-02-16 19:09

Branch CR26321 has been updated forcibly by oan.

SHA-1: 55d8db2ecbf1d514bef8bd662a157bbd41e253db
(0050848)
oan (developer)
2016-02-16 19:13

Dear Mikhail,

done, please review.
(0050888)
msv (developer)
2016-02-17 16:03

Reviewed.
(0050904)
git (administrator)
2016-02-17 17:43

Branch CR26321 has been updated forcibly by apv.

SHA-1: 1aaff894b36d9a945b4924c93581f503dd45fa45
(0050905)
apv (tester)
2016-02-17 17:43

Branch CR26321 has been rebased on the current master
(0050956)
apv (tester)
2016-02-18 15:09

Dear BugMaster,

Branch CR26321 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 1aaff894b36d9a945b4924c93581f503dd45fa45

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MacOS: 0 (0 on master)
products component:
   Linux: 36 (36 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 90379875 / 89339274 [+1.16%]
Total CPU difference: 19209.629999999914 / 19290.29999999997 [-0.42%]

Testing on Windows:
Total MEMORY difference: 57364370 / 57374211 [-0.02%]
Total CPU difference: 18398.882740799036 / 18532.903199898905 [-0.72%]
(0052861)
git (administrator)
2016-04-17 13:27

Branch CR26321 has been deleted by kgv.

SHA-1: 1aaff894b36d9a945b4924c93581f503dd45fa45

- Related Changesets
occt: master 0a2a7b46
Timestamp: 2016-02-16 16:08:13
Author: oan
Committer: bugmaster
Details ] Diff ]
0026321: Crash in BRepMesh_FastDiscret::Add

BRepMesh_FaceAttribute: distinguish constructor and parameters initialization.
mod - src/BRepMesh/BRepMesh_FaceAttribute.cxx Diff ] File ]
mod - src/BRepMesh/BRepMesh_FaceAttribute.hxx Diff ] File ]
mod - src/BRepMesh/BRepMesh_FastDiscret.cxx Diff ] File ]
mod - src/BRepMesh/BRepMesh_FastDiscret.hxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-06-06 20:11 ventu New Issue
2015-06-06 20:11 ventu Assigned To => oan
2015-07-13 10:06 oan Assigned To oan => ventu
2015-07-13 10:08 oan Note Added: 0042946
2015-07-13 10:08 oan Status new => feedback
2015-07-16 16:21 ventu File Added: sample.zip
2015-07-17 22:41 ventu Note Added: 0043170
2015-07-20 15:04 oan Assigned To ventu => oan
2015-07-20 15:14 oan Note Added: 0043193
2015-07-20 15:14 oan Status feedback => assigned
2015-07-20 16:14 oan Note Added: 0043196
2015-07-20 16:14 oan Assigned To oan => ventu
2015-07-20 16:14 oan Status assigned => feedback
2015-07-28 10:33 ventu Note Added: 0043612
2015-08-03 10:50 ventu Assigned To ventu => oan
2015-12-17 12:00 abv Status feedback => assigned
2015-12-17 12:00 abv Target Version => 7.1.0
2016-02-15 18:19 git Note Added: 0050774
2016-02-15 18:20 oan Description Updated View Revisions
2016-02-15 18:37 oan Steps to Reproduce Updated View Revisions
2016-02-16 11:35 oan Note Added: 0050797
2016-02-16 11:35 oan Assigned To oan => msv
2016-02-16 11:35 oan Status assigned => resolved
2016-02-16 12:04 msv Note Added: 0050801
2016-02-16 12:04 msv Assigned To msv => oan
2016-02-16 12:04 msv Status resolved => assigned
2016-02-16 19:09 git Note Added: 0050847
2016-02-16 19:13 oan Note Added: 0050848
2016-02-16 19:13 oan Assigned To oan => msv
2016-02-16 19:13 oan Status assigned => resolved
2016-02-17 10:36 oan Target Version 7.1.0 => 7.0.0
2016-02-17 10:54 oan Target Version 7.0.0 => 7.1.0
2016-02-17 16:03 msv Note Added: 0050888
2016-02-17 16:03 msv Assigned To msv => bugmaster
2016-02-17 16:03 msv Status resolved => reviewed
2016-02-17 17:11 apv Assigned To bugmaster => apv
2016-02-17 17:43 git Note Added: 0050904
2016-02-17 17:43 apv Note Added: 0050905
2016-02-18 15:08 apv Test case number => Not needed
2016-02-18 15:09 apv Note Added: 0050956
2016-02-18 15:09 apv Assigned To apv => bugmaster
2016-02-18 15:09 apv Status reviewed => tested
2016-04-08 11:55 bugmaster Changeset attached => occt master 0a2a7b46
2016-04-08 11:55 bugmaster Status tested => verified
2016-04-08 11:55 bugmaster Resolution open => fixed
2016-04-17 13:27 git Note Added: 0052861
2016-12-09 16:33 user533 Status verified => closed
2016-12-09 16:37 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker