Bug 381872 - Crash when adding bookmark with UTM view angle
Summary: Crash when adding bookmark with UTM view angle
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-07-01 17:50 UTC by Wolfgang Bauer
Modified: 2017-07-06 10:33 UTC (History)
1 user (show)

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 Wolfgang Bauer 2017-07-01 17:50:00 UTC
Application: marble (2.2.1 (stable release))

Qt Version: 5.9.0
Frameworks Version: 5.35.0
Operating System: Linux 4.4.73-18.17-default x86_64
Distribution: "openSUSE Leap 42.2"

-- Information about the crash:
- What I was doing when the application crashed:

Changed Angle to "Universal Transverse Mercator (UTM)" in Marble's settings ("View").
Right-clicked anywhere on the globe, selected "Add Bookmark" => marble crashed

The crash can be reproduced every time.

-- Backtrace:
Application: Marble – Virtueller Globus (marble), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f52898e58c0 (LWP 14575))]

Thread 7 (Thread 0x7f520f7f1700 (LWP 14590)):
#0  0x00007f527f2c30bf in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f528326d813 in  () at /usr/lib64/libQt5WebKit.so.5
#2  0x00007f528358f6f1 in  () at /usr/lib64/libQt5WebKit.so.5
#3  0x00007f527f2be744 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f5284cbbaad in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f520fff2700 (LWP 14589)):
#0  0x00007f527f2c30bf in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f528326c83d in  () at /usr/lib64/libQt5WebKit.so.5
#2  0x00007f528358f6f1 in  () at /usr/lib64/libQt5WebKit.so.5
#3  0x00007f527f2be744 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f5284cbbaad in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f5250e13700 (LWP 14587)):
#0  0x00007f527f2c30bf in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f5283560ca3 in  () at /usr/lib64/libQt5WebKit.so.5
#2  0x00007f5283560cc9 in  () at /usr/lib64/libQt5WebKit.so.5
#3  0x00007f527f2be744 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f5284cbbaad in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f5266707700 (LWP 14585)):
#0  0x00007f527cbd87b9 in g_mutex_lock () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f527cb96969 in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f527cb97230 in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f527cb9742c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#4  0x00007f52857cb4db in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007f528577a03b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#6  0x00007f52855c0d1a in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#7  0x00007f52855c519d in  () at /usr/lib64/libQt5Core.so.5
#8  0x00007f527f2be744 in start_thread () at /lib64/libpthread.so.0
#9  0x00007f5284cbbaad in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f5267918700 (LWP 14584)):
#0  0x00007f5284cb320d in poll () at /lib64/libc.so.6
#1  0x00007f527cb97314 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f527cb9742c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f52857cb4db in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007f528577a03b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007f52855c0d1a in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6  0x00007f528784e7e5 in  () at /usr/lib64/libQt5DBus.so.5
#7  0x00007f52855c519d in  () at /usr/lib64/libQt5Core.so.5
#8  0x00007f527f2be744 in start_thread () at /lib64/libpthread.so.0
#9  0x00007f5284cbbaad in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f526e49c700 (LWP 14581)):
#0  0x00007f5284cb320d in poll () at /lib64/libc.so.6
#1  0x00007f5277e623e2 in  () at /usr/lib64/libxcb.so.1
#2  0x00007f5277e63fcf in xcb_wait_for_event () at /usr/lib64/libxcb.so.1
#3  0x00007f52709f66c9 in  () at /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f52855c519d in  () at /usr/lib64/libQt5Core.so.5
#5  0x00007f527f2be744 in start_thread () at /lib64/libpthread.so.0
#6  0x00007f5284cbbaad in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f52898e58c0 (LWP 14575)):
[KCrash Handler]
#6  0x00007f5289289717 in Marble::LatLonEdit::setValue(double) (this=0x2d4cf30, value=9.532824124368238e-130) at /usr/src/debug/marble-17.04.2/src/lib/marble/LatLonEdit.cpp:652
#7  0x00007f528928ab5d in Marble::PlacemarkEditHeader::setLongitude(double) (longitude=<optimized out>, this=<optimized out>) at /usr/src/debug/marble-17.04.2/src/lib/marble/PlacemarkEditHeader.cpp:411
#8  0x00007f528928ab5d in Marble::PlacemarkEditHeader::setLongitude(double) (this=<optimized out>, longitude=<optimized out>) at /usr/src/debug/marble-17.04.2/src/lib/marble/PlacemarkEditHeader.cpp:412
#9  0x00007f52892dab1e in Marble::EditBookmarkDialog::setCoordinates(Marble::GeoDataCoordinates const&) (this=0x29492d0, coordinates=...) at /usr/src/debug/marble-17.04.2/src/lib/marble/EditBookmarkDialog.cpp:125
#10 0x00007f52891c5c7d in Marble::MarbleWidgetPopupMenu::addBookmark() (this=0x1fe3210) at /usr/src/debug/marble-17.04.2/src/lib/marble/MarbleWidgetPopupMenu.cpp:888
#11 0x00007f52857a4b9f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#12 0x00007f5286743732 in QAction::triggered(bool) () at /usr/lib64/libQt5Widgets.so.5
#13 0x00007f5286745e9d in QAction::activate(QAction::ActionEvent) () at /usr/lib64/libQt5Widgets.so.5
#14 0x00007f52868981a2 in  () at /usr/lib64/libQt5Widgets.so.5
#15 0x00007f528689eb84 in  () at /usr/lib64/libQt5Widgets.so.5
#16 0x00007f528689faab in QMenu::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQt5Widgets.so.5
#17 0x00007f5286787467 in QWidget::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#18 0x00007f52868a1d8b in QMenu::event(QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#19 0x00007f5286749afc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#20 0x00007f5286750edc in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#21 0x00007f528577bbc5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#22 0x00007f528674fd59 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQt5Widgets.so.5
#23 0x00007f528679f89c in  () at /usr/lib64/libQt5Widgets.so.5
#24 0x00007f52867a20c3 in  () at /usr/lib64/libQt5Widgets.so.5
#25 0x00007f5286749afc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#26 0x00007f5286750840 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#27 0x00007f528577bbc5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib64/libQt5Core.so.5
#28 0x00007f5285fd716d in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib64/libQt5Gui.so.5
#29 0x00007f5285fd8d25 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib64/libQt5Gui.so.5
#30 0x00007f5285fb78ab in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Gui.so.5
#31 0x00007f5270a479f0 in  () at /usr/lib64/libQt5XcbQpa.so.5
#32 0x00007f527cb97134 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#33 0x00007f527cb97388 in  () at /usr/lib64/libglib-2.0.so.0
#34 0x00007f527cb9742c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#35 0x00007f52857cb4bc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#36 0x00007f528577a03b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#37 0x00007f52857821f4 in QCoreApplication::exec() () at /usr/lib64/libQt5Core.so.5
#38 0x000000000041fbe0 in  ()
#39 0x00007f5284bf26e5 in __libc_start_main () at /lib64/libc.so.6
#40 0x0000000000421409 in _start ()

