MantisBT - Open CASCADE
View Issue Details
0030389Open CASCADE[OCCT] OCCT:Data Exchangepublic2018-11-29 10:072018-12-03 10:38
emv 
apn 
normalminor 
verifiedfixed 
[OCCT] 7.3.0 
[OCCT] 7.4.0* 
bugs stlvrml bug30389
0030389: Data Exchange - StlAPI_Writer does not check if the face has triangulation
StlAPI_Writer does not check if the face has triangulation. It leads to crash on the partially meshed models.
box b 1 1 1
# mesh only 5 faces of the box
eval compound [lrange [explode b f] 1 5] cf
incmesh cf 0.1
# write stl
writestl b box.stl
An exception was caught 000002506CC223E0 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x0000000000000018 during 'READ' operation
** Exception ** 000002506CC223E0 : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x0000000000000018 during 'READ' operation
No tags attached.
Issue History
2018-11-29 10:07emvNew Issue
2018-11-29 10:07emvAssigned To => gka
2018-11-29 10:08emvAssigned Togka => emv
2018-11-29 10:08emvStatusnew => assigned
2018-11-29 10:24gitNote Added: 0081283
2018-11-29 11:24kgvNote Added: 0081285
2018-11-29 12:47emvNote Added: 0081290
2018-11-29 12:47emvAssigned Toemv => gka
2018-11-29 12:47emvStatusassigned => resolved
2018-11-29 12:50emvNote Added: 0081291
2018-11-29 12:50emvAssigned Togka => emv
2018-11-29 12:50emvStatusresolved => assigned
2018-11-29 12:50emvNote Edited: 0081291bug_revision_view_page.php?bugnote_id=81291#r20440
2018-11-29 12:51emvNote Edited: 0081291bug_revision_view_page.php?bugnote_id=81291#r20441
2018-11-29 14:21gitNote Added: 0081294
2018-11-30 09:00emvNote Added: 0081301
2018-11-30 09:00emvAssigned Toemv => gka
2018-11-30 09:00emvStatusassigned => resolved
2018-11-30 10:47gkaNote Added: 0081302
2018-11-30 10:47gkaAssigned Togka => bugmaster
2018-11-30 10:47gkaStatusresolved => reviewed
2018-11-30 11:37apnTest case number => bugs stlvrml bug30389
2018-11-30 11:37apnNote Added: 0081305
2018-11-30 11:37apnStatusreviewed => tested
2018-12-02 14:48apnChangeset attached => occt master 44d5a096
2018-12-02 14:48apnAssigned Tobugmaster => apn
2018-12-02 14:48apnStatustested => verified
2018-12-02 14:48apnResolutionopen => fixed
2018-12-03 10:38gitNote Added: 0081329

Notes
(0081283)
git   
2018-11-29 10:24   
Branch CR30389 has been created by emv.

SHA-1: 443a47c28a05cf5213374d610348dd476db9e28f


Detailed log of new commits:

Author: emv
Date: Thu Nov 29 10:20:23 2018 +0300

    0030389: Data Exchange - StlAPI_Writer does not check if the face has triangulation
    
    When merging triangulation of the faces skip those having no triangulation.
    Test case for the issue.
(0081285)
kgv   
2018-11-29 11:24   
  59   // create temporary triangulation
  60   Handle(Poly_Triangulation) aMesh = new Poly_Triangulation (aNbNodes, aNbTriangles, Standard_False);


Could you please also put here a check that aNbTriangles > 0 and return FALSE otherwise (for the case if TopoDS_Shape does not contain triangulation at all)?

It might be useful also emitting a warning (e.g. using Message::DefaultMessenger()) with the number of Faces skipped due to NULL triangulation.
(0081290)
emv   
2018-11-29 12:47   
Dear Galina, could you please review the git branch CR30389?

Test results - http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30389-master-emv/view/COMPARE/ [^]
(0081291)
emv   
2018-11-29 12:50   
(edited on: 2018-11-29 12:51)
I didn't see the message 0030389:0081290, so I will make the asked changes.

(0081294)
git   
2018-11-29 14:21   
Branch CR30389 has been updated forcibly by emv.

SHA-1: 454bb0011c1918d6d6a79e81cb22de61f26830dd
(0081301)
emv   
2018-11-30 09:00   
Dear Galina, could you please review the git branch CR30389?

Test results - http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30389-master-emv/view/COMPARE/ [^]
(0081302)
gka   
2018-11-30 10:47   
Branch CR30389 was reviewed
(0081305)
apn   
2018-11-30 11:37   
Combination -
OCCT branch : CR30389 SHA - 454bb0011c1918d6d6a79e81cb22de61f26830dd
Products branch : master SHA - 4db2d6888701347b5f5ac616d0a78b5a228964c8
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

Test case:
bugs stlvrml bug30389 - OK

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16306.540000000025 / 16298.960000000045 [+0.05%]
Products
Total CPU difference: 7073.8900000000385 / 7051.820000000017 [+0.31%]
Windows-64-VC14:
OCCT
Total CPU difference: 17805.875 / 17763.703125 [+0.24%]
Products
Total CPU difference: 8518.984375 / 8526.890625 [-0.09%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0081329)
git   
2018-12-03 10:38   
Branch CR30389 has been deleted by inv.

SHA-1: 454bb0011c1918d6d6a79e81cb22de61f26830dd