View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003716 | OpenFOAM | Bug | public | 2021-08-24 16:59 | 2021-08-25 11:56 |
Reporter | tniemi | Assigned To | will | ||
Priority | low | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003716: Segmentation fault instead of proper IO ERROR | ||||
Description | I noticed that in recent dev versions I'm getting segmentation faults from places which normally should produce meaningful error messages. I managed to pinpoint the issue to this commit https://github.com/OpenFOAM/OpenFOAM-dev/commit/4398f57c5e88f21b78d5d7edf66f733a8d13ad8f | ||||
Steps To Reproduce | For example, if I take tutorials/combustion/reactingFoam/Lagrangian/verticalChannel and change "operation average;" to "operation averaged;", in OF9 I get --> FOAM FATAL IO ERROR: averaged is not in enumeration: 16 ( CoV areaAverage areaIntegrate areaNormalAverage areaNormalIntegrate average max maxMag min minMag none orientedSum sum sumDirection sumDirectionBalance sumMag ) However, currently in dev I only get --> FOAM FATAL IO ERROR: #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 ? in "/lib/x86_64-linux-gnu/libc.so.6" Segmentation fault (core dumped) or --> FOAM FATAL IO ERROR: #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::error::message() const at ??:? #4 Foam::operator<<(Foam::Ostream&, Foam::IOerror const&) at ??:? #5 ? at functionObjectList.C:? #6 Foam::functionObjectList::timeToNextWrite() at ??:? #7 Foam::Time::adjustDeltaT() at ??:? #8 ? in "/opt/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/reactingFoam" #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #10 ? in "/opt/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/reactingFoam" Segmentation fault (core dumped) | ||||
Tags | No tags attached. | ||||
|
"operation average;" refers to surfaceFieldValue in controlDict |
|
Restoring the removed "error(const error&)" copy constructor seems to help with the issue. |
|
Yes, the pointer handling of the error class' string-stream got messed up. I don't see any reason for the string-stream being a pointer, so I've now made it an actual object. Even simpler. No copy constructors, no destructors. https://github.com/OpenFOAM/OpenFOAM-dev/commit/32cfad7002c2b677114adadff76fdcf295533f80 |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-08-24 16:59 | tniemi | New Issue | |
2021-08-24 17:24 | tniemi | Note Added: 0012161 | |
2021-08-25 06:19 | tniemi | Note Added: 0012162 | |
2021-08-25 11:56 | will | Assigned To | => will |
2021-08-25 11:56 | will | Status | new => resolved |
2021-08-25 11:56 | will | Resolution | open => fixed |
2021-08-25 11:56 | will | Fixed in Version | => dev |
2021-08-25 11:56 | will | Note Added: 0012164 |