Reported using DrKonqi
Comment 1 Wolfgang Bauer 2017-07-01 18:15:22 UTC
This has also been reported in openSUSE's bugzilla:
http://bugzilla.opensuse.org/show_bug.cgi?id=1044747

The problem seems to be that there is no input handler implemented yet for the UTM case.
According to the backtrace it crashes in void LatLonEdit::setValue( qreal value ) then on this line (#652):
    d->m_inputHandler->setValue(value);
Comment 2 Wolfgang Bauer 2017-07-04 18:21:19 UTC
PS, The crash got "introduced" by this change:
https://cgit.kde.org/marble.git/commit/?id=7859bf1cc1fdaf07b70446b1530358bff7bf43e3

I'd suggest to revert this (even in the 17.04 branch) until it's implemented properly.

FTR, see src/lib/marble/LatLonEdit.cpp line#549 ff:
void LatLonEdit::setNotation(GeoDataCoordinates::Notation notation)
{
    delete d->m_inputHandler;
    d->m_inputHandler = 0;

    switch (notation) {
    case GeoDataCoordinates::Decimal:
        d->m_inputHandler = new DecimalInputHandler(d);
        break;
    case GeoDataCoordinates::DMS:
        d->m_inputHandler = new DMSInputHandler(d);
        break;
    case GeoDataCoordinates::DM:
        d->m_inputHandler = new DMInputHandler(d);
        break;
    case GeoDataCoordinates::UTM:
        /** @todo implement */ <==
        break;
    case GeoDataCoordinates::Astro:
        /** @todo implement */
        break;
    }
Comment 3 Dennis Nienhüser 2017-07-06 04:47:58 UTC
Changing setNotation to make sure there is always an input handler seems better to me to work around it (closer to the problem, prevents other setNotation calls to cause the same bug).
Comment 4 Mohammed Nafees 2017-07-06 08:51:10 UTC
Git commit 460833fbb663a20ad451e0313220b88ca7e31d47 by Mohammed Nafees.
Committed on 06/07/2017 at 08:43.
Pushed by nafees into branch 'master'.

Add fallback InputHandler to prevent crash when adding bookmark with UTM view angle

M  +11   -9    src/lib/marble/LatLonEdit.cpp

https://commits.kde.org/marble/460833fbb663a20ad451e0313220b88ca7e31d47
Comment 5 Mohammed Nafees 2017-07-06 08:53:09 UTC
Git commit c2daba4216d83b90599d4fbb405e1a6ba633c9a8 by Mohammed Nafees.
Committed on 06/07/2017 at 08:52.
Pushed by nafees into branch 'Applications/17.04'.

Add fallback InputHandler to prevent crash when adding bookmark with UTM view angle

M  +11   -9    src/lib/marble/LatLonEdit.cpp

https://commits.kde.org/marble/c2daba4216d83b90599d4fbb405e1a6ba633c9a8
Comment 6 Wolfgang Bauer 2017-07-06 10:33:33 UTC
I agree, that's better indeed. ;-)

And I can confirm that the crash is fixed.
Thanks!