MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023631Open CASCADE[OCCT] OCCT:Meshpublic2012-12-12 07:592014-11-11 12:52
Reporterabv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2008OS Version32 bit
Product Version[OCCT] 6.6.0 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0023631: Infinite memory consumption in BRepMesh
DescriptionCommand incmesh on the attached face consumes memory until bad_alloc (sometimes is handled, sometimes leads to crash of DRAW).
Steps To ReproduceDraw[]> restore OCC396_f2903.brep a
Draw[]> incmesh a 1.195

Note that the result could be either crash (bad_alloc) or null triangulation.

Additional information
and documentation updates
The problem is originally reproduced on shape originating from #396, when this shape is shown in 3d viewer by vdisplay command. It does not reproduce neither on original shape if its triangulation is cleaned, nor on isolated face (nb. 2903) from original shape. The attached face has been produced by the following commands:

Draw[]> restore [locate_data_file OCC396.brep] a
Draw[]> explode a f
Draw[]> for {set i 1} {$i <= 2911} {incr i} { puts "a_$i"; flush stdout; save a_$i OCC396_f$i.brep; incmesh a_$i 1.195; vdisplay a_$i; vfit }

Note that triangulation contained in original shape is corrupted: it contains nodes with too big co-ordinates. This can be seen by bounding box:

Draw[]> boundings a
-1174082187021974.5 -15670499.83326759 -5243270.1753272489 18193501.136063989 941785825294154.37 315117129541890.37
TagsNo tags attached.
Test case numberbugs mesh(016) bug23631
Attached Files? file icon OCC396_f2903.brep (505,620 bytes) 2012-12-12 07:59
? file icon test1 (392 bytes) 2013-08-20 16:22
? file icon test2 (393 bytes) 2013-08-20 16:22
? file icon test3 (394 bytes) 2013-08-20 16:22
? file icon test4 (390 bytes) 2013-08-20 16:22
? file icon test5 (419 bytes) 2013-08-20 17:07
? file icon test6 (412 bytes) 2013-08-21 10:32
? file icon test01 (491 bytes) 2013-11-15 13:42
? file icon test02 (492 bytes) 2013-11-15 13:42
? file icon test03 (493 bytes) 2013-11-15 13:42
? file icon test04 (489 bytes) 2013-11-15 13:42
? file icon test05 (518 bytes) 2013-11-15 13:42
? file icon test06 (511 bytes) 2013-11-15 13:43

- Relationships

-  Notes
(0025189)
oan (developer)
2013-07-29 13:04

It's amazing for me that the initial shape has different Poly_Triangulation stored at face and associated to a particular edge forming this face.

Nevertheless, fix has been implemented and pushed to GIT branch CR23631.

Dear Pavel,
please review.
(0025235)
pdn (developer)
2013-08-05 17:12

The fix looks good but can slow down the algo. Please pay attention to performance (the possible solution to check in parallel)
(0025252)
mkv (tester)
2013-08-06 19:03
edited on: 2013-08-06 19:04

Dear BugMaster,

Branch CR23631 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 616748d4e24b934a438f068f0209de8fdf917caf

Number of compiler warnings:

occt component :
Linux: 945 (947 on master)
Windows: 891 (891 on master)

