OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000802OMNeT++command line toolspublic2014-12-19 21:322017-02-13 12:37
Reporterpaolinux 
Assigned Torhornig 
PriorityurgentSeveritymajorReproducibilityalways
StatusresolvedResolutionunable to reproduce 
Platformx86OSWindowsOS Version8.1
Product Version4.6 
Target VersionFixed in Version5.0 
Summary0000802: Compilation error for files generated by message compiler (MSGC) when field is re-assigned
DescriptionI was unable to compile the INET suite on Windows as I was getting the following error

MSGC: transport/rtp/RTPInterfacePacket.msg
MSGC: transport/rtp/RTPSenderControlMessage.msg
MSGC: transport/rtp/RTPSenderStatusMessage.msg

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
omnetpp-4.6/tools/win32/mingw32/include/c++/4.9.2/bits/basic_string.h:857: std::basic_string<_CharT, _Traits, _Alloc>::reference std::basic_string<_CharT, _Traits, _Alloc>::operator[](std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]: Assertion '__pos <= size()' failed.
Makefile:944: recipe for target 'transport/rtp/RTPInterfacePacket_m.h' failed
make[1]: *** [transport/rtp/RTPInterfacePacket_m.h] Error 3

Looking more into this, I managed to reproduce with a very simple file (attached). Basically, the issue seems to occur when in a packet definition a field of the parent class (e.g., kind) is redefined like in

packet Foobar {
    kind = 15;
    int someField;
}

omnetpp-4.6/tools/win32/mingw32/include/c++/4.9.2/bits/basic_string.h:857: std::basic_string<_CharT, _Traits, _Alloc>::reference std::basic_string<_CharT, _Traits, _Alloc>::operator[](std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]: Assertion '__pos <= size()' failed.
Please contact the application's support team for more information.
Makefile:99: recipe for target 'Foobar_m.cc' failed
make[1]: *** [Foobar_m.cc] Error 3
If I remove "kind = 15", everything works fine. Otherwise I got the following error (similar to the INET case)

This code works fine in omnet++ 4.5 and prior version.

Can you please look into this?

Thanks a lot,

P.

TagsNo tags attached.
Attached Filesmsg file icon Foobar.msg [^] (782 bytes) 2014-12-19 21:32

- Relationships

-  Notes
(0000967)
paolinux (reporter)
2014-12-20 19:46
edited on: 2014-12-23 21:53

Hi,

I've been looking more into this and I realized that the problem only occurs if I add -D_GLIBCXX_DEBUG to CFLAGS_DEBUG when compiling omnet. I have -D_GLIBCXX_DEBUG enabled in my project but this does not create any issue.

Given this, I feel the bug is less serious than I had though but still I think it would be worth investigating the root cause.

Thanks
P.

(0001318)
rhornig (administrator)
2017-02-13 12:37

As the compiler toolchain was updated fot OMNeT++ 5 this is no longer relevant.

- Issue History
Date Modified Username Field Change
2014-12-19 21:32 paolinux New Issue
2014-12-19 21:32 paolinux File Added: Foobar.msg
2014-12-20 19:46 paolinux Note Added: 0000967
2014-12-23 21:53 paolinux Note Edited: 0000967 View Revisions
2015-10-12 09:28 ammmar1988 Issue cloned: 0000866
2017-02-13 12:37 rhornig Note Added: 0001318
2017-02-13 12:37 rhornig Status new => resolved
2017-02-13 12:37 rhornig Fixed in Version => 5.0
2017-02-13 12:37 rhornig Resolution open => unable to reproduce
2017-02-13 12:37 rhornig Assigned To => rhornig


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker