View Issue Details

IDProjectCategoryView StatusLast Update
0031628CommunityOCCT:Configurationpublic2022-03-11 12:14
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Product Version7.4.0 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
DescriptionUsers have reported the issue with VS2019 building 32-bit targets:
https://www.opencascade.com/content/visual-studio-2019-version-1644-hangs-when-building-occ

The bug has been confirmed by MSFT and should be expected to be fixed in the next VS2019 update:
https://developercommunity.visualstudio.com/content/problem/1082623/infinite-compilation-using-stdstable-sort.html?childToView=1091245#comment-1091245

Let see how soon it will be fixed and consider pushing one of available workarounds in case if it will come later than OCCT 7.5.0 release.
Steps To ReproduceBuild OCCT with MS Visual Studio 2019 in "Release" configuration of "Win32" platform with Whole Program Optimization disabled (it can be enabled with /GL command line key for compiler and /LTCG one for linker). The process of compilation is endless.
TagsNo tags attached.
Test case numberNot required

Relationships

related to 0031782 closedbugmaster Open CASCADE Modeling Algorithms - Regressions on VS 2019 (vc142) on fillet tests 
related to 0032869 new Open CASCADE Coding Rules, NCollection_Vector - remove workaround against VS2019 compiler bug 
child of 0031806 newbugmaster Open CASCADE Configuration - Visual Studio 2019 bugs 

Activities

tizmaylo

2020-06-25 11:46

developer   ~0092710

As for the workaround suggested by MSFT, __declspec (noinline) should be added before the declaration of the method NCollection_Vector::Iterator::Differ().

git

2020-06-26 10:38

administrator   ~0092750

Branch CR31628 has been created by tizmaylo.

SHA-1: 31e189bc74bb3048652422447979c7dc9f392961


Detailed log of new commits:

Author: tiv
Date: Fri Jun 26 10:32:43 2020 +0300

    0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
    
    The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
    This workaround was suggested by MSFT team: https://developercommunity.visualstudio.com/content/problem/1082623/infinite-compilation-using-stdstable-sort.html?childToView=1091245#comment-1091245

tizmaylo

2020-06-26 13:00

developer   ~0092757

Patch is ready for review: http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31628-master-TIV/view/ALL/

OCCT branch: CR31628.
Products branch: master.

kgv

2020-08-06 19:34

developer   ~0093440

Dear bugmaster,

could you please check if 32-bit build no more hangs with latest Visual Studio 2019 update?

> Submitted by Maett Oetschger on 6 August, 2020 - 17:57
> It seems that with Visual Studio 2019 Version 16.7.0 this bug is fixed.

kgv

2020-09-06 11:22

developer   ~0094162

Last edited: 2020-09-06 11:23

+#if defined (_MSC_VER) && (_MSC_VER >= 1920) && defined (_WIN32) && !defined (_DEBUG)

Timur, _WIN32 is not the way to check for 32-bit target (if it is the purpose of this check here) - it is defined for both 32-bit and 64-bit targets using WinAPI.
"#if !defined(_WIN64)" could be used for this purpose.

bugmaster

2020-09-09 17:35

administrator   ~0094315

Microsoft Visual Studio Professional 2019
Version 16.7.3
Problem reproduced

git

2020-09-10 00:15

administrator   ~0094333

Branch CR31628 has been updated forcibly by tizmaylo.

SHA-1: c2b81859400b6872553324059f8d2a33a39920fa

tizmaylo

2020-09-10 00:18

developer   ~0094334

kgv
You are right, !defined (_WIN64) is more appropriate here. This fix and small improvements to the comments in the code and to the commit message were forcibly pushed to the branch CR31628.

git

2020-09-22 19:45

administrator   ~0095216

Branch CR31628_1 has been created by kgv.

SHA-1: fe9aad4b66cb01e6ba58bf6e060761fe3c5612c7


Detailed log of new commits:

Author: tiv
Date: Fri Jun 26 10:32:43 2020 +0300

    0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target
    
    The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
    The problem was at the line "std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator);" of BRepExtrema_DistShapeShape.cxx source file,
    and linked to NCollection_Vector::Differ() method.
    This workaround was suggested by MSFT team.

git

2020-09-22 19:47

administrator   ~0095217

Branch CR31628_1 has been updated forcibly by kgv.

SHA-1: 624a1c6d427b2afefee1a1ad77b4bc28802669ca

kgv

2020-09-22 19:47

developer   ~0095218

Please raise the patch
- OCCT branch: CR31628_1.

git

2020-09-22 19:48

administrator   ~0095219

Branch CR31628_1 has been updated forcibly by kgv.

SHA-1: 8c7a6da2be1f20b5ee1ff1adee7e8384c6278d86

bugmaster

2020-09-27 14:11

administrator   ~0095363

Combination -
OCCT branch : IR-2020-09-25
master SHA - d7bc5c833ec064bd103ebbff2882146ad5a7e7de
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-25 SHA - a8c0c30ba368a2503bbdf9800228ace93993dfff
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

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18039.260000000093 / 17637.5100000001 [+2.28%]
Products
Total CPU difference: 12124.200000000114 / 12092.06000000011 [+0.27%]
Windows-64-VC14:
OCCT
Total CPU difference: 19753.9375 / 18982.296875 [+4.07%]
Products
Total CPU difference: 13527.921875 / 13315.40625 [+1.60%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-09-27 14:29

administrator   ~0095389

Branch CR31628_1 has been deleted by inv.

SHA-1: 8c7a6da2be1f20b5ee1ff1adee7e8384c6278d86

git

2020-09-27 14:30

administrator   ~0095403

Branch CR31628 has been deleted by inv.

SHA-1: c2b81859400b6872553324059f8d2a33a39920fa

Related Changesets

occt: master 0b55d29b

2020-06-26 07:32:43

tiv


Committer: bugmaster Details Diff
0031628: Configuration - Visual Studio 2019 compiler hangs on building 32-bit target

The workaround for a bug occurred in MS Visual Studio 2019 / Win32 / Release configuration with disabled Whole Program Optimization is implemented.
The problem was at the line "std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator);" of BRepExtrema_DistShapeShape.cxx source file,
and linked to NCollection_Vector::Differ() method.
This workaround was suggested by MSFT team.
Affected Issues
0031628
mod - src/NCollection/NCollection_Vector.hxx Diff File

Issue History

Date Modified Username Field Change
2020-06-25 11:23 kgv New Issue
2020-06-25 11:23 kgv Assigned To => bugmaster
2020-06-25 11:24 kgv Assigned To bugmaster => kgv
2020-06-25 11:46 tizmaylo Note Added: 0092710
2020-06-26 10:38 git Note Added: 0092750
2020-06-26 13:00 tizmaylo Note Added: 0092757
2020-06-26 13:02 tizmaylo Status new => resolved
2020-06-26 13:02 tizmaylo Steps to Reproduce Updated
2020-06-26 15:10 tizmaylo Steps to Reproduce Updated
2020-08-06 19:34 kgv Note Added: 0093440
2020-08-06 19:34 kgv Assigned To kgv => bugmaster
2020-08-06 19:34 kgv Status resolved => feedback
2020-08-17 10:31 kgv Assigned To bugmaster => kgv
2020-08-17 10:31 kgv Status feedback => resolved
2020-08-28 18:24 bugmaster Assigned To kgv => bugmaster
2020-08-28 18:24 bugmaster Status resolved => feedback
2020-09-06 11:22 kgv Note Added: 0094162
2020-09-06 11:23 kgv Note Edited: 0094162
2020-09-09 17:35 bugmaster Note Added: 0094315
2020-09-10 00:15 git Note Added: 0094333
2020-09-10 00:18 tizmaylo Note Added: 0094334
2020-09-11 15:40 utverdov Target Version 7.5.0 => 7.6.0
2020-09-11 15:59 kgv Target Version 7.6.0 => 7.5.0
2020-09-19 15:32 kgv Relationship added related to 0031781
2020-09-21 17:22 kgv Relationship added related to 0031782
2020-09-22 19:25 kgv Status feedback => reviewed
2020-09-22 19:45 git Note Added: 0095216
2020-09-22 19:47 git Note Added: 0095217
2020-09-22 19:47 kgv Note Added: 0095218
2020-09-22 19:48 git Note Added: 0095219
2020-09-27 12:13 bugmaster Test case number => Not required
2020-09-27 14:11 bugmaster Note Added: 0095363
2020-09-27 14:11 bugmaster Status reviewed => tested
2020-09-27 14:13 bugmaster Changeset attached => occt master 0b55d29b
2020-09-27 14:13 bugmaster Status tested => verified
2020-09-27 14:13 bugmaster Resolution open => fixed
2020-09-27 14:29 git Note Added: 0095389
2020-09-27 14:30 git Note Added: 0095403
2020-09-30 10:06 kgv Relationship added child of 0031806
2020-09-30 10:18 kgv Relationship deleted related to 0031781
2020-12-02 16:22 emo Fixed in Version => 7.5.0
2020-12-02 17:13 emo Status verified => closed
2022-03-11 12:14 kgv Relationship added related to 0032869