omnet++ crashes while creatng objects

亡梦爱人 提交于 2019-12-12 01:36:58

问题


I have this piece of code.

tempIPARPReply = new IPv4ARP("IPv4ARPReply");                       
tempIPARPReply->setSourceIP(tempIPARP->getDestinationIP());
tempIPARPReply->setDestinationIP(tempIPARP->getSourceIP());

I have this in my header file.

IPv4ARP *tempIPARP;

Here IPv4ARP is my own created message in omnet.

It works perfectly fine.

But after I have project referenced the inet and Core4Inet projects to this working project on runtime the omnet++ simulation kernel simply crashes and ends with a simulation error. (And I have figured it out that simulation crash occurs only because of this object creation line as shown in the above code).

Please tell me what is going wrong here and how the referenced projects are impacting these 3 lines of code.

Updated:

msg File:

packet IPv4ARP {
    string SourceIP;
    string DestinationIP;
}

来源:https://stackoverflow.com/questions/35925076/omnet-crashes-while-creatng-objects

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!