Every time I call the winformsmap1.refresh I notice that memory consumption of the
application increases steadily by about 130K.
Nothing is being added or removed from the map.
I have commented out the entire main functionality of my processing loop so every 30 seconds I call a map.refresh.
I would expect that as the map is not changing that the memory would remain constant.
Is this a known Issue.
Map refresh memory leak
Hi Steve,
Thanks for your post, we tried to recreat the problem with attached code, but it didn’t show up, would you please check if there are any thing missed in it?
Waiting for your further informaiton.
Best Regards
Summer
WindowsFormsApplication35.zip (15.2 KB)
I just ran A memory Profile on the system and the profiler stated that a possible memory leak is occurring in the Map refresh.
58 undisposed instances of type System.drawing.bitmap and Climbing.
I am using an openstreet map with V 4.5.0.0
I appears the Bitmap tiles Are retaining memory on the Map refresh.
After several minumtes I re ran the profiler and it showed the undisposed bitmaps have doubled.
During this time, The Application Has done nothing but routine map refreshes.
DesktopEdition!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x03e3d48bcfe7bb6c( IEnumerable<overlay> )
DesktopEdition!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xff5b27c00f9678c2( RectangleShape )
DesktopEdition!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xe3cee4adb9c72451()
DesktopEdition!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x9ac8c50f434f4b39( int )
DesktopEdition!ThinkGeo.MapSuite.DesktopEdition.WinformsMap.Refresh()
s3fast5!s3fast5._0.Form1.Timer1_Tick( object,EventArgs ) Form1.vb
</overlay>
Hi Steve,
Does that the same issue with 11924(thinkgeo.com/forums/tabid/143/aft/11924/Default.aspx)?
If it’s the same problem we can discuss it there.
Regards,
Don
It is the Same Underlying Issue( Memory Leak ) that I am trying to pin down. I would consider the other thread closed as it answered my question regarding clearing a layer.
from the Messages above this issue appears to be related to the map tiles.
Hi Steve,
You meant the clear layer have been solved but the memory leak still happen?
If you think it related with tile, you can try to use SingleTile mode for test.
Regards,
Don
I ran the system overnight and Found that it had crashed ( Out of Memory) A stack trace led me back to the Map Tiles
I attempted to change the tiletype of the OpenstreetmapOverlay.
The Property TileType Does not exist. In Fact there is a very limited set of properties.
Hi Steve,
TileType is set in Overlay level. Could you please upload the stack trace?
And are your test project enough simple or just you using a complex project for run overnight?
Regards,
Don
The desktop edition 4.5 does not appear to have the tiletype.
Even the documentation does not reference this. I am almost 100% convinced it is the map tiles that is increasing memory.
The application is currently running and as soon as it crashes I will upload the Stack trace.
Hi Steve,
Sorry to say, as the desktop edition 4.5 is too early, we can’t find its source codes in that time. So, I am afraid it is hard for us to debug into and figure out what’s going on, but we would like to come up with a workaround if you can provide us a minimize sample to recreate this issue.
I am not sure if the stack trace should be helpful to solve this memory issue, but we will try out best to dig out any clues based on it.
But, I think the best solution is updating to the latest version if possible.
Regards,
Johnny
I ran a memory profiler on the application and generated a report on what is actually growing.
I have trimmed the code down so it Only loads an Openstreet map. and every 15 seconds executes a Map refresh.
I appears by this report that every refresh , it is creating Many Point Shapes and Rectangle Shapes. I have attached the PDF of this report?
During the time of this memory profile, The application was minimized. The only operation was map refresh every 15 Seconds.
Over an Hour memory usage increased approx 32MB
Memory_Hole.pdf (197 KB)
Hi Steve,
We are really sorry to say we still encountered the issue with the map suite edition 4.5. Here we created a test sample and hope you can have a try to see if it can recreate your issue on your end.
Thanks,
Johnny
Post11895.zip (16.8 KB)
I ran the app you sent me over night, Although the memory did increase slightly, it was nothing like what I have experienced.
I did notice that the app didnt implement a zoom in. It only changed the extents of a single tile.
I will extract the key points from my code and create a small application to demonstrate the issue.
Steve,
Okay, that’s better you can send us a small application which can recreate this issue.
Thanks,
Johnny
Issue resolved. It had nothing to do with map suite.
Thanks for your help
Steve,
Okay, we are glad to hear it is solved.
Thanks,
Johnny