Bug 201681

Summary: using the method MarbleWidget::centreOn() is making a very large amount of memory and using a lot of cpu.
Product: [Applications] marble Reporter: Andrew Manson <acb>
Component: generalAssignee: marble-bugs
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: 0.8 (KDE 4.3)   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andrew Manson 2009-07-27 18:22:19 UTC
Version:            (using Devel)
Installed from:    Compiled sources

the MarbleWidget::centreOn() function is obviously stuck in an infinite loop which is creating an object in memory for every turn of the loop. It took less than 3 seconds for my memory to max out and if it didn't kill marble then it would have even maxed out my swap. 

The code used to cause this problem was :
m_marbleWidget->centerOn( item->coordinate(), false ); 
where the bool parameter was first tried to be "true" so that it would animate the movement and the item is a GeoGraphicsItem that returns a correct GeoDataCoordinates object. 

I have committed the line that causes this problem but you will need to remove the comments if you would like to recreate this error. it can be found in OsmAnnotatePlugin.cpp line 212.
Comment 1 Andrew Manson 2009-07-28 20:07:12 UTC
SVN commit 1003737 by mansona:

BUG:201681 fixed 
The problem with crashing has been ammended by Torsten. The APIDOX have been ammended 
to discourage incorrect usage of the centerOn(GeoDataCoordinates) method and the 
centerOn(GeoDataLatLonBox) method has been finished. 
Also committing the start of the XML writer classes. 


 M  +10 -6     lib/MarbleWidget.cpp  
 M  +10 -5     lib/MarbleWidget.h  
 M  +1 -0      lib/geodata/CMakeLists.txt  
 A             lib/geodata/writer (directory)  
 A             lib/geodata/writer/GeoWriter.cpp   [License: LGPL]
 A             lib/geodata/writer/GeoWriter.h   [License: LGPL]
 M  +11 -6     plugins/render/osmannotate/OsmAnnotatePlugin.cpp  
 M  +3 -0      plugins/render/osmannotate/OsmAnnotatePlugin.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1003737