OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000995OMNeT++simulation kernelpublic2017-02-09 16:422017-02-23 15:52
till 
andras 
normalminoralways
resolvedfixed 
x86-64macOS10.12
5.1pre3 
5.1 
0000995: Assert condition fails for ini files with CRLF line terminators in inifilereader
For Files with CRLF line terminators the inifilereader fails since omnetpp 5.1:

<!> Error: ASSERT: Condition 'rawLine.empty() || (*(rawLine.end()-1) != '\r' && *(rawLine.end()-1) != '\n')' does not hold in function internalReadFile, inifilereader.cc line 137
file omnetpp.ini
     omnetpp.ini: ASCII text
unix2dos omnetpp.ini
file omnetpp.ini
     omnetpp.ini: ASCII text, with CRLF line terminators
opp_run ....
     <!> Error: ASSERT: Condition 'rawLine.empty() || (*(rawLine.end()-1) != '\r' && *(rawLine.end()-1) != '\n')' does not hold in function internalReadFile, inifilereader.cc line 137

No tags attached.
Issue History
2017-02-09 16:42tillNew Issue
2017-02-23 15:48andrasNote Added: 0001327
2017-02-23 15:48andrasStatusnew => resolved
2017-02-23 15:48andrasFixed in Version => 5.1
2017-02-23 15:48andrasResolutionopen => fixed
2017-02-23 15:48andrasAssigned To => andras

Notes
(0001327)
andras   
2017-02-23 15:48   
Yeah, this bug was introduced when the code was converted from FILE* I/O to C++ iostreams late last year, for 5.1pre2. Old code right-trimmed the line, which was lost during the conversion.

Thanks Till for reporting!