View Issue Details

IDProjectCategoryView StatusLast Update
0031862CommunityOCCT:Codingpublic2021-09-05 23:28
ReporterBenjaminBihler Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionunable to reproduce 
PlatformMinGW-w64OSWindows 
Product Version7.5.0 
Target Version7.5.0 
Summary0031862: [REGRESSION] Coding - Flags of output stream are modified
DescriptionSince the revision V7_5_0_beta the output of my program has changed. When printing floats to std::cout, more digits than before are displayed. After digging into the OCCT code, I found out that the flag modifications happen in AppDef_Variational::Dump.

This can be prevented by storing the stream flags and restoring them later.
TagsNo tags attached.
Test case number

Relationships

related to 0030895 closedbugmaster Open CASCADE Coding Rules - specify std namespace explicitly for std::cout and streams 

Activities

git

2020-10-19 12:18

administrator   ~0096052

Branch CR31862 has been created by BenjaminBihler.

SHA-1: be5b376612b439ad7b337b033270febae772005b


Detailed log of new commits:

Author: Benjamin Bihler
Date: Mon Oct 19 11:09:13 2020 +0200

    0031862: [REGRESSION] Coding - Flags of output stream are modified
    
    Added RAII class to restore stream flags after dump.

BenjaminBihler

2020-10-19 12:19

developer   ~0096053

Last edited: 2020-10-19 12:20

Here
https://stackoverflow.com/questions/2273330/restore-the-state-of-stdcout-after-manipulating-it
are several alternative proposals how to solve that issue, if you are not content with my solution.

kgv

2020-10-19 12:22

developer   ~0096054

Last edited: 2020-10-19 12:36

> I found out that the flag modifications happen in AppDef_Variational::Dump.
I don't think that AppDef_Variational::Dump() could be the cause - no changes to the logic itself have been done recently there (0030895 targeting OCCT 7.4.0 doesn't seem should change behavior), and I don't think the method is called at all in your context (could you check this with a breakpoint?).

BenjaminBihler

2020-10-19 12:38

developer   ~0096055

You are probably right. Right now I even cannot reproduce the problem! :-(((

Sorry for a false issue report. I guess you can close the issue! (If I find the error again and I am sure where it comes from, I can reopen the issue.)

BenjaminBihler

2020-10-19 15:08

developer   ~0096058

Okay, I have found my error. It was definitely a misinterpretation. Please close the issue.

git

2021-09-05 23:28

administrator   ~0103840

Branch CR31862 has been deleted by kgv.

SHA-1: be5b376612b439ad7b337b033270febae772005b

Issue History

Date Modified Username Field Change
2020-10-19 11:55 BenjaminBihler New Issue
2020-10-19 11:55 BenjaminBihler Assigned To => BenjaminBihler
2020-10-19 12:18 git Note Added: 0096052
2020-10-19 12:19 BenjaminBihler Note Added: 0096053
2020-10-19 12:19 BenjaminBihler Note Edited: 0096053
2020-10-19 12:20 BenjaminBihler Note Edited: 0096053
2020-10-19 12:20 BenjaminBihler Note Edited: 0096053
2020-10-19 12:22 kgv Note Added: 0096054
2020-10-19 12:22 kgv Relationship added related to 0030895
2020-10-19 12:36 kgv Note Edited: 0096054
2020-10-19 12:38 BenjaminBihler Note Added: 0096055
2020-10-19 12:38 BenjaminBihler Assigned To BenjaminBihler =>
2020-10-19 12:38 BenjaminBihler Assigned To => kgv
2020-10-19 15:08 BenjaminBihler Note Added: 0096058
2020-10-19 15:40 kgv Assigned To kgv => bugmaster
2020-10-19 15:40 kgv Status new => feedback
2020-10-19 15:40 kgv Resolution open => unable to reproduce
2020-10-20 10:04 bugmaster Status feedback => closed
2021-09-05 23:28 git Note Added: 0103840