products component :
Linux: 188 (188 on master)
Windows: 287 (287 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs modalg_5(010) bug23631 - OK.

Testing on Linux:
http://occt-tests/CR23631-master-occt/Debian60-64/diff-Debian60-64.html [^]
Total MEMORY difference: 363915608 / 363686308
Total CPU difference: 43326.04000000099 / 43423.52000000051

Testing on Windows:
http://occt-tests/CR23631-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html [^]
Total MEMORY difference: 424675320 / 424160228
Total CPU difference: 39214.859375 / 53402.8125

There are not differences in images found by testdiff.

Dear oan,
result shape is bad in test case bugs modalg_5(010) bug23631, could you please validate it.

(0025351)
oan (developer)
2013-08-20 13:34

Dear mkv,

please provide information about performance of the fix (elapsed time) on several "high-weighted" shapes containing a lot of edges and faces comparing to the results on master branch.

Regarding the shape attached to this bug - yes, "checkshape" notifies problems. However, it doesn't play a role in context of made fix.
(0025355)
apn (administrator)
2013-08-20 15:40
edited on: 2013-08-21 10:32

Test case was move to bugs/mesh/bug23631 to avoid checkshape of the shape.
Test cases to show performance were attached. Results:

test1:
Elapsed Time: 41.988304 Seconds (42.099077 Seconds on master) size 10.2 MB

test2:
Elapsed Time: 1 Minutes 21.046335 Seconds (1 Minutes 23.302275 Seconds on master) size 18.5 MB

test3:
Elapsed Time: 46.410649 Seconds (48.648884 Seconds on master) size 34.9 MB

test4:
Elapsed Time: 4 Minutes 36.887112 Seconds (3 Minutes 7.600485 Seconds on master) size 59 MB

test5:
Elapsed Time: 6 Minutes 36.673735 Seconds (6 Minutes 23.286125 Seconds on master) size 50 MB step

test6:
Elapsed Time: 14 Minutes 38.85239 Seconds (7 Minutes 38.749197 Seconds on master) size 34.3 MB

(0026650)
apn (administrator)
2013-11-15 13:05
edited on: 2013-11-15 14:34

test1:
Elapsed time: 36.886161736 Sec (34.8680336054 Sec on master) size 10.2 MB

test2:
Elapsed time: 1 Min 19.9720355166 Sec (1 Min 12.0869424647 Sec on master) size 18.5 MB

test3:
Elapsed time: 43.1618825403 Sec (39.0547405136 Sec on master) size 34.9 MB

test4:
Elapsed time: 4 Min 18.8491976906 Sec (2 Min 32.3706683655 Sec on master) size 59 MB

test5:
Elapsed time: 4 Min 57.310111089 Sec (4 Min 30.3873219988 Sec on master) size 50 MB step

test6:
Elapsed time: 13 Min 36.5379462473 Sec (6 Min 43.301762612 Sec on master) size 34.3 MB

test01-test06:
http://occt-tests/23615_meshperformance_1/summary.html [^]
http://occt-tests/23615_meshperformance_2/summary.html [^]

(0029570)
oan (developer)
2014-05-28 12:30

The same fix but with possibility to perform the check in parallel depending on flag myInParallel. Please review changes in branch CR23631_1.
(0029659)
mkv (tester)
2014-06-03 18:53

Dear BugMaster,

Branch CR23631_1 was compiled on Linux platform.
SHA-1: 60d4eaa5f6773848b4143ff2c54b6822817a632f

There is extraction error:

Error : No file BRepMesh_IncrementalMesh.cdl in BRepMesh
Error : Failed during execution
Info : Failed BRepMesh (xcpp.fill xcpp.src xcpp.header xcpp.template obj.inc obj.comp obj.idep )
(0029666)
oan (developer)
2014-06-04 11:42

Dear MKV,
I have pushed changes of BRepMesh.cdl to the CR23631_1.
Please checkout it and repeat test campaign.
(0029679)
mkv (tester)
2014-06-04 16:28

Dear BugMaster,

Branch CR23631_1 (and products from GIT master) was compiled on Windows platform.
SHA-1: 0f15699f0cb46a8c5cc54b0779fcf78fadf5254e

There are compilation errors:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR23631_1/job/mnt-CR23631_1-master_build_occt_windows/1/parsed_console/ [^]

27>..\..\..\src\StlTransfer\StlTransfer.cxx(35) : fatal error C1083: Cannot open include file: 'BRepMesh_IncrementalMesh.hxx': No such file or directory

28>..\..\..\inc\XBRepMesh.hxx(26) : fatal error C1083: Cannot open include file: 'BRepMesh_PDiscretRoot.hxx': No such file or directory

33>..\..\..\src\StdSelect\StdSelect_BRepSelectionTool.cxx(60) : fatal error C1083: Cannot open include file: 'BRepMesh_IncrementalMesh.hxx': No such file or directory

32>..\..\..\src\DBRep\DBRep_DrawableShape.cxx(44) : fatal error C1083: Cannot open include file: 'BRepMesh_IncrementalMesh.hxx': No such file or directory

33>..\..\..\inc\StdPrs_ToolShadedShape.hxx(20) : fatal error C1083: Cannot open include file: 'BRepMesh_ShapeTool.hxx': No such file or directory

33>..\..\..\inc\StdPrs_ToolShadedShape.hxx(20) : fatal error C1083: Cannot open include file: 'BRepMesh_ShapeTool.hxx': No such file or directory
(0029680)
mkv (tester)
2014-06-04 18:00

There are new additional warnings on Linux platform:

BRepMesh_EdgeChecker.hxx:39, GNU C Compiler 4 (gcc), Priority: Normal
when initialized here

BRepMesh_EdgeChecker.hxx:76, GNU C Compiler 4 (gcc), Priority: Normal
‘Standard_Mutex& BRepMesh_EdgeChecker::myMutex’

BRepMesh_EdgeChecker.hxx:78, GNU C Compiler 4 (gcc), Priority: Normal
‘BRepMesh_EdgeChecker::myFaceLoc’ will be initialized after

BRepMesh_EdgeChecker.hxx:78, GNU C Compiler 4 (gcc), Priority: Normal
‘TopLoc_Location& BRepMesh_EdgeChecker::myFaceLoc’

BRepMesh_EdgeChecker.hxx:79, GNU C Compiler 4 (gcc), Priority: Normal
‘BRepMesh_EdgeChecker::myFaceTri’ will be initialized after
(0029681)
oan (developer)
2014-06-04 19:51

Dear MKV,

I've compiled OCCT step-by-step from generating of project files by WOK. Compilation errors was not been reproduced. Corrective fix for warnings has been pushed to CR23631_1.

Could you please update the sources and run testing procedure from the ground.
(0029699)
mkv (tester)
2014-06-05 12:31

Dear BugMaster,

Branch CR23631_1 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: d123ff36b9a400484156ffcf2e581a717c8140cb

Number of compiler warnings:

occt component :
Linux: 16 (16 on master)
Windows: 0 (0 on master)


There are compilation errors on MacOs:

http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR23631_1/job/mnt-CR23631_1-master_prepare_build_occt_MacOS/1/parsed_console/ [^]
/Users/mnt/tools/WOK670/wok_entities/LOC/dev/CR23631-1-master-occt/inc/BRepMesh_EdgeChecker.hxx:76:3: error: 'mutable' cannot be applied to references
mutable Standard_Mutex& myMutex;

/Users/mnt/tools/WOK670/wok_entities/LOC/dev/CR23631-1-master-occt/inc/BRepMesh_EdgeChecker.hxx:77:3: error: 'mutable' cannot be applied to references
mutable Standard_Boolean& myIsFailed;


Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR23631-1-master-occt/Debian60-64/bugs/mesh/bug23631.html [^]
http://occt-tests/CR23631-1-master-occt/Windows-32-VC9/bugs/mesh/bug23631.html [^]
bugs mesh(016) bug23631 - OK

Testing on Linux:
Total MEMORY difference: 361042160 / 361239560
Total CPU difference: 51946.46999999973 / 53202.729999999996

Testing on Windows:
Total MEMORY difference: 383509904 / 383800460
Total CPU difference: 37566.484375 / 42820.09375

There are no differences in images found by testdiff.
(0029700)
oan (developer)
2014-06-05 12:59

Dear MKV,

Modificator mutable has been removed to fix compilation errors on MacOs.
Please test.

Could you please also run measurement test cases test01-test06 attached to this bug to investigate changes in performance.

Note that current implementation of measurement tests uses incmesh in consecutive mode. As far as updated fix has possibility to be executed in parallel, please provide additional measurement report for incmesh run in parallel (additional flag is necessary - e.g. incmesh a 0.01 1).
(0029758)
apn (administrator)
2014-06-10 14:47

test01-test06:
http://occt-tests/23631_branch_test/summary.html [^]
http://occt-tests/23631_master_test/summary.html [^]

test1:
Elapsed time: 21.0582516864 Sec (20.5214065839 Sec on master) size 10.2 MB

test2:
Elapsed time: 42.0088274845 Sec (42.1832723727 Sec on master) size 18.5 MB

test3:
Elapsed time: 23.7721538514 Sec (23.0834505145 Sec on master) size 34.9 MB

test4:
Elapsed time: 2 Min 12.2787742996 Sec (1 Min 24.0340788336 Sec on master) size 59 MB

test5:
Elapsed time: 2 Min 27.6439726587 Sec (2 Min 25.8042220242 Sec on master) size 50 MB step

test6:
Elapsed time: 6 Min 32.6425076874 Sec (3 Min 28.3094323344 Sec on master) size 34.3 MB
(0029759)
apn (administrator)
2014-06-10 14:49

Incmesh in parallel:
http://occt-tests/23631_branch_testparallel/summary.html [^]

test1:
Elapsed time: 0 Hours 0 Minutes 9.2010350262 Seconds

test2:
Elapsed time: 0 Hours 0 Minutes 19.8777292317 Seconds

test3:
Elapsed time: 0 Hours 0 Minutes 13.2146363023 Seconds

test4:
Elapsed time: 0 Hours 0 Minutes 44.0383796063 Seconds

test5:
Elapsed time: 0 Hours 1 Minutes 4.30894775421 Seconds

test6:
Elapsed time: 0 Hours 3 Minutes 33.9908699419 Seconds
(0029760)
mkv (tester)
2014-06-10 14:58
edited on: 2014-06-10 15:01

Dear BugMaster,

Branch CR23631_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: a6af7bc64f5ce12f024e9f16a4e83a05f214428f

Number of compiler warnings:

occt component :
Linux: 16 (16 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
sat doc_1(001) B8, O4
sat read_parallel(009) A1, A3, B6, C3, E2 - only on Linux
sat load(010) B3
sat simple(011) B3

Testing cases:
http://occt-tests/CR23631-1-master-occt/Debian60-64/bugs/mesh/bug23631.html [^]
http://occt-tests/CR23631-1-master-occt/Windows-32-VC9/bugs/mesh/bug23631.html [^]
bugs mesh(016) bug23631: OK

Testing on Linux:
Total MEMORY difference: 361112300 / 348911880
Total CPU difference: 52335.91000000001 / 52776.510000000024

Testing on Windows:
Total MEMORY difference: 383230020 / 376950988
Total CPU difference: 37953.453125 / 42280.578125

There are no differences in images found by testdiff.

(0029777)
oan (developer)
2014-06-16 10:34
edited on: 2014-06-16 10:34

Dear MKV,

reported Regressions/Differences have no connection with changes introduced in context of current issue as well as with incmesh in particular.

Please proceed the changes.

(0029812)
mkv (tester)
2014-06-18 14:03

Dear BugMaster,

Branch CR223631_1 was rebased on current master and was recompiled on Linux, MacOS and Windows platforms and was retested.
SHA-1: 76a1aaacb567b72dd1e895dd5e07ba8c900c2ad7

Number of compiler warnings:

occt component :
Linux: 16 (16 on master)
Windows: 0 (0 on master)
MacOS: 200 (203 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR23631-1-master-occt/Debian60-64/bugs/mesh/bug23631.html [^]
http://occt-tests/CR23631-1-master-occt/Windows-32-VC9/bugs/mesh/bug23631.html [^]
bugs mesh(016) bug23631: OK

Testing on Linux:
Total MEMORY difference: 348356556 / 348271088
Total CPU difference: 50448.030000000035 / 51079.56999999988

Testing on Windows:
Total MEMORY difference: 376377616 / 376854496
Total CPU difference: 39271.703125 / 38860.21875

There are no differences in images found by testdiff.

- Related Changesets
occt: master 9bdafcbe
Timestamp: 2014-06-19 09:23:53
Author: oan
Committer: apn
Details ] Diff ]
0023631: Infinite memory consumption in BRepMesh

Check is the shape to be meshed has correct poly data, i.e. PolygonOnTriangulation of particular edge connected to the same Triangulation data structure as stored inside a parent face.
Adding test cases for issue CR23631 bugs/mesh/bug23631
Parallel checking of faces/edges
Make BRepMesh_IncrementalMesh class imported from BRepMesh package.
Resolve GCC warnings on Linux platform
Fix compilation errors on MacOs: remove mutable modificator on reference fields.
mod - src/BRepMesh/BRepMesh.cdl Diff ] File ]
add - src/BRepMesh/BRepMesh_EdgeChecker.hxx Diff ] File ]
add - src/BRepMesh/BRepMesh_FaceChecker.hxx Diff ] File ]
rm - src/BRepMesh/BRepMesh_IncrementalMesh.cdl Diff ] File ]
mod - src/BRepMesh/BRepMesh_IncrementalMesh.cxx Diff ] File ]
add - src/BRepMesh/BRepMesh_IncrementalMesh.hxx Diff ] File ]
mod - src/BRepMesh/FILES Diff ] File ]
add - tests/bugs/mesh/bug23631 Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-12-12 07:59 abv New Issue
2012-12-12 07:59 abv Assigned To => oan
2012-12-12 07:59 abv File Added: OCC396_f2903.brep
2013-02-28 17:07 abv Target Version 6.6.0 => 6.7.0
2013-07-29 13:04 oan Note Added: 0025189
2013-07-29 13:05 oan Assigned To oan => pdn
2013-07-29 13:05 oan Status new => resolved
2013-08-05 17:12 pdn Note Added: 0025235
2013-08-05 17:12 pdn Status resolved => reviewed
2013-08-05 17:40 mkv Assigned To pdn => mkv
2013-08-06 19:03 mkv Note Added: 0025252
2013-08-06 19:04 mkv Test case number => bugs modalg_5(010) bug23631
2013-08-06 19:04 mkv Assigned To mkv => oan
2013-08-06 19:04 mkv Status reviewed => assigned
2013-08-06 19:04 mkv Note Edited: 0025252 View Revisions
2013-08-06 19:08 abv Status assigned => feedback
2013-08-20 13:34 oan Note Added: 0025351
2013-08-20 13:34 oan Assigned To oan => mkv
2013-08-20 13:34 oan Status feedback => assigned
2013-08-20 14:39 mkv Assigned To mkv => apn
2013-08-20 15:40 apn Note Added: 0025355
2013-08-20 15:41 apn File Added: test1
2013-08-20 15:41 apn File Added: test2
2013-08-20 15:41 apn File Added: test3
2013-08-20 15:41 apn File Added: test4
2013-08-20 15:45 apn Note Edited: 0025355 View Revisions
2013-08-20 15:45 apn Test case number bugs modalg_5(010) bug23631 => bugs mesh bug23631
2013-08-20 15:45 apn Assigned To apn => oan
2013-08-20 16:21 apn Note Edited: 0025355 View Revisions
2013-08-20 16:21 apn File Deleted: test1
2013-08-20 16:21 apn File Deleted: test2
2013-08-20 16:21 apn File Deleted: test3
2013-08-20 16:21 apn File Deleted: test4
2013-08-20 16:22 apn File Added: test1
2013-08-20 16:22 apn File Added: test2
2013-08-20 16:22 apn File Added: test3
2013-08-20 16:22 apn File Added: test4
2013-08-20 17:06 apn Note Edited: 0025355 View Revisions
2013-08-20 17:07 apn File Added: test5
2013-08-21 10:32 apn Note Edited: 0025355 View Revisions
2013-08-21 10:32 apn File Added: test6
2013-11-14 11:04 apn Status assigned => feedback
2013-11-14 15:01 apn Assigned To oan => apn
2013-11-15 13:05 apn Note Added: 0026650
2013-11-15 13:42 apn File Added: test01
2013-11-15 13:42 apn File Added: test02
2013-11-15 13:42 apn File Added: test03
2013-11-15 13:42 apn File Added: test04
2013-11-15 13:42 apn File Added: test05
2013-11-15 13:43 apn File Added: test06
2013-11-15 14:34 apn Note Edited: 0026650 View Revisions
2013-11-15 14:34 apn Assigned To apn => oan
2013-12-21 10:41 abv Target Version 6.7.0 => 6.7.1
2014-04-04 17:28 abv Target Version 6.7.1 => 6.8.0
2014-05-28 12:30 oan Note Added: 0029570
2014-05-28 12:30 oan Assigned To oan => pdn
2014-05-28 12:30 oan Status feedback => resolved
2014-05-29 17:37 pdn Assigned To pdn => mkv
2014-05-29 17:37 pdn Status resolved => reviewed
2014-05-30 15:11 apn Assigned To mkv => apn
2014-06-03 18:53 mkv Note Added: 0029659
2014-06-03 18:54 mkv Assigned To apn => oan
2014-06-03 18:54 mkv Status reviewed => assigned
2014-06-04 11:42 oan Note Added: 0029666
2014-06-04 11:42 oan Assigned To oan => mkv
2014-06-04 11:42 oan Status assigned => resolved
2014-06-04 11:42 oan Status resolved => reviewed
2014-06-04 16:28 mkv Note Added: 0029679
2014-06-04 16:28 mkv Assigned To mkv => oan
2014-06-04 16:28 mkv Status reviewed => assigned
2014-06-04 18:00 mkv Note Added: 0029680
2014-06-04 19:50 oan Assigned To oan => mkv
2014-06-04 19:51 oan Note Added: 0029681
2014-06-04 19:51 oan Status assigned => resolved
2014-06-04 19:51 oan Status resolved => reviewed
2014-06-05 12:31 mkv Note Added: 0029699
2014-06-05 12:32 mkv Test case number bugs mesh bug23631 => bugs mesh(016) bug23631
2014-06-05 12:32 mkv Assigned To mkv => oan
2014-06-05 12:32 mkv Status reviewed => assigned
2014-06-05 12:59 oan Note Added: 0029700
2014-06-05 13:00 oan Assigned To oan => mkv
2014-06-05 13:00 oan Status assigned => resolved
2014-06-05 13:00 oan Status resolved => reviewed
2014-06-06 15:05 mkv Assigned To mkv => apn
2014-06-10 14:47 apn Note Added: 0029758
2014-06-10 14:49 apn Note Added: 0029759
2014-06-10 14:58 mkv Note Added: 0029760
2014-06-10 14:59 mkv Assigned To apn => oan
2014-06-10 14:59 mkv Status reviewed => assigned
2014-06-10 15:01 mkv Note Edited: 0029760 View Revisions
2014-06-16 10:34 oan Note Added: 0029777
2014-06-16 10:34 oan Assigned To oan => mkv
2014-06-16 10:34 oan Status assigned => feedback
2014-06-16 10:34 oan Note Edited: 0029777 View Revisions
2014-06-18 14:03 mkv Note Added: 0029812
2014-06-18 14:04 mkv Assigned To mkv => bugmaster
2014-06-18 14:04 mkv Status feedback => tested
2014-06-20 12:54 apn Changeset attached => occt master 9bdafcbe
2014-06-20 12:54 apn Assigned To bugmaster => apn
2014-06-20 12:54 apn Status tested => verified
2014-06-20 12:54 apn Resolution open => fixed
2014-11-11 12:46 aiv Fixed in Version => 6.8.0
2014-11-11 12:52 aiv Status verified => closed


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker