MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031189Open CASCADE[OCCT] OCCT:DRAWpublic2019-11-24 15:012020-05-10 14:19
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()
DescriptionCurrently ViewerTest package sends error messages to std::cout or std::cerr.
It is proposed sending them to Message::DefaultMessenger(), which apart from unification will make them colorized.
Steps To Reproducepload MODELING VISUALIZATION
box b 10 10 10
vdisplay a
vdisplay b
vclear
TagsNo tags attached.
Test case numberbugs/fclasses/bug31189
Attached Filespng file icon draw_old.png (10,181 bytes) 2020-04-15 21:25
png file icon draw_new.png (10,331 bytes) 2020-04-15 21:25

- Relationships
related to 0031188verifiedbugmaster Draw Harness - enable colorized messages output to console by default 
related to 0031501verifiedbugmaster Foundation Classes, Message_Printer - remove theToPutEndl argument 

-  Notes
(0089189)
git (administrator)
2019-11-24 15:04

Branch CR31189 has been created by kgv.

SHA-1: dd62701926cfe7906e6dec9cc7e9e3abeac9a5f5


Detailed log of new commits:

Author: kgv
Date: Sun Nov 24 15:02:39 2019 +0300

    0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()
    
    Message::Send() - added short-cuts for sending message to default messenger.
    ViewerTest has been updated to send messages to Message::DefaultMessenger()
    instead of direct output to std::cout/std::cerr.
(0091554)
git (administrator)
2020-04-15 15:38

Branch CR31189_1 has been created by kgv.

SHA-1: 4340d5fb031703d657fe706b976b4c9dfaffe267


Detailed log of new commits:

Author: kgv
Date: Sun Nov 24 15:02:39 2019 +0300

    0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()
    
    Message::Send() - added short-cuts for sending message to default messenger.
    ViewerTest has been updated to send messages to Message::DefaultMessenger()
    instead of direct output to std::cout/std::cerr.
(0091561)
git (administrator)
2020-04-15 18:16

Branch CR31189_2 has been created by kgv.

SHA-1: 8d55b92963ccffc598a7bdf89ce2f4c665399eb5


Detailed log of new commits:

Author: kgv
Date: Sun Nov 24 15:02:39 2019 +0300

    0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()
    
    Message::Send() - added short-cuts for sending message to default messenger.
    ViewerTest has been updated to send messages to Message::DefaultMessenger()
    instead of direct output to std::cout/std::cerr.
(0091562)
git (administrator)
2020-04-15 18:57

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: 8c0a8876997f2a3ae45e1fc556ceb32e1f2d4c3f
(0091565)
git (administrator)
2020-04-15 20:05

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: bd6a0eb1209fcb85e7c37bf40a67fabb87e65353
(0091566)
git (administrator)
2020-04-15 20:09

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: 6654f42adda2f8914a3f9690cfa8cca53afd7ca0
(0091570)
git (administrator)
2020-04-15 20:46

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: fc63030cc707fb301d787eecff45bcd181872bbc
(0091571)
git (administrator)
2020-04-15 20:55

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: 99e8de453210c8da32eb566f50085a6866eb22fd
(0091593)
kgv (developer)
2020-04-16 14:31

Patch is ready for review in branches CR31189_2 of OCCT and OCC Products.

http://jenkins-test-12.nnov.opencascade.com/view/CR31189_2-master-KGV/ [^]
(0091835)
git (administrator)
2020-04-29 09:41

Branch CR31189_3 has been created by abv.

SHA-1: cac74814a86f31f718e788b1cecfe6bc19d1e39b


Detailed log of new commits:

Author: kgv
Date: Sun Nov 24 15:02:39 2019 +0300

    0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()
    
    Added short-cuts methods in Message_Messenger for sending message with specified gravity,
    and stream buffer class for using stream-like interface for that.
    Similar short-cuts to DefaultMessenger() are added in Message package.
    
    ViewerTest has been updated to send messages to Message::DefaultMessenger()
    instead of direct output to std::cout/std::cerr.
(0091836)
abv (manager)
2020-04-29 09:41

I believe the same API can be also useful for Message_Messenger class itself, not only for its global default instance. I have put modified implementation to CR32289_3, please have a look.

I deem we do not need to expose this interface in C# wrapper, do you agree? I have not modified products branch yet, and did not run tests.

Besides, can you explain why some uses of std::cout remained in ViewerTest package? Should not they be replaced as well?
(0091837)
kgv (developer)
2020-04-29 10:08

> I deem we do not need to expose this interface in C# wrapper, do you agree?
The purpose of the patch in Products branch is silencing SWIG warnings - I have not found a simpler way to shut up SWIG.

> can you explain why some uses of std::cout remained in ViewerTest package?
As the first iteration, the patch is focused on replacing Error / Fail output messages. Few remaining cases are not failures, but user input requests or some information output with an uncertainly how to classify them (trace / info / Tcl / something else), so that they have been left for future iterations.

+    StreamBuffer (const StreamBuffer&& theOther) 

Your patch relies on Move constructor.
Shouldn't StreamBuffer copy constructor be disabled?
How patch can be applied for ancient C++ compilers, which we still have to support?

+  //! message via stream interface, and and putting result into its creator

and and
(0091842)
git (administrator)
2020-04-29 11:21

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: 1fbb8934b8d48e0fd7e0fd13316f26f286f8bbde
(0091843)
abv (manager)
2020-04-29 11:21

SWIG warnings can be avoided by adding %ignore for methods that return non-wrapped class. Can you do that? (I do not have SWIG configured)

As far as I understand, move semantic is supported by all compilers we support except VS 2008, which does not seem to be really important, so can be dropped I suppose (it is 13 years old!). VS 2010 builds fine.

"and and" is corrected in updated version of the branch
(0091845)
kgv (developer)
2020-04-29 11:29

> SWIG warnings can be avoided by adding %ignore for methods that return non-wrapped class.
You may try - I spent half a day with no luck.
(0091858)
kgv (developer)
2020-04-29 13:20

>CMake Error at adm/cmake/occt_toolkit.cmake:209 (add_library):
> Cannot find source file:
> /dn62/builds/CR31189_3-master-KGV/OCCT_SRC/src/Message/Message_StreamBuffer.hxx
(0091859)
git (administrator)
2020-04-29 13:23

Branch CR31189_3 has been updated forcibly by kgv.

SHA-1: 01818f15084b967a3c7339d66406abd77f741c5a
(0091860)
kgv (developer)
2020-04-29 13:31

http://vm-jenkins-test-12.nnov.opencascade.com:8080/job/CR31189_3-master-KGV-OCCT-Debian80-64-opt-compile/2/parsed_console/ [^]
/src/Message/Message_Messenger.hxx: In constructor ‘Message_Messenger::StreamBuffer::StreamBuffer(const 
Message_Messenger::StreamBuffer&&)’:
/src/Message/Message_Messenger.hxx:81:70: error: use of deleted function ‘std::basic_stringstream<char>::basic_stringstream(const 
std::basic_stringstream<char>&)’
(0091879)
git (administrator)
2020-04-29 22:12

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: ba7126d64c87208365cce22e16122ed203cfdfe6
(0091887)
git (administrator)
2020-04-30 07:55

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: 0f7af398afb3f05d6d5553587038851be76d29a6
(0091888)
git (administrator)
2020-04-30 11:02

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: 0194f6b198a14ffc002e49ba6a66b9ab5c1681ab
(0091898)
abv (manager)
2020-04-30 14:09

I have refactored implementation to avoid compiler warnings, please review. Jenkins job CR31189_3-master-KGV has mostly completed. Note that passing std::endl to StreamBuffer will send a message and reset to empty state, this shall allow using it in a more transparent and natural way (mostly like ostream).
(0091900)
kgv (developer)
2020-04-30 14:34

Please raise the patch in OCCT and OCC Products branches CR31189_3.
(0091979)
bugmaster (administrator)
2020-05-07 10:50

Combination -
OCCT branch : WEEK-18
master SHA - b40cdc2b5584fdf78f90594a3c7469213c7dc4a6
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-18 SHA - f3160246a8ae8356b116065842ce354791652bb4
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: 17165.480000000167 / 17147.810000000212 [+0.10%]
Products
Total CPU difference: 11271.100000000095 / 11280.480000000087 [-0.08%]
Windows-64-VC14:
OCCT
Total CPU difference: 18654.578125 / 18665.890625 [-0.06%]
Products
Total CPU difference: 13128.59375 / 13209.109375 [-0.61%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0092047)
git (administrator)
2020-05-10 14:16

Branch CR31189_3 has been deleted by inv.

SHA-1: 0194f6b198a14ffc002e49ba6a66b9ab5c1681ab
(0092055)
git (administrator)
2020-05-10 14:17

Branch CR31189_2 has been deleted by inv.

SHA-1: 99e8de453210c8da32eb566f50085a6866eb22fd
(0092056)
git (administrator)
2020-05-10 14:17

Branch CR31189_1 has been deleted by inv.

SHA-1: 4340d5fb031703d657fe706b976b4c9dfaffe267
(0092057)
git (administrator)
2020-05-10 14:17

