OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000705OMNeT++IDE / genericpublic2014-01-13 19:162014-01-14 16:47
Reporterlhasnawi 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version4.3.1 
Target VersionFixed in Version 
Summary0000705: Memory Leak
DescriptionMemory leak takes place when running omnet++ for long period of time. My code is perfect but it seems like the leak occur at GUI. My code crashes after 2000 repetition due to Heap Space outage. See attached image
TagsNo tags attached.
Attached Filesjpg file icon MemoryLeak at omnetpp.JPG [^] (94,777 bytes) 2014-01-13 19:16


jpg file icon MemoryLeak at omnetpp-2.JPG [^] (86,677 bytes) 2014-01-14 16:42

- Relationships

-  Notes
(0000871)
andras (administrator)
2014-01-14 09:07

To make it clear, you are talking about the OMNeT++ IDE, and NOT simulations. (Attached image shows Java memory usage). Fixing the "Category" field (Cmdenv->IDE)
(0000872)
andras (administrator)
2014-01-14 09:20

Attached image says the following classes allocated a lot of memory:
- org.eclipse.ui.internal.console.ConsoleDocumentAdapter
- org.eclipse.swt.custom.StyledText

It looks fairly obvious that it is about the Console View in the IDE. ConsoleDocumentAdapter has to do with storing the console output your running simulation produced, and StyledText is an editable rich text widget generally used in source editors, but apparently also by the Console View. It also stores the text (console output in this case) internally, to be able to display it.

So the problem seems to be that when you are running 2000+ simulations from the IDE, the IDE keeps the stdout from those runs in memory so it can display it in the Console View, and runs out of memory while doing so.

Have you tried limiting the amount of text each Console stores? Go to: Window->Preferences->Run/Debug->Console, check "Limit console output", and enter a smaller number in the "Console buffer size (characters)" field, e.g. 1000.
(0000873)
andras (administrator)
2014-01-14 09:27

Just noticed those are very small numbers in your screenshot (69MB?), cannot be responsible for out of memory errors...
(0000874)
lhasnawi (reporter)
2014-01-14 16:47

Thank you for your fast response, as well as editing the category of the bug. The snapshot of the heapdump I uploaded was after 200 iterations. I did upload another file that demonstrate the memory leak after 1000 iterations for the exact same code. It keeps add up.

My simulation requires 16! iterations in addition to (16!)^2 for the next step.

I will try your suggested solution and i will reply back to you.

- Issue History
Date Modified Username Field Change
2014-01-13 19:16 lhasnawi New Issue
2014-01-13 19:16 lhasnawi File Added: MemoryLeak at omnetpp.JPG
2014-01-14 09:07 andras Note Added: 0000871
2014-01-14 09:07 andras Category runtime / Cmdenv => IDE / generic
2014-01-14 09:20 andras Note Added: 0000872
2014-01-14 09:27 andras Note Added: 0000873
2014-01-14 16:42 lhasnawi File Added: MemoryLeak at omnetpp-2.JPG
2014-01-14 16:47 lhasnawi Note Added: 0000874


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker