MantisBT - Open CASCADE
View Issue Details
0025057Open CASCADE[OCCT] OCCT:Foundation Classespublic2014-07-08 15:452014-11-11 12:53
abv 
bugmaster 
normalminor 
closedfixed 
[OCCT] 6.7.1 
[OCCT] 6.8.0[OCCT] 6.8.0 
Not needed
0025057: Message_Algorithm fails to find messages defined for base class
When generating messages for flags set in its status, Message_Algorithm class parses hierarchy of its descendants to construct message keys in the form "class.Status" (e.g. "TrivialAlgorithm.Error1"). This iteration actually always stops at the first step, because method Message_MsgFile::Msg() always returns some string, even if there is no message registered with specified key (error is reported then).

Another problem is that when error string is generated, it does not contain name of the message key requested, which makes debug more difficult. This has been broken by 0023920.
No tags attached.
related to 0023920closed Roman Lygin Community Change use of static variables in Message package to prevent data races in Shape Healing 
Issue History
2014-07-08 15:45abvNew Issue
2014-07-08 15:45abvAssigned To => abv
2014-07-08 15:46abvRelationship addedrelated to 0023920
2014-07-08 16:24abvNote Added: 0030008
2014-07-08 16:24abvAssigned Toabv => pdn
2014-07-08 16:24abvStatusnew => resolved
2014-07-14 14:41abvAssigned Topdn => kgv
2014-07-14 14:52kgvNote Added: 0030124
2014-07-14 14:52kgvAssigned Tokgv => bugmaster
2014-07-14 14:52kgvStatusresolved => reviewed
2014-07-15 19:17mkvAssigned Tobugmaster => mkv
2014-07-15 20:22gitNote Added: 0030173
2014-07-17 13:46mkvNote Added: 0030227
2014-07-17 13:47mkvTest case number => Not needed
2014-07-17 13:47mkvAssigned Tomkv => bugmaster
2014-07-17 13:47mkvStatusreviewed => tested
2014-07-22 15:13bugmasterChangeset attached => occt master c67cd62e
2014-07-22 15:13bugmasterStatustested => verified
2014-07-22 15:13bugmasterResolutionopen => fixed
2014-07-22 15:57gitNote Added: 0030313
2014-11-11 12:46aivFixed in Version => 6.8.0
2014-11-11 12:53aivStatusverified => closed

Notes
(0030008)
abv   
2014-07-08 16:24   
Fix pushed to branch CR25057, please review.

New method HasMsg() is added in Message_MsgFile class to check if message with given key is registered.
That method is used in Message_Algorithm to check if message is defined on given level of class hierarchy.

Generation of error message in Message_MsgFile::Msg() is revised: now it includes a message key and gets added to the registry, to avoid re-generation in case of multiple requests.
Access to message registry maintained by the Message_MsgFile class is protected from concurrent access by mutex.
(0030124)
kgv   
2014-07-14 14:52   
Please test the patch.
(0030173)
git   
2014-07-15 20:22   
Branch CR25057 has been updated forcibly by mkv.

SHA-1: a9bf98a2fd6e19f5acb7bc7a6862a96b039230c5
(0030227)
mkv   
2014-07-17 13:46   
Dear BugMaster,

Branch CR25057 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: a9bf98a2fd6e19f5acb7bc7a6862a96b039230c5

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 199 (199 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 352566732 / 352298144
Total CPU difference: 52441.330000000125 / 54524.60999999987

Testing on Windows:
Total MEMORY difference: 377562116 / 378488680
Total CPU difference: 41033.53125 / 46775.453125

There are no differences in images found by testdiff.
(0030313)
git   
2014-07-22 15:57   
Branch CR25057 has been deleted by inv.

SHA-1: a9bf98a2fd6e19f5acb7bc7a6862a96b039230c5