View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001009 | OpenFOAM | Bug | public | 2013-09-12 18:43 | 2013-09-18 13:22 |
Reporter | wyldckat | Assigned To | |||
Priority | low | Severity | tweak | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Summary | 0001009: isAbsolute() should be used in IOobject::fileNameComponents() | ||||
Description | One detail concerning the modifications related to Issue #62 ( http://www.openfoam.org/mantisbt/view.php?id=62 ) did not propagate to OpenFOAM 2.2.x. More specifically, as shown in the attached patch file, in the file "src/OpenFOAM/db/IOobject/IOobject.C", using "first == 0" in "IOobject::fileNameComponents()" is not generic. The generic implementation should use "path.isAbsolute()" instead, in order to properly detect if it truly is the absolute path. | ||||
Additional Information | Curious detail which I found while diagnosing this: if the debug flag "objectRegistry" in the global "controlDict" is set to 1, it will crash any OpenFOAM solver/utility, right after the message that starts with: Destroying regIOobject called controlDict For example, with icoFoam and blockMesh, this only occurs after the end of the run. But with snappyHexMesh, it happens a lot sooner. It's a bit annoying to not know this beforehand, since I was using GDB and trying to figure out why on Earth it was still crashing after the reported fix... :) | ||||
Tags | No tags attached. | ||||
|
using_isAbsolute.patch (469 bytes)
--- a/src/OpenFOAM/db/IOobject/IOobject.C +++ b/src/OpenFOAM/db/IOobject/IOobject.C @@ -94,9 +94,9 @@ bool Foam::IOobject::IOobject::fileNameComponents // check afterwards name.string::operator=(path); } - else if (first == 0) + else if (path.isAbsolute()) { - // Leading '/'. Absolute fileName + // called with absolute path string::size_type last = path.rfind('/'); instance = path.substr(0, last); |
|
Thanks for the report - fixed by commit cbdfba |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-12 18:43 | wyldckat | New Issue | |
2013-09-12 18:43 | wyldckat | File Added: using_isAbsolute.patch | |
2013-09-18 13:22 |
|
Note Added: 0002496 | |
2013-09-18 13:22 |
|
Status | new => resolved |
2013-09-18 13:22 |
|
Fixed in Version | => 2.2.x |
2013-09-18 13:22 |
|
Resolution | open => fixed |
2013-09-18 13:22 |
|
Assigned To | => user2 |