问题
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