[Marble-bugs] [marble] [Bug 318736] New: GeoScene not cleared properly, leads to crash
Dennis Nienhüser
earthwings at gentoo.org
Mon Apr 22 19:49:32 UTC 2013
https://bugs.kde.org/show_bug.cgi?id=318736
Bug ID: 318736
Summary: GeoScene not cleared properly, leads to crash
Classification: Unclassified
Product: marble
Version: 1.6.0 (KDE 4.11.0)
Platform: Other
URL: https://forum.kde.org/viewtopic.php?f=217&t=109874&p=2
63576#p263576
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: marble-bugs at kde.org
Reporter: earthwings at gentoo.org
Quoting the forum thread:
1) If you enable FileViewWidget, you may want to enable/disable or open/close
user-opened documents (shapefiles, kml or others). Usually, everything's fine
when you open or enable document (or separate objects in it). But when you try
to disable document, you may see that not all document's objects gone from map.
Furthermore, if you try to close that document, application will crash when
rendering GeometryLayer.
All this is because, when document deleted from TreeModel or erased at all from
memory, not all of its objects deleted from GeoGraphicsScene. Root of the
problem is in function GeoGraphicsScene::removeItem (file GeoGraphicsScene.cpp)
- not all pointers to document's object are deleted from graphics scene.
Code: Select all
void GeoGraphicsScene::removeItem( const GeoDataFeature* feature )
{
///- const TileId key = d->m_features.value( feature );
///- QList< GeoGraphicsItem* >& tileList = d->m_items[key];
///- foreach( GeoGraphicsItem* item, tileList ) {
///- if( item->feature() == feature ) {
///- d->m_features.remove( feature );
///- tileList.removeAll( item );
///- return;
///- }
///- }
foreach( TileId key, d->m_items.keys() ) {
///+
QList< GeoGraphicsItem* >& tileList = d->m_items[key];
///+
foreach( GeoGraphicsItem* item, tileList ) {
///+
if( item->feature() == feature )
///+
tileList.removeAll( item );
///+
}
///+
}
///+
d->m_features.remove( feature );
///+
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Marble-bugs
mailing list