View Issue Details

IDProjectCategoryView StatusLast Update
0026939Open CASCADEOCCT:Configurationpublic2016-04-20 15:49
Reporterkgv Assigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026939: Configuration, NCollection_UBTreeFiller - do not use _REENTRANT in a header file
Description_REENTRANT is weird thing and it is better to avoid it.
It causes compiler errors when using qmake.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Activities

git

2015-12-28 12:43

administrator   ~0049630

Branch CR26939 has been created by msv.

SHA-1: 1ae824b083f28da3bbcd3d8acca4167a0cfd1487


Detailed log of new commits:

Author: msv
Date: Mon Dec 28 12:35:34 2015 +0300

    0026939: Configuration, NCollection_UBTreeFiller - do not use _REENTRANT in a header file
    
    Make the code always using the thread-safe function rand_r.

msv

2015-12-28 12:44

developer   ~0049631

Please review.

kgv

2015-12-28 12:50

developer   ~0049632

Last edited: 2015-12-28 12:51

Dear Mikhail,

rand_r is not part of Android NDK - and this is the reason for this bug (sorry for incomplete description).
Maybe some OCCT generator can be used instead (like math_BullardGenerator, but it is located in another package)?

abv

2016-01-09 18:54

manager   ~0049756

Also, rand_r is not available on Windows (at least, MSDN does not mention it, and patch does not build). Note that modern C++ provides a set of standard random generators in <random> header, I suggest one of these should be used instead of C function. I guess that std::mt19937 should work just fine.

git

2016-01-22 14:28

administrator   ~0050052

Branch CR26939_1 has been created by kgv.

SHA-1: 97df262a73910058c5591d2f5ad0bb7293934d8e


Detailed log of new commits:

Author: kgv
Date: Fri Jan 22 14:28:18 2016 +0300

    0026939: Configuration, NCollection_UBTreeFiller - do not use _REENTRANT in a header file
    
    Use std::mt19937 random number generator instead of rand() in NCollection_UBTreeFiller.

kgv

2016-01-22 14:43

developer   ~0050053

Dear Mikhail,

please take a look on the patch in branch CR26939_1 (based on suggestion from Andrey).

msv

2016-01-22 15:30

developer   ~0050063

Remarks:

1) It seems RAND_MAX is no more needed. Please, remove corresponding code.
2) I think the following includes can be removed:
#include <stdlib.h>
#include <stdio.h>

git

2016-01-22 15:55

administrator   ~0050065

Branch CR26939_1 has been updated by kgv.

SHA-1: 841bf896ff6b6e097235f169230e3b8b8e81bc86


Detailed log of new commits:

Author: kgv
Date: Fri Jan 22 15:55:07 2016 +0300

    remove redundant code

git

2016-01-22 15:56

administrator   ~0050066

Branch CR26939_2 has been created by kgv.

SHA-1: d8bd793520cb127c8b4d66a29e64692af5069496


Detailed log of new commits:

Author: kgv
Date: Fri Jan 22 15:55:55 2016 +0300

    0026939: Configuration, NCollection_UBTreeFiller - do not use _REENTRANT in a header file
    
    Use std::mt19937 random number generator instead of rand() in NCollection_UBTreeFiller.

kgv

2016-01-22 15:56

developer   ~0050067

Remarks have been applied in updated patch.

msv

2016-01-22 18:38

developer   ~0050076

Reviewed.

mkv

2016-01-25 17:33

tester   ~0050103

Dear BugMaster,
Branch CR26939_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: d8bd793520cb127c8b4d66a29e64692af5069496

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 1 (1 on master)

products component :
Linux: 36 (36 on master)
Windows: 0 (0 on master)

Regressions/Differences/Improvements:

http://occt-tests/CR26939-2-master-occt-64/Debian70-64/summary.html
Improvements:
  boolean volumemaker D5
Failed:
  boolean volumemaker B6, C9, D2, H4
  bugs modalg_1 buc60462_2

http://occt-tests/CR26939-2-master-occt-64/Windows-64-VC10/summary.html
Improvements:
  boolean gdml_private ZI7, ZJ7
Failed:
  boolean volumemaker B6, C9, D2
  bugs modalg_1 buc60462_2

http://occt-tests/CR26939-2-master-products-64/Debian70-64/summary.html
Failed:
  bfit pnt100 A4
  bfit pnt1000 A4, A7
  bfit pnt10000 A4

http://occt-tests/CR26939-2-master-products-64/Windows-64-VC10/summary.html
Failed:
  bfit pnt100 A4

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 89373411 / 89608145 [-0.26%]
Total CPU difference: 19227.640000000167 / 19150.610000000095 [+0.40%]
products component :

Testing on Windows:
occt component :
Total MEMORY difference: 57221763 / 57247969 [-0.05%]
Total CPU difference: 17947.930650098806 / 18414.139638599045 [-2.53%]
products component :
Total MEMORY difference: 17239751 / 17252669 [-0.07%]
Total CPU difference: 5772.505002999976 / 6200.821348599963 [-6.91%]

There are no differences in images found by testdiff.

mkv

2016-01-25 17:34

tester   ~0050104

Dear kgv,
Branch CR26939_2 has been rejected due to:
- regressions/differences/improvements

abv

2016-02-02 10:56

manager   ~0050331

The changes are caused by variation of behavior of UBTree due to changed sequence of random numbers (note that UBTree is rather widely used in BOP now). The dependency of result on random sequence is indication of flawed logic of the algorithms, however this should be treated separately.

As soon as the new result is stable (only the algorithm has changed), I propose we can accept this as current state of the code.

By logs, regressions are compensated by improvements:

boolean volumemaker D5 on Linux: is actual improvement (behavior is correct, like on Windows)

boolean volumemaker B6, C9, D2: formal regression (faulties), but visually result is the same (invalid)

boolean volumemaker D5: Linux-specific regression (bopcheck failed)

boolean gdml_private ZI7 ZJ7: looks like improvement (checkshape), Linux only

bugs modalg_1 buc60462_2: looks like real improvement (invalid result instead of complete failure)

msv

2016-02-02 15:35

developer   ~0050350

I agree to accept the current state.

msv

2016-02-02 15:35

developer   ~0050351

Dear Andrey, please update test cases.

git

2016-02-03 14:15

administrator   ~0050380

Branch CR26939_2 has been updated forcibly by apn.

SHA-1: d2567718203dbffbce482291e059bffad6eace6f

git

2016-02-03 15:01

administrator   ~0050381

Branch CR26939_2 has been updated by apn.

SHA-1: 256f4d8c23491cf1eda375f9f8b177c754f29410


Detailed log of new commits:

Author: apn
Date: Wed Feb 3 15:00:44 2016 +0300

    boolean gdml_private ZI7 ZJ7 - TODO "bopcheck failed" is only for Linux now, checkshape faulty is unstable (issue #27052)
    boolean volumemaker B6 - Added TODO (bopcheck and checkshape faulties)
    boolean volumemaker C9 - Added TODO (checkprops and checkshape faulties)
    boolean volumemaker D2 - Added TODO (checkshape faulty)
    boolean volumemaker H4 - Added TODO (checkprops and checkshape faulties Linux only)
    boolean volumemaker D5 - IMVPROVEMENT, TODOs were deleted (bopcheck and checkshape faulties)
    bugs modalg_1 buc60462_2 - modified TODOs according to new behavior

apn

2016-02-03 15:25

administrator   ~0050382

Test cases were modified according to new behavior.
Dear msv, could you please review OCCT and PRODUCTS branches CR26939_2.

msv

2016-02-03 18:18

developer   ~0050402

Remarks.

tests\boolean\gdml_private\ZI7
tests\boolean\gdml_private\ZJ7

The picture in Windows shows totally incorrect result. So, it is not improvement. Please add checking of sprops of the result in these cases. Take master value as reference. Also, it is incorrect to show input shapes when the result is empty or null. So, add the command "don result".

git

2016-02-05 13:20

administrator   ~0050443

Branch CR26939_2 has been updated forcibly by apn.

SHA-1: de6996914cc0a3b82e0bd544bf26ee764d83895b

git

2016-02-08 15:08

administrator   ~0050479

Branch CR26939_2 has been updated by apn.

SHA-1: 7f5ba1169799c3aafb2718e27e203b1037744353


Detailed log of new commits:

Author: apn
Date: Mon Feb 8 15:07:39 2016 +0300

    Corrections for boolean gdml_private ZI7 ZJ7

apn

2016-02-08 15:12

administrator   ~0050480

Last edited: 2016-02-08 15:13

Dear msv, remarks were applied.
After integration in master checkview command (CR26939_2 was rebased) there are no input shapes in viewer when the result is empty or null. Checkprops was added with reference value from master.
http://occt-tests/gdml_private_ZI7_ZJ7_WNT/summary.html
http://occt-tests/gdml_private_ZI7_ZJ7_LIN/summary.html

abv

2016-02-08 15:38

manager   ~0050483

Changes in tests look OK; please consider the patch as tested

msv

2016-02-08 16:04

developer   ~0050488

I wonder why reference area is different for Linux and Windows. I am sure the property of the result must be the same when the test is passed.

abv

2016-02-08 16:13

manager   ~0050490

Mikhail, as far as I understand, the whole result is different -- this is one of a few test cases which are still unstable.

msv

2016-02-08 16:18

developer   ~0050491

I see but I think the reference must be the same in the test case, especially we need to insert TODO in any case.

git

2016-02-09 10:59

administrator   ~0050510

Branch CR26939_2 has been updated forcibly by apn.

SHA-1: b0b2819350e85de5ff6fc3107b7a573c9b16b5db

apn

2016-02-09 11:04

administrator   ~0050511

Necessary TODOs were added.
http://occt-tests/gdml_private_ZI7_ZJ7_WNT/summary.html
http://occt-tests/gdml_private_ZI7_ZJ7_LIN/summary.html

apn

2016-02-10 12:37

administrator   ~0050561

Dear szv,
Please, validate modifications of following test cases in PRODUCTS branch CR26939_2:
bfit pnt100 A4
bfit pnt1000 A4, A7
bfit pnt10000 A4

szv

2016-02-11 08:35

manager   ~0050601

Please, explain the big difference in test "bfit pnt1000 A4":

set RES_MAX_DIST 80.3708386
set RES_EXACT_MAX_DIST 80.3708386

The reference values:

set RES_MAX_DIST 5.4432757
set RES_EXACT_MAX_DIST 5.4325009

abv

2016-02-11 09:01

manager   ~0050605

Sergey, these tests are very unstable; they have different results on Linux and Windows, which change after any change in used OCCT classes, see e.g. 0026368:0043770, 0026252:0047549. I propose this problem should be addressed separately.

szv

2016-02-11 11:09

manager   ~0050618

A new issue 27153 has been created to report unstable test cases of the Best Fit component.

The regressions in the Best Fit test cases

bfit pnt100 A4
bfit pnt1000 A4, A7
bfit pnt10000 A4

caused by this fix are accepted, and the fix can be treated further.

abv

2016-02-11 11:13

manager   ~0050620

Please consider as tested

git

2016-04-17 13:07

administrator   ~0052805

Branch CR26939 has been deleted by kgv.

SHA-1: 1ae824b083f28da3bbcd3d8acca4167a0cfd1487

git

2016-04-17 13:07

administrator   ~0052806

Branch CR26939_1 has been deleted by kgv.

SHA-1: 841bf896ff6b6e097235f169230e3b8b8e81bc86

git

2016-04-17 13:07

administrator   ~0052807

Branch CR26939_2 has been deleted by kgv.

SHA-1: b0b2819350e85de5ff6fc3107b7a573c9b16b5db

Related Changesets

occt: master 2674244c

2016-01-22 12:55:55

abv


Committer: abv Details Diff
0026939: Configuration, NCollection_UBTreeFiller - do not use _REENTRANT in a header file

Use std::mt19937 random number generator instead of rand() in NCollection_UBTreeFiller.

boolean gdml_private ZI7 ZJ7 - TODO "bopcheck failed" is only for Linux now, checkshape faulty is unstable (issue #27052)
boolean volumemaker B6 - Added TODO (bopcheck and checkshape faulties)
boolean volumemaker C9 - Added TODO (checkprops and checkshape faulties)
boolean volumemaker D2 - Added TODO (checkshape faulty)
boolean volumemaker H4 - Added TODO (checkprops and checkshape faulties Linux only)
boolean volumemaker D5 - IMVPROVEMENT, TODOs were deleted (bopcheck and checkshape faulties)
bugs modalg_1 buc60462_2 - modified TODOs according to new behavior
boolean gdml_private ZI7 ZJ7 - unstable case, added check for surface area and TODO

samples/tcl/ANC101.tcl - amended due to changed order of edges in BOP result
Affected Issues
0026939
mod - samples/tcl/ANC101.tcl Diff File
mod - src/NCollection/NCollection_UBTreeFiller.hxx Diff File
mod - tests/boolean/gdml_private/ZI7 Diff File
mod - tests/boolean/gdml_private/ZJ7 Diff File
mod - tests/boolean/volumemaker/B6 Diff File
mod - tests/boolean/volumemaker/C9 Diff File
mod - tests/boolean/volumemaker/D2 Diff File
mod - tests/boolean/volumemaker/D5 Diff File
mod - tests/boolean/volumemaker/H4 Diff File
mod - tests/bugs/modalg_1/buc60462_2 Diff File

Issue History

Date Modified Username Field Change
2015-11-30 18:11 kgv New Issue
2015-11-30 18:11 kgv Assigned To => bugmaster
2015-11-30 18:11 kgv Assigned To bugmaster => kgv
2015-11-30 18:11 kgv Status new => assigned
2015-12-28 11:30 kgv Assigned To kgv => msv
2015-12-28 11:30 kgv Target Version 7.0.0 => 7.1.0
2015-12-28 12:43 git Note Added: 0049630
2015-12-28 12:44 msv Note Added: 0049631
2015-12-28 12:44 msv Assigned To msv => kgv
2015-12-28 12:44 msv Status assigned => resolved
2015-12-28 12:50 kgv Note Added: 0049632
2015-12-28 12:51 kgv Note Edited: 0049632
2015-12-28 12:52 kgv Assigned To kgv => msv
2015-12-28 12:52 kgv Status resolved => assigned
2015-12-28 13:09 msv Assigned To msv => kgv
2016-01-09 18:54 abv Note Added: 0049756
2016-01-22 14:28 git Note Added: 0050052
2016-01-22 14:43 kgv Note Added: 0050053
2016-01-22 14:43 kgv Assigned To kgv => msv
2016-01-22 14:43 kgv Status assigned => resolved
2016-01-22 14:43 kgv Target Version 7.1.0 => 7.0.0
2016-01-22 15:30 msv Note Added: 0050063
2016-01-22 15:30 msv Assigned To msv => kgv
2016-01-22 15:30 msv Status resolved => assigned
2016-01-22 15:55 git Note Added: 0050065
2016-01-22 15:56 git Note Added: 0050066
2016-01-22 15:56 kgv Note Added: 0050067
2016-01-22 15:56 kgv Assigned To kgv => msv
2016-01-22 15:56 kgv Status assigned => resolved
2016-01-22 18:38 msv Note Added: 0050076
2016-01-22 18:38 msv Assigned To msv => bugmaster
2016-01-22 18:38 msv Status resolved => reviewed
2016-01-22 19:28 mkv Assigned To bugmaster => mkv
2016-01-25 17:33 mkv Note Added: 0050103
2016-01-25 17:34 mkv Note Added: 0050104
2016-01-25 17:34 mkv Assigned To mkv => kgv
2016-01-25 17:34 mkv Status reviewed => assigned
2016-01-25 17:35 mkv Test case number => Not needed
2016-02-02 10:56 abv Note Added: 0050331
2016-02-02 10:56 abv Assigned To kgv => msv
2016-02-02 10:56 abv Status assigned => feedback
2016-02-02 15:35 msv Note Added: 0050350
2016-02-02 15:35 msv Note Added: 0050351
2016-02-02 15:35 msv Assigned To msv => apn
2016-02-03 14:15 git Note Added: 0050380
2016-02-03 15:01 git Note Added: 0050381
2016-02-03 15:25 apn Note Added: 0050382
2016-02-03 15:25 apn Assigned To apn => msv
2016-02-03 18:18 msv Note Added: 0050402
2016-02-03 18:18 msv Assigned To msv => apn
2016-02-05 13:20 git Note Added: 0050443
2016-02-08 15:08 git Note Added: 0050479
2016-02-08 15:12 apn Note Added: 0050480
2016-02-08 15:13 apn Assigned To apn => msv
2016-02-08 15:13 apn Note Edited: 0050480
2016-02-08 15:38 abv Note Added: 0050483
2016-02-08 15:38 abv Assigned To msv => bugmaster
2016-02-08 15:38 abv Status feedback => tested
2016-02-08 16:04 msv Note Added: 0050488
2016-02-08 16:04 msv Assigned To bugmaster => apn
2016-02-08 16:04 msv Status tested => feedback
2016-02-08 16:13 abv Note Added: 0050490
2016-02-08 16:18 msv Note Added: 0050491
2016-02-09 10:59 git Note Added: 0050510
2016-02-09 11:04 apn Note Added: 0050511
2016-02-09 11:05 apn Assigned To apn => bugmaster
2016-02-09 11:05 apn Status feedback => tested
2016-02-10 12:37 apn Note Added: 0050561
2016-02-10 12:38 apn Assigned To bugmaster => szv
2016-02-10 12:38 apn Status tested => feedback
2016-02-11 08:35 szv Note Added: 0050601
2016-02-11 08:35 szv Assigned To szv => kgv
2016-02-11 08:35 szv Status feedback => assigned
2016-02-11 09:01 abv Note Added: 0050605
2016-02-11 09:01 abv Assigned To kgv => szv
2016-02-11 09:01 abv Status assigned => feedback
2016-02-11 11:09 szv Note Added: 0050618
2016-02-11 11:09 szv Assigned To szv => bugmaster
2016-02-11 11:09 szv Status feedback => acknowledged
2016-02-11 11:13 abv Note Added: 0050620
2016-02-11 11:13 abv Status acknowledged => feedback
2016-02-11 12:48 bugmaster Status feedback => tested
2016-02-21 08:52 abv Changeset attached => occt master 2674244c
2016-02-21 08:52 abv Assigned To bugmaster => abv
2016-02-21 08:52 abv Status tested => verified
2016-02-21 08:52 abv Resolution open => fixed
2016-04-17 13:07 git Note Added: 0052805
2016-04-17 13:07 git Note Added: 0052806
2016-04-17 13:07 git Note Added: 0052807
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:49 aiv Status verified => closed