Bug 309273 - Marble crashes when --smallscreen is specified and no local bookmark folder exists
Summary: Marble crashes when --smallscreen is specified and no local bookmark folder e...
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR critical
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 21:33 UTC by Bernhard Beschow
Modified: 2012-10-31 19:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Beschow 2012-10-30 21:33:33 UTC
Backtrace:

Thread 1 (Thread 0xb43bd740 (LWP 8758)):
#0  Marble::GeoDataFeature::setVisible (this=0x4, value=false) at /home/shentey/Projekte/marble/src/src/lib/geodata/data/GeoDataFeature.cpp:582
No locals.
#1  0xb6f65884 in Marble::BookmarkManager::setShowBookmarks (this=0x822a760, visible=false) at /home/shentey/Projekte/marble/src/src/lib/BookmarkManager.cpp:164
No locals.
#2  0x080674d6 in Marble::MainWindow::showBookmarks (this=0x81cfa00, show=false) at /home/shentey/Projekte/marble/src/src/QtMainWindow.cpp:783
No locals.
#3  0x08074db1 in Marble::MainWindow::readSettings (this=0x81cfa00, overrideSettings=...) at /home/shentey/Projekte/marble/src/src/QtMainWindow.cpp:1081
        mapThemeId = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0xb7e5c939 <QObject::event(QEvent*)+25>, static codecForCStrings = 0x0}
        __PRETTY_FUNCTION__ = "void Marble::MainWindow::readSettings(const QVariantMap&)"
        tracking = 0x81d7020
        isLocked = 200
        positionProvider = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x0, static codecForCStrings = 0x0}
        settings = <incomplete type>
        sideBarState = {static shared_null = {ref = {_q_value = 1350}, alloc = 0, size = 0, data = 0x80adcb8 <QByteArray::shared_null+16> "", array = ""}, static shared_empty = {ref = {_q_value = 5}, alloc = 0, size = 0, data = 0xb7fab3c4 <QByteArray::shared_empty+16> "", array = ""}, d = 0x822da60}
        smallScreen = 69
#4  0x0807a404 in Marble::MainWindow::initObject (this=0x81cfa00, cmdLineSettings=...) at /home/shentey/Projekte/marble/src/src/QtMainWindow.cpp:165
No locals.
#5  0xb7e5864a in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#6  0xb7e5cb8b in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#7  0xb739893a in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
No symbol table info available.
#8  0xb77c1d9c in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
No symbol table info available.
#9  0xb734002c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
No symbol table info available.
#10 0xb7344ad4 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
No symbol table info available.
#11 0xb7e468fe in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#12 0xb7e4a62d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#13 0xb7e4a8bc in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#14 0xb7e784a4 in ?? () from /usr/lib/libQtCore.so.4
No symbol table info available.
#15 0xb68b1733 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#16 0xb68b1ad0 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#17 0xb68b1bb1 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#18 0xb7e78621 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#19 0xb73f124a in ?? () from /usr/lib/libQtGui.so.4
No symbol table info available.
#20 0xb7e453dc in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#21 0xb7e456d1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#22 0xb7e4a96a in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
No symbol table info available.
#23 0xb733deb4 in QApplication::exec() () from /usr/lib/libQtGui.so.4
No symbol table info available.
#24 0x0805d1bf in main (argc=4, argv=0xbffff754) at /home/shentey/Projekte/marble/src/src/qtmain.cpp:260
        graphicsString = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x80e5418, static codecForCStrings = 0x0}
        app = <incomplete type>
        marbleDataPath = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x80adc40 <QString::shared_null>, static codecForCStrings = 0x0}
        mapThemeId = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x80adc40 <QString::shared_null>, static codecForCStrings = 0x0}
        cmdLineSettings = {{d = 0x80adc60 <QMapData::shared_null>, e = 0x80adc60 <QMapData::shared_null>}}
        window = 0x81cfa00
        args = {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 10011}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x81ad1d8}, d = 0x81ad1d8}}, <No data fields>}
        graphicsSettings = <optimized out>
        lang = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x814ddc8, static codecForCStrings = 0x0}
        translator = <incomplete type>
        dataPathIndex = <optimized out>
        distanceString = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x80adc40 <QString::shared_null>, static codecForCStrings = 0x0}
        profiles = {i = 1}
        coordinatesString = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 6886}, alloc = 0, size = 0, data = 0x80adc52 <QString::shared_null+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 44}, alloc = 0, size = 0, data = 0xb7fab49e <QString::shared_empty+18>, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x80adc40 <QString::shared_null>, static codecForCStrings = 0x0}
        measurement = <optimized out>



Context information for #1  0xb6f65884 in Marble::BookmarkManager::setShowBookmarks (this=0x822a760, visible=false) at /home/shentey/Projekte/marble/src/src/lib/BookmarkManager.cpp:164

this	136488800 @0x822a760	Marble::BookmarkManager
	[QObject]	 	QObject
	d	 @0x825b978	Marble::BookmarkManagerPrivate
		m_bookmarkDocument	0x0	Marble::GeoDataDocument *
		m_bookmarkFileRelativePath	"bookmarks/bookmarks.kml"	QString
		m_treeModel	 @0x822a728	Marble::GeoDataTreeModel
visible	false	bool


Reproducible: Always

Steps to Reproduce:
1. Remove ~/.local/share/marble/bookmarks
2. Start Marble in --smallscreen mode
Actual Results:  
Marble crashes

Expected Results:  
Marble shouldn't crash
Comment 1 Bernhard Beschow 2012-10-31 19:40:41 UTC
Git commit 9e630ca10ce4fa175a63dfc7a4e9cda2b73cba4f by Bernhard Beschow.
Committed on 31/10/2012 at 17:53.
Pushed by beschow into branch 'master'.

always create an empty bookmark document upon construction

Establishing the invariant that a document is always around avoids null pointer issues. In addition, creating an empty document upon construction should be indistinguishable from outside (compared to the previous approach where a document is created on demand).

M  +4    -12   src/lib/BookmarkManager.cpp
M  +1    -1    src/lib/BookmarkManagerDialog.cpp
M  +0    -2    src/lib/BookmarkManager_p.h
M  +8    -25   tests/BookmarkManagerTest.cpp

http://commits.kde.org/marble/9e630ca10ce4fa175a63dfc7a4e9cda2b73cba4f