View Issue Details

IDProjectCategoryView StatusLast Update
0003078OpenFOAMBugpublic2018-09-29 14:57
ReporterShorty Assigned Tohenry  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version18.04
Product Versiondev 
Fixed in Versiondev 
Summary0003078: Bug in Time class
DescriptionHi all,

I found a bug - which is in my case a critical one. My openComfort library has something like that:

    // Copy AoA of 0 folder to corresponding one
    const word newPath = mesh_.time().path() + mesh_.time().timeName();
                                                                                
    cp
    (
        mesh_.time().path() + "/0/AoA",
        mesh_.time().path() + "/" + mesh_.time().timeName() + "/AoA"
    );

I just copy the file AoA which is in the time folder 0 to new time folders. That works perfectly as far as we do not have a time folder named 0.orig or 0.[a-z]. A simple analysis of runTime.times() tells us that we get an additional time entry if there is a folder named 0.[a-z]. However, to demonstrate the problem, we can just use the postProcess utility.

I would expect that the time folder 0.[a-z] is not accounted for reading. Additionally, the folder is renamed to be 0 instead of 0.orig. Please see below.
Steps To ReproduceAdding

Info<< runTime.times() << endl;
std::terminate();

into the postProcess.C file after #include "createTime.H"

Now if we run, e.g., the pitzDaily case and do some postProcess stuff:

postProcess -func average

we get:

4
(
0 constant
0 0
100 100
200 200
)


If we add the folder 0.orig, we increase the time folders by one (adding the time folder 0 again):

5
(
0 constant
0 0
0 0
100 100
200 200
)

I can investigate into that problem if it is a problem.
TagsNo tags attached.

Activities

henry

2018-09-28 16:35

manager   ~0010077

This should be resolved by commit 0c866b5e10bdaa2cbbe8243c748d438c29b73f42
Could you test and report back?

Shorty

2018-09-28 21:04

reporter   ~0010078

Tested & works perfectly. Thank you, Henry.
I guess I would not resolve it as fast as you did it :)

Issue History

Date Modified Username Field Change
2018-09-27 20:44 Shorty New Issue
2018-09-28 16:35 henry Note Added: 0010077
2018-09-28 21:04 Shorty Note Added: 0010078
2018-09-29 14:57 henry Assigned To => henry
2018-09-29 14:57 henry Status new => resolved
2018-09-29 14:57 henry Resolution open => fixed
2018-09-29 14:57 henry Fixed in Version => dev