Branch CR31189 has been deleted by inv.

SHA-1: dd62701926cfe7906e6dec9cc7e9e3abeac9a5f5

- Related Changesets
occt: master 23fe70ec
Timestamp: 2019-11-24 12:02:39
Author: kgv
Committer: bugmaster
Details ] Diff ]
0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()

Added short-cuts methods in Message_Messenger for sending message with specified gravity,
and stream buffer class for using stream-like interface for that.
Similar short-cuts to DefaultMessenger() are added in Message package.

ViewerTest has been updated to send messages to Message::DefaultMessenger()
instead of direct output to std::cout/std::cerr.

Off-topic: spelling error (duplicate "and") is corrected in two places

Added test bugs fclasses bug31189
mod - src/gce/gce_MakeCone.hxx Diff ] File ]
mod - src/Message/Message.hxx Diff ] File ]
mod - src/Message/Message_Messenger.hxx Diff ] File ]
mod - src/OSD/OSD_Parallel.cxx Diff ] File ]
mod - src/QABugs/QABugs_11.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_CmdParser.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_OpenGlCommands.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_RelationCommands.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff ] File ]
add - tests/bugs/fclasses/bug31189 Diff ] File ]
mod - tests/bugs/vis/bug26035_2 Diff ] File ]

- Issue History
Date Modified Username Field Change
2019-11-24 15:01 kgv New Issue
2019-11-24 15:01 kgv Assigned To => kgv
2019-11-24 15:04 git Note Added: 0089189
2019-11-24 15:04 kgv Relationship added related to 0031188
2020-04-15 15:38 git Note Added: 0091554
2020-04-15 18:16 git Note Added: 0091561
2020-04-15 18:57 git Note Added: 0091562
2020-04-15 20:05 git Note Added: 0091565
2020-04-15 20:09 git Note Added: 0091566
2020-04-15 20:46 git Note Added: 0091570
2020-04-15 20:55 git Note Added: 0091571
2020-04-15 21:25 kgv File Added: draw_old.png
2020-04-15 21:25 kgv File Added: draw_new.png
2020-04-16 00:05 kgv Relationship added related to 0031501
2020-04-16 14:31 kgv Note Added: 0091593
2020-04-16 14:31 kgv Assigned To kgv => abv
2020-04-16 14:31 kgv Status new => resolved
2020-04-29 09:41 git Note Added: 0091835
2020-04-29 09:41 abv Note Added: 0091836
2020-04-29 09:41 abv Assigned To abv => kgv
2020-04-29 09:41 abv Status resolved => assigned
2020-04-29 09:41 abv Status assigned => feedback
2020-04-29 10:08 kgv Note Added: 0091837
2020-04-29 10:09 kgv Assigned To kgv => abv
2020-04-29 11:21 git Note Added: 0091842
2020-04-29 11:21 abv Note Added: 0091843
2020-04-29 11:22 abv Assigned To abv => kgv
2020-04-29 11:22 abv Status feedback => resolved
2020-04-29 11:29 kgv Note Added: 0091845
2020-04-29 13:20 kgv Note Added: 0091858
2020-04-29 13:23 git Note Added: 0091859
2020-04-29 13:31 kgv Note Added: 0091860
2020-04-29 13:31 kgv Assigned To kgv => abv
2020-04-29 13:31 kgv Status resolved => assigned
2020-04-29 22:12 git Note Added: 0091879
2020-04-30 07:50 abv Steps to Reproduce Updated View Revisions
2020-04-30 07:55 git Note Added: 0091887
2020-04-30 11:02 git Note Added: 0091888
2020-04-30 14:09 abv Note Added: 0091898
2020-04-30 14:09 abv Assigned To abv => kgv
2020-04-30 14:09 abv Status assigned => resolved
2020-04-30 14:34 kgv Note Added: 0091900
2020-04-30 14:34 kgv Assigned To kgv => bugmaster
2020-04-30 14:34 kgv Status resolved => reviewed
2020-05-07 10:50 bugmaster Note Added: 0091979
2020-05-07 10:50 bugmaster Status reviewed => tested
2020-05-07 10:55 bugmaster Test case number => bugs/fclasses/bug31189
2020-05-10 14:01 bugmaster Changeset attached => occt master 23fe70ec
2020-05-10 14:01 bugmaster Status tested => verified
2020-05-10 14:01 bugmaster Resolution open => fixed
2020-05-10 14:16 git Note Added: 0092047
2020-05-10 14:17 git Note Added: 0092055
2020-05-10 14:17 git Note Added: 0092056
2020-05-10 14:17 git Note Added: 0092057


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker