View Issue Details

IDProjectCategoryView StatusLast Update
0023593CommunityOCCT:Data Exchangepublic2014-10-09 18:46
ReporterRoman Lygin Assigned ToRoman Lygin  
Status closedResolutionfixed 
Product Version6.5.4 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023593: XCAFDoc_DocumentTool label must be removed from internal map upon closing the XDE document
DescriptionXCAFDoc_DocTool.cxx contains a static map RootLDocLMap. Prior to the fix, when the document got closed this map would contain orphan pair {root, doc_lab}. When a new doc is created its rootlab might have the same LabNotePtr and hence the same hash function value. Therefore XCAFDoc_DocumentTool::DocLabel() considered the label has already been registered RootLDocLMap and returned a wrong label (instead of creating new). Further attempt to access that label threw an exception.

Alternative approach to storing a global map would be a simple tree node attribute hosted on a root label and pointing to a label holding XCAFDoc_DocumentTool. This would be a reliable self-contained implementation.

Note: this is an older fix430.
Steps To ReproduceThe issue is sporadic and depends on memory layout. It is revealed when dealing with numerous OCAF documents which are created and destroyed during the process life cycle. It had been more frequent on Linux than on Windows.
TagsNo tags attached.
Test case numberNot needed


has duplicate 0022594 closedabv Community XCAFDoc_DocumentTool attributes are removed from internal map upon closing the XDE document 
related to 0024007 closedRoman Lygin Community [Regression] Sporadic crashes when working with XDE documents 
related to 0024164 closedbugmaster Open CASCADE Optimization of OCAF document closing 


Roman Lygin

2012-11-28 13:09

developer   ~0022404

Pushed branch CR23593 into the git repository


2012-11-28 18:01

developer   ~0022421

Branch CR23593 is ready to be tested.


2012-12-03 14:47

tester   ~0022515

Dear BugMaster,
Branch CR23593 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Not detected

Not detected

Testing cases:
Not needed

Related Changesets

occt: master f898928a

2012-11-28 09:07:44

Roman Lygin

Details Diff
0023593: XCAFDoc_DocumentTool label must be removed from internal map upon closing the XDE document Affected Issues
mod - src/XCAFDoc/XCAFDoc_DocumentTool.cdl Diff File
mod - src/XCAFDoc/XCAFDoc_DocumentTool.cxx Diff File

Issue History

Date Modified Username Field Change
2012-11-28 13:06 Roman Lygin New Issue
2012-11-28 13:06 Roman Lygin Assigned To => gka
2012-11-28 13:09 Roman Lygin Note Added: 0022404
2012-11-28 13:09 Roman Lygin Status new => resolved
2012-11-28 18:01 gka Note Added: 0022421
2012-11-28 18:01 gka Status resolved => reviewed
2012-11-28 19:08 mkv Assigned To gka => mkv
2012-12-03 14:47 mkv Note Added: 0022515
2012-12-03 14:47 mkv Test case number => Not needed
2012-12-03 14:47 mkv Assigned To mkv => bugmaster
2012-12-03 14:47 mkv Status reviewed => tested
2012-12-10 17:16 Roman Lygin Changeset attached => occt master f898928a
2012-12-10 17:16 Roman Lygin Assigned To bugmaster => Roman Lygin
2012-12-10 17:16 Roman Lygin Status tested => verified
2012-12-10 17:16 Roman Lygin Resolution open => fixed
2012-12-10 17:49 bugmaster Target Version => 6.6.0
2013-04-23 13:36 aiv Status verified => closed
2013-04-29 15:21 aiv Fixed in Version => 6.6.0
2013-06-02 12:18 Roman Lygin Relationship added related to 0024007
2013-10-02 15:52 abv Relationship added related to 0024164
2014-10-09 18:46 abv Relationship added has duplicate 0022594