View Issue Details

IDProjectCategoryView StatusLast Update
0031189Open CASCADEOCCT:DRAWpublic2020-12-02 17:12
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
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 Files

  • draw_old.png (10,181 bytes)
  • draw_new.png (10,331 bytes)

Relationships

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

Activities

git

2019-11-24 15:04

administrator   ~0089189

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.

git

2020-04-15 15:38

administrator   ~0091554

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.

git

2020-04-15 18:16

administrator   ~0091561

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.

git

2020-04-15 18:57

administrator   ~0091562

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: 8c0a8876997f2a3ae45e1fc556ceb32e1f2d4c3f

git

2020-04-15 20:05

administrator   ~0091565

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: bd6a0eb1209fcb85e7c37bf40a67fabb87e65353

git

2020-04-15 20:09

administrator   ~0091566

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: 6654f42adda2f8914a3f9690cfa8cca53afd7ca0

git

2020-04-15 20:46

administrator   ~0091570

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: fc63030cc707fb301d787eecff45bcd181872bbc

git

2020-04-15 20:55

administrator   ~0091571

Branch CR31189_2 has been updated forcibly by kgv.

SHA-1: 99e8de453210c8da32eb566f50085a6866eb22fd

kgv

2020-04-15 21:25

developer  

draw_old.png (10,181 bytes)

kgv

2020-04-15 21:25

developer  

draw_new.png (10,331 bytes)

kgv

2020-04-16 14:31

developer   ~0091593

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/

git

2020-04-29 09:41

administrator   ~0091835

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.

abv

2020-04-29 09:41

manager   ~0091836

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?

kgv

2020-04-29 10:08

developer   ~0091837

> 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

git

2020-04-29 11:21

administrator   ~0091842

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: 1fbb8934b8d48e0fd7e0fd13316f26f286f8bbde

abv

2020-04-29 11:21

manager   ~0091843

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

kgv

2020-04-29 11:29

developer   ~0091845

> 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.

kgv

2020-04-29 13:20

developer   ~0091858

>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

git

2020-04-29 13:23

administrator   ~0091859

Branch CR31189_3 has been updated forcibly by kgv.

SHA-1: 01818f15084b967a3c7339d66406abd77f741c5a

kgv

2020-04-29 13:31

developer   ~0091860

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>&)’

git

2020-04-29 22:12

administrator   ~0091879

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: ba7126d64c87208365cce22e16122ed203cfdfe6

git

2020-04-30 07:55

administrator   ~0091887

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: 0f7af398afb3f05d6d5553587038851be76d29a6

git

2020-04-30 11:02

administrator   ~0091888

Branch CR31189_3 has been updated forcibly by abv.

SHA-1: 0194f6b198a14ffc002e49ba6a66b9ab5c1681ab

abv

2020-04-30 14:09

manager   ~0091898

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).

kgv

2020-04-30 14:34

developer   ~0091900

Please raise the patch in OCCT and OCC Products branches CR31189_3.

bugmaster

2020-05-07 10:50

administrator   ~0091979

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

git

2020-05-10 14:16

administrator   ~0092047

Branch CR31189_3 has been deleted by inv.

SHA-1: 0194f6b198a14ffc002e49ba6a66b9ab5c1681ab

git

2020-05-10 14:17

administrator   ~0092055

Branch CR31189_2 has been deleted by inv.

SHA-1: 99e8de453210c8da32eb566f50085a6866eb22fd

git

2020-05-10 14:17

administrator   ~0092056

Branch CR31189_1 has been deleted by inv.

SHA-1: 4340d5fb031703d657fe706b976b4c9dfaffe267

git

2020-05-10 14:17

administrator   ~0092057

Branch CR31189 has been deleted by inv.

SHA-1: dd62701926cfe7906e6dec9cc7e9e3abeac9a5f5

Related Changesets

occt: master 23fe70ec

2019-11-24 12:02:39

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
Affected Issues
0031189
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
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
2020-12-02 16:41 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed