I am doing networks simulations under omnet++ & veins(v2.0-rc1), for this purpose I experiment 4 scenarios with 20 repetitions for both one.
I am getting some errors (i guess that is a memory allocation error) during the simulations of the 3rd & 4th scenarios wich share a common functionnality (ack).
For the concerned simulations, it starts normally and executes a few repetition but failed after that (for example, it fails at the 5th repetition of the 4th scenario), here is the output :
0: *** glibc detected *** ./veins: free(): invalid next size (fast): 0x00007fff74bff590 *** 0: ======= Backtrace: ========= 0: /lib/x86_64-linux-gnu/libc.so.6(+0x76aa6)[0x2aeb29d1faa6] 0: /lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x2aeb29d2484c] 0: /nfs/homes/hc.arslan90/mixim/mixim/examples/veins/../../out/gcc-release/src/modules/libmiximmodules.so(_ZN9ProphetV220executeInitiatorRoleEsP7Prophetl+0x6f4)[0x2aeb287ce334] 0: /nfs/homes/hc.arslan90/mixim/mixim/examples/veins/../../out/gcc-release/src/modules/libmiximmodules.so(_ZN9ProphetV214handleLowerMsgEP8cMessage+0x4b6)[0x2aeb287d0996] 0: /home/dist/hc.arslan90/omnetpp-4.2/lib/liboppsim.so(_ZN11cSimulation10doOneEventEP13cSimpleModule+0xb0)[0x2aeb290135a0] 0: /home/dist/hc.arslan90/omnetpp-4.2/lib/liboppcmdenv.so(_ZN6Cmdenv8simulateEv+0x170)[0x2aeb28a6f620] 0: /home/dist/hc.arslan90/omnetpp-4.2/lib/liboppcmdenv.so(_ZN6Cmdenv3runEv+0x360)[0x2aeb28a6fba0] 0: /home/dist/hc.arslan90/omnetpp-4.2/lib/liboppenvir.so(_ZN9EnvirBase3runEiPPcP14cConfiguration+0x13c)[0x2aeb28ca763c] 0: /home/dist/hc.arslan90/omnetpp-4.2/lib/liboppenvir.so(_Z18setupUserInterfaceiPPc+0x55f)[0x2aeb28ca507f] 0: /home/dist/hc.arslan90/omnetpp-4.2/lib/liboppenvir.so(evMain+0x50)[0x2aeb28ca5d30] 0: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x2aeb29cc7eed] 0: ./veins[0x402f21]
in order to debug the error, i used valgrind with this command :
valgrind --tool=memecheck ./veins (with veins is the current binary of my simulation)
but it seems that all the returned error are not related to my code (because i do the same with a previous code that works fine and i get the same output)
Edit here is the output of Valgrind
==7454== Memcheck, a memory error detector
==7454== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==7454== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==7454== Command: ./veins
==7454== OMNeT++ Discrete Event Simulation (C) 1992-2011 Andras Varga, OpenSim Ltd. Version: 4.2, build: 111116-7631e2d, edition: Academic Public License -- NOT FOR COMMERCIAL USE See the license for distribution terms and warranty disclaimer Setting up Tkenv... Loading NED files from /media/DATA/DoctoratTlemcen/Git/mixim/mixim/src/base: 17 Loading NED files from /media/DATA/DoctoratTlemcen/Git/mixim/mixim/src/modules: 85 Loading NED files from /media/DATA/DoctoratTlemcen/Git/mixim/mixim/examples: 45
==7454== Invalid read of size 4
==7454== at 0x4CFD4A2: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFFB09: FcConfigFilename (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09188: FcInitLoadConfigAndFonts (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D0940C: FcInit (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFDCE4: FcConfigGetCurrent (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFF87F: FcConfigSubstituteWithPat (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFF8C6: FcConfigSubstitute (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x492DBD1: ??? (in /usr/lib/libtk8.5.so.0)
==7454== by 0x492E0E1: ??? (in /usr/lib/libtk8.5.so.0)
==7454== by 0x4877A40: Tk_AllocFontFromObj (in /usr/lib/libtk8.5.so.0)
==7454== Address 0x500cbbc is 20 bytes inside a block of size 22 alloc'd
==7454== at 0x402D5A9: malloc (vg_replace_malloc.c:296)
==7454== by 0x4CFD407: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFFB09: FcConfigFilename (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09188: FcInitLoadConfigAndFonts (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D0940C: FcInit (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFDCE4: FcConfigGetCurrent (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFF87F: FcConfigSubstituteWithPat (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFF8C6: FcConfigSubstitute (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x492DBD1: ??? (in /usr/lib/libtk8.5.so.0)
==7454== by 0x492E0E1: ??? (in /usr/lib/libtk8.5.so.0)
==7454==
==7454== Invalid read of size 4
==7454== at 0x4CFD4B6: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFFB09: FcConfigFilename (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09188: FcInitLoadConfigAndFonts (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== Address 0x5031690 is 16 bytes inside a block of size 18 alloc'd
==7454== at 0x402D5A9: malloc (vg_replace_malloc.c:296)
==7454== by 0x4CFD407: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFFB09: FcConfigFilename (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454==
==7454== Invalid read of size 4
==7454== at 0x4CFD4B6: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09188: FcInitLoadConfigAndFonts (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== Address 0x5007a40 is 40 bytes inside a block of size 42 alloc'd
==7454== at 0x402D5A9: malloc (vg_replace_malloc.c:296)
==7454== by 0x4CFD407: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454==
==7454== Invalid read of size 4
==7454== at 0x4CFD4A2: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09188: FcInitLoadConfigAndFonts (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== Address 0x4ff0314 is 36 bytes inside a block of size 39 alloc'd
==7454== at 0x402D5A9: malloc (vg_replace_malloc.c:296)
==7454== by 0x4CFD407: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D09065: FcInitLoadConfig (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454==
==7454== Invalid read of size 4
==7454== at 0x4CFD4B6: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== Address 0x4fbe790 is 24 bytes inside a block of size 26 alloc'd
==7454== at 0x402D5A9: malloc (vg_replace_malloc.c:296)
==7454== by 0x4CFD407: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454==
==7454== Invalid read of size 4
==7454== at 0x4CFD4A2: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFFB09: FcConfigFilename (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== Address 0x4fc7164 is 20 bytes inside a block of size 22 alloc'd
==7454== at 0x402D5A9: malloc (vg_replace_malloc.c:296)
==7454== by 0x4CFD407: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4CFFB09: FcConfigFilename (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D141EB: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D14A63: ??? (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4F58D5A: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F59A81: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F568F0: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F58331: ??? (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4F5B74A: XML_ParseBuffer (in /lib/i386-linux-gnu/libexpat.so.1.5.2)
==7454== by 0x4D14384: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454== by 0x4D146A8: FcConfigParseAndLoad (in /usr/lib/i386-linux-gnu/libfontconfig.so.1.4.4)
==7454==
Loading images from /media/DATA/DoctoratTlemcen/Git/mixim/mixim/examples/veins/bitmaps: *: 0 Loading images from ./bitmaps: *: 0 Loading images from ./images: *: 0 Loading images from /home/arslan/Bureau/Doctorat/SIM_Tools_Arslan/omnetpp-4.2/images: *: 0 abstract/*: 90 background/*: 4 block/*: 320 device/*: 195 maps/*: 9 misc/*: 70 msg/*: 55 old/*: 111 status/*: 28
Plugin path: ./plugins
RUNTIME ERROR. A cRuntimeError exception is about to be thrown, and you requested (by setting debug-on-errors=true in the ini file) that errors abort execution and break into the debugger.
You should now probably be running the simulation under gdb or another debugger. The simulation kernel will now raise a SIGABRT signal which will get you into the debugger. If you are not running under a debugger, you can still use the core dump for post-mortem debugging. Once in the debugger, view the call stack (in gdb: "bt" command) to see the context of the runtime error.
<!> Error in module (cCompoundModule) scenario (id=1) during network setup: Class "ObstacleControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().
TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?
==7454==
==7454== HEAP SUMMARY:
==7454== in use at exit: 29,804,879 bytes in 31,424 blocks
==7454== total heap usage: 475,694 allocs, 444,270 frees, 682,975,656 bytes allocated
==7454==
==7454== LEAK SUMMARY:
==7454== definitely lost: 3,828 bytes in 85 blocks
==7454== indirectly lost: 15,079 bytes in 473 blocks
==7454== possibly lost: 28,326,958 bytes in 19,505 blocks
==7454== still reachable: 1,459,014 bytes in 11,361 blocks
==7454== suppressed: 0 bytes in 0 blocks
==7454== Rerun with --leak-check=full to see details of leaked memory
==7454==
==7454== For counts of detected and suppressed errors, rerun with: -v
==7454== ERROR SUMMARY: 22 errors from 6 contexts (suppressed: 0 from 0) Processus arrêté
I also tried to activate dump files and analyze it with gdb, i get this output :
Reading symbols from /nfs/homes/hc.arslan90/mixim/mixim/examples/veins/veins...(no debugging symbols found)...done.
warning: exec file is newer than core file. [New LWP 879]
warning: Can't read pathname for load map: Erreur d'entrée/sortie.
warning: .dynamic section for "/nfs/homes/hc.arslan90/mixim/mixim/examples/veins/../../out/gcc-release/src/modules/libmiximmodules.so" is not at the expected address (wrong library or version mismatch?) [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./veins -f /home/dist/hc.arslan90/mixim/mixim/examples/veins/petite2H_Ack/proph'. Program terminated with signal 6, Aborted.
#0 0x00002ad31876c1a5 in *__GI_raise (sig=<optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
can someone help to identify the error ?
Note: the buggly code introduce a specific data structure which is a std::map that contain as a value a std::set
It's not. It's a heap corruption error.
Not every heap corruption error causes a crash, so if you have a heap corruption error reported by Valgrind, it's almost definitely the source of your crash. (You would also do well to update your question with actual Valgrind error report.)
You will need to start a debug (or memory checking) run of your simulation using the same command line parameters; otherwise, no model libraries will be loaded and your simulation will not execute.
Note that, independent of how you start the debug or memory checking run of your simulation, you should make sure to run it in
Cmdenv
(the command line environment) rather thanTkenv
. Not only will your simulation execute much faster, you can also be sure that all warnings will be relevant to your simulation model, rather than the GUI and assorted GUI libraries. You can do this by either appending-u Cmdenv
to the command line or (in the IDE) by editing your simulation's run configuration and selecting User interface: Command line.If you run your simulation from the command line, just prefix your usual execution of either
opp_run
or your simulation binary (e.g.,./veins
) withgdb --args
(to run the debugger) orvalgrind --tool=memcheck
(to run the memory checker). An example command line might be/usr/bin/valgrind --tool=memcheck opp_run -l../../src/veins -n../../src/veins;. -u Cmdenv
(where text in bold was added).If you want run your simulation from the command line, but are currently using the OMNeT++ IDE, you can quickly check which command line parameters are being used for running your simulation. Watch the output in the Console View when running your simulation. The output will likely start with
OMNeT++ Discrete Event Simulation
. Near the start of the output you will also find two lines beginning with$
. These are the exact commands the IDE is using to run your simulation.If you want run your simulation from the OMNeT++ IDE, note that it also has built-in functionality to run your simulation in with a debugger or a memory checker. To run your simulation in either, right-click the .ini file (e.g.,
omnetpp.ini
of your simulation and choose either Debug As (for gdb) or Profile As (for valgrind), then OMNeT++ Simulation. After running your simulation, you can find the output of valgrind in a new Valgrind View.