Simulation terminated with exit code: -1073741819 (After running for small time)

瀏覽次數:24 次
跳到第一則未讀訊息

Kishor Bhawar

未讀,
2016年5月5日 凌晨2:02:432016/5/5
收件者:OMNeT++ Users
When i run a simulation of 64 nodes each of them of same type and  containing "oqwithT.cc" (attached) file, Simulation terminated with exit code: -1073741819.

But when i run another simulation of single node containing same files, it run for comparatively long time and ends with same error.

This is happening after i add linked list part in the file "oqwithT.cc" (functions updateOnInsert and updateOnPop).
Please tell me why this is happening? Is it related to pointer or malloc? What should i do to avoid these errors?  
oqwithT.cc

Alfonso Ariza Quintana

未讀,
2016年5月5日 凌晨3:55:042016/5/5
收件者:omn...@googlegroups.com

 

You have several errors

 

 

send(servemsg, "out");

 

It sends a packet that you haven’t created.

 

send(servemsg, "out");

 

 

struct entry *new1 = (entry *)malloc(sizeof(entry *));

 

with this you reserve the memory to a pointer not to a struct

 

struct entry *new1 = (entry *)malloc(sizeof(entry ));

 

or

 

entry *new1 = new entry;

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Kishor Bhawar

未讀,
2016年5月5日 凌晨4:55:552016/5/5
收件者:OMNeT++ Users、aari...@hotmail.com
Thank you very much Alfonso, i got it. Now simulation running as per expectation. Mistake was in allocation of memory to structure. And 'servemsg' is not generated by this module but received from another module, this module handles that msg.
回覆所有人
回覆作者
轉寄
0 則新訊息