|Anonymous | Login||2020-07-11 20:50 UTC|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000705||OMNeT++||IDE / generic||public||2014-01-13 19:16||2014-01-14 16:47|
|Target Version||Fixed in Version|
|Summary||0000705: Memory Leak|
|Description||Memory 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|
|Tags||No tags attached.|
|Attached Files|| MemoryLeak at omnetpp.JPG [^] (94,777 bytes) 2014-01-13 19:16
MemoryLeak at omnetpp-2.JPG [^] (86,677 bytes) 2014-01-14 16:42
|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)|
Attached image says the following classes allocated a lot of memory:
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.
|Just noticed those are very small numbers in your screenshot (69MB?), cannot be responsible for out of memory errors...|
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.
|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 - 2020 MantisBT Team|