View Issue Details

IDProjectCategoryView StatusLast Update
0023636CommunityOCCT:Codingpublic2013-04-29 15:22
Reporterllbatlle Assigned Toabv  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
PlatformWindows 7OSWindows 
Product Version6.5.4 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023636: Problems initialising errorStream
DescriptionBuilding a program that links opencascade statically, I've hit that OSD_Error::Reset() gets called sooner than errorStream is initialized to &cerr.

This leads to a crash.

The OSD_Error::Reset() call happens in the constructor of a static object. The initialization order is undefined, for errorStream & the static object, I guess.

In an old build I have of opencascade 6.3.0 with vc2008, that works fine. But this 6.5.4 with vc2012, crashes at early start of the exe I build.
Steps To ReproduceI statically linked opencascade + tkopengl into a single exe.

I don't know if building opencascade DLLs (and not static libs) overcomes the issue. And it may be overcome by chance, for what I imagine.
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • occ-errorstream.patch (1,271 bytes)

Activities

llbatlle

2012-12-20 15:16

reporter  

occ-errorstream.patch (1,271 bytes)

llbatlle

2012-12-20 15:17

reporter   ~0022788

I attached the patch we use to make our programs not crash at start.

abv

2012-12-21 13:58

manager   ~0022800

The correction is pushed to branch CR23636; reviewed; please test

mkv

2012-12-28 14:31

tester   ~0022881

Dear BugMaster,

Branch CR23636 (and products from GIT master) was compiled on Linux and
Windows platforms and tested.

Regressions:
Not detected

Improvements:
Not detected

Testing cases:
Not needed

Related Changesets

occt: master d9b81fa5

2012-12-21 09:56:44

abv


Committer: abv Details Diff
0023636: Problems initialising errorStream
OSD_Error.cxx is protected for the case if errorStream is NULL
Affected Issues
0023636
mod - src/OSD/OSD_Error.cxx Diff File

Issue History

Date Modified Username Field Change
2012-12-12 20:49 llbatlle New Issue
2012-12-12 20:49 llbatlle Assigned To => bugmaster
2012-12-20 15:16 llbatlle File Added: occ-errorstream.patch
2012-12-20 15:17 llbatlle Note Added: 0022788
2012-12-20 15:37 abv Assigned To bugmaster => abv
2012-12-20 15:37 abv Status new => resolved
2012-12-21 13:58 abv Note Added: 0022800
2012-12-21 13:58 abv Assigned To abv => bugmaster
2012-12-21 13:58 abv Status resolved => reviewed
2012-12-28 14:31 mkv Note Added: 0022881
2012-12-28 14:32 mkv Test case number => Not needed
2012-12-28 14:32 mkv Status reviewed => tested
2013-01-04 11:35 abv Changeset attached => occt master d9b81fa5
2013-01-04 11:35 abv Assigned To bugmaster => abv
2013-01-04 11:35 abv Status tested => verified
2013-01-04 11:35 abv Resolution open => fixed
2013-02-20 10:19 bugmaster Target Version => 6.6.0
2013-04-23 13:36 aiv Status verified => closed
2013-04-29 15:22 aiv Fixed in Version => 6.6.0
2014-01-11 11:58 abv Category OCCT Release:BUILD => OCCT:Coding