View Issue Details

IDProjectCategoryView StatusLast Update
0024359CommunityOCCT:Modeling Algorithmspublic2014-01-28 14:49
Reporterjaydenshui Assigned Tobugmaster  
PriorityurgentSeveritycrash 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024359: Crash on BRepAlgoAPI_Fuse
DescriptionWhen fusing 27 spheres of radius 2 at (x, y, z) where x = 1, 2 or 3, y = 1, 2, or 3, and z = 1, 2, or 3, it crashes.
Steps To ReproduceTry the following code in draw.exe. It crashes. I tried 6.7.0 beta, 6.6.0, 6.5.x. All crash.

psphere s01 2; ttranslate s01 1 1 1
psphere s02 2; ttranslate s02 1 1 2
psphere s03 2; ttranslate s03 1 1 3
psphere s04 2; ttranslate s04 1 2 1
psphere s05 2; ttranslate s05 1 2 2
psphere s06 2; ttranslate s06 1 2 3
psphere s07 2; ttranslate s07 1 3 1
psphere s08 2; ttranslate s08 1 3 2
psphere s09 2; ttranslate s09 1 3 3
psphere s10 2; ttranslate s10 2 1 1
psphere s11 2; ttranslate s11 2 1 2
psphere s12 2; ttranslate s12 2 1 3
psphere s13 2; ttranslate s13 2 2 1
psphere s14 2; ttranslate s14 2 2 2
psphere s15 2; ttranslate s15 2 2 3
psphere s16 2; ttranslate s16 2 3 1
psphere s17 2; ttranslate s17 2 3 2
psphere s18 2; ttranslate s18 2 3 3
psphere s19 2; ttranslate s19 3 1 1
psphere s20 2; ttranslate s20 3 1 2
psphere s21 2; ttranslate s21 3 1 3
psphere s22 2; ttranslate s22 3 2 1
psphere s23 2; ttranslate s23 3 2 2
psphere s24 2; ttranslate s24 3 2 3
psphere s25 2; ttranslate s25 3 3 1
psphere s26 2; ttranslate s26 3 3 2
psphere s27 2; ttranslate s27 3 3 3

bop s01 s02; bopfuse s
bop s s03; bopfuse s
bop s s04; bopfuse s
bop s s05; bopfuse s
bop s s06; bopfuse s
bop s s07; bopfuse s
bop s s08; bopfuse s
bop s s09; bopfuse s
bop s s10; bopfuse s
bop s s11; bopfuse s
bop s s12; bopfuse s
bop s s13; bopfuse s
bop s s14; bopfuse s
bop s s15; bopfuse s
bop s s16; bopfuse s
bop s s17; bopfuse s
bop s s18; bopfuse s
bop s s19; bopfuse s
bop s s20; bopfuse s
bop s s21; bopfuse s
bop s s22; bopfuse s
bop s s23; bopfuse s
bop s s24; bopfuse s
bop s s25; bopfuse s
bop s s26; bopfuse s
bop s s27; bopfuse s
Additional information
and documentation updates
C++ code to do it. Crashes also.

TopoDS_Shape r = BRepPrimAPI_MakeSphere(gp_Pnt(10,0,0), 2);
for (int i = 1; i < 4; i++)
  for (int j = 1; j < 4; j++)
    for (int k = 1; k < 4; k++)
      r = BRepAlgoAPI_Fuse(r, BRepPrimAPI_MakeSphere(gp_Pnt(i,j,k), 2));
TagsNo tags attached.
Test case numberbugs modalg_5(010) bug24359

Activities

abv

2013-11-17 07:46

manager   ~0026675

Last edited: 2013-11-17 07:46

Just for information: I have tried this code on OCCT 6.7.0.beta built with VC9 32-bit on Windows; DRAW script produced valid result after some time (~ 25 min, notably all operations until s19 are done quite fast, as well as the last one, s27, so there is performance issue with at least s19). No crash detected.

jaydenshui

2013-11-17 18:11

reporter   ~0026676

Last edited: 2013-11-17 18:14

It takes so long time that I think it crashes. I retried it and got a valid result after an overnight running. I also tried the old BRepAlgo_Fuse. It has no such performance issue.

emv

2013-11-21 15:44

developer   ~0026826

The problem in the algorithm of projection of 3d curve on the surface. It takes nearly five minutes to project part of the circle on the sphere. Try the sub case in draw:

psphere p1 2; ttranslate p1 1 1 3
psphere p2 2; ttranslate p2 3 1 1
explode p1 f; copy p1_1 f1
explode p2 f; copy p2_1 f2
mksurface s1 f1
mksurface s2 f2
intersect i s1 s2
trim c i_2 5.1724665738417412 6.2831853071795862
don c s1; fit
chrono t reset; chrono t start;
project c2d c s1
#Projection Failed
chrono t stop; chrono t show
#Elapsed time: 0 Hours 4 Minutes 56.3626932083 Seconds
#CPU user time: 295.2942929 seconds
#CPU system time: 0.0312002 seconds

ifv

2013-12-02 11:09

developer   ~0027025

Please review CR24359

jgv

2013-12-03 15:52

developer   ~0027053

No remarks.

mkv

2013-12-04 11:27

tester   ~0027073

Dear BugMaster,

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

Number of compiler warnings:

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

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

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24359-master-occt/Debian60-64/bugs/modalg_5/bug24359.html
http://occt-tests/CR24359-master-occt/Windows-32-VC9/bugs/modalg_5/bug24359.html
bugs modalg_5(010) bug24359: OK

Testing on Linux:
Total MEMORY difference: 358518844 / 358740848
Total CPU difference: 40388.93000000013 / 45679.10000000019

Testing on Windows:
Total MEMORY difference: 413107660 / 412495636
Total CPU difference: 31279.09375 / 33996.28125

There are not differences in images found by testdiff.

abv

2014-01-28 14:49

manager   ~0027659

The test modalg_5 bug24359 fails on 64-bit windows on current master

Related Changesets

occt: master ef2d8af7

2013-12-05 11:36:22

ifv


Committer: bugmaster Details Diff
0024359: Crash on BRepAlgoAPI_Fuse

Test case for issue CR24359
Affected Issues
0024359
mod - src/ProjLib/ProjLib_ComputeApprox.cxx Diff File
add - tests/bugs/modalg_5/bug24359 Diff File

Issue History

Date Modified Username Field Change
2013-11-14 22:25 jaydenshui New Issue
2013-11-14 22:25 jaydenshui Assigned To => ifv
2013-11-15 10:07 ifv Assigned To ifv => emv
2013-11-15 10:07 ifv Status new => assigned
2013-11-17 07:46 abv Note Added: 0026675
2013-11-17 07:46 abv Note Edited: 0026675
2013-11-17 18:11 jaydenshui Note Added: 0026676
2013-11-17 18:11 jaydenshui Note Edited: 0026676
2013-11-17 18:14 jaydenshui Note Edited: 0026676
2013-11-21 15:44 emv Note Added: 0026826
2013-11-21 15:44 emv Assigned To emv => ifv
2013-12-02 11:09 ifv Note Added: 0027025
2013-12-02 11:09 ifv Assigned To ifv => jgv
2013-12-02 11:09 ifv Status assigned => resolved
2013-12-03 15:52 jgv Note Added: 0027053
2013-12-03 15:52 jgv Status resolved => reviewed
2013-12-04 07:36 mkv Assigned To jgv => mkv
2013-12-04 11:27 mkv Note Added: 0027073
2013-12-04 11:28 mkv Test case number => bugs modalg_5(010) bug24359
2013-12-04 11:28 mkv Assigned To mkv => bugmaster
2013-12-04 11:28 mkv Status reviewed => tested
2013-12-06 17:57 bugmaster Changeset attached => occt master ef2d8af7
2013-12-06 17:57 bugmaster Status tested => verified
2013-12-06 17:57 bugmaster Resolution open => fixed
2013-12-09 12:02 bugmaster Target Version => 6.7.0
2013-12-19 13:50 bugmaster Status verified => closed
2013-12-19 13:59 bugmaster Fixed in Version => 6.7.0
2014-01-28 14:49 abv Note Added: 0027659