Bug 372022 - kmail2: message is displayed and blanked after short delay. Mail actions then crash kmail2.
Summary: kmail2: message is displayed and blanked after short delay. Mail actions then...
Alias: None
Product: kmail2
Classification: Applications
Component: UI (show other bugs)
Version: 5.3.0
Platform: Gentoo Packages Linux
: NOR major (vote)
Target Milestone: ---
Assignee: kdepim bugs
Depends on:
Reported: 2016-11-03 13:23 UTC by Jan-Matthias Braun
Modified: 2016-11-28 12:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Matthias Braun 2016-11-03 13:23:02 UTC
When selecting a mail in message view, the message is displayed and then disappears after a variable delay. Changing to another mail and then back does not triggering this behaviour. The disappearing message happens in the embedded message view as well as in an extra window (after double clicking the message).

If the mail display is blank and I trigger any message related, e.g., reply, forward, delete, kmail crashes. But if I redisplay the message and do the same action while the display is intact, everything will work fine. Nonetheless, this mail focuses on the disappearing of the displayed mail.

I see the following backtrace, which seems to lead into the depths of QtWebEngine.

Received signal 11 SEGV_MAPERR 000000000008
#0 0x7ffff4cb3b3e base::debug::StackTrace::StackTrace()
#1 0x7ffff4cb3c2b base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7ffff22cc2b0 <unknown>
#3 0x7ffff33785b0 v8::internal::IncrementalMarking::ActivateIncrementalWriteBarrier()
#4 0x7ffff33787e7 v8::internal::IncrementalMarking::StartMarking()
#5 0x7ffff3378943 v8::internal::IncrementalMarking::Start()
#6 0x7ffff368ac9f v8::internal::MemoryReducer::TimerTask::RunInternal()
#7 0x7ffff4d46869 base::debug::TaskAnnotator::RunTask()
#8 0x7ffff541b323 scheduler::TaskQueueManager::ProcessTaskFromWorkQueue()
#9 0x7ffff541bda0 scheduler::TaskQueueManager::DoWork()
#10 0x7ffff4d46869 base::debug::TaskAnnotator::RunTask()
#11 0x7ffff4cd79d5 base::MessageLoop::RunTask()
#12 0x7ffff4cd99ab base::MessageLoop::DoDelayedWork()
#13 0x7ffff4cdaaaf base::MessagePumpDefault::Run()
#14 0x7ffff4cefffd base::RunLoop::Run()
#15 0x7ffff4cd6f65 base::MessageLoop::Run()
#16 0x7ffff4a07baf content::RendererMain()
#17 0x7ffff3dc4cdb content::RunZygote()
#18 0x7ffff3dc5034 content::ContentMainRunnerImpl::Run()
#19 0x7ffff3dc34e1 content::ContentMain()
#20 0x7ffff311d514 QtWebEngine::processMain()
#21 0x000000400703 main
#22 0x7ffff22b9681 __libc_start_main
#23 0x000000400749 _start

What additional information can I provide?

Comment 1 Jan-Matthias Braun 2016-11-03 13:25:09 UTC
Side note: For all messages I see this error message in the logs:

js: Uncaught ReferenceError: qt is not defined
js: Uncaught ReferenceError: qt is not defined
js: Uncaught ReferenceError: qt is not defined

but it does not seem to interrupt kmail.
Comment 2 Jan-Matthias Braun 2016-11-03 13:27:49 UTC
Sorry for being incoherent: I am using qt 5.7.0, plasma 5.8.3, kde apps 16.08.2, and frameworks 5.27. The compiler is gcc 6.2.0.
Comment 3 Jan-Matthias Braun 2016-11-03 14:55:30 UTC
Looking at the stack trace again, I just remembered that v8 has problems with gcc 6 due to programming practices. I am recompiling qtwebengine with appropriate compiler flags to check if this is the underlying problem here...
Comment 4 Jan-Matthias Braun 2016-11-03 16:40:44 UTC
In a side-note, the secondary crash happens when grabbing selected text:
#0  0x00007fffeedae224 in QtWebEngineCore::WebContentsAdapter::selectedText() const () from /usr/lib64/libQt5WebEngineCore.so.5
#1  0x00007ffff60eb321 in QWebEnginePage::selectedText() const () from /usr/lib64/libQt5WebEngineWidgets.so.5
#2  0x00007ffff60f8547 in QWebEngineView::selectedText() const () from /usr/lib64/libQt5WebEngineWidgets.so.5
#3  0x00007fff027e5991 in MessageViewer::Viewer::selectedText() const (this=<optimized out>)
    at /var/tmp/portage/kde-apps/messagelib-16.08.2/work/messagelib-16.08.2/messageviewer/src/viewer/viewer.cpp:248
#4  0x00007fff02e78600 in KMReaderWin::copyText() const (this=<optimized out>)
    at /var/tmp/portage/kde-apps/kmail-16.08.2/work/kdepim-16.08.2/kmail/src/kmreaderwin.cpp:399
#5  0x00007fff02ed0508 in KMail::MessageActions::replyCommand (this=0x3bd4fc0, strategy=MessageComposer::ReplySmart)
    at /var/tmp/portage/kde-apps/kmail-16.08.2/work/kdepim-16.08.2/kmail/src/messageactions.cpp:477
#6  0x00007ffff6ef3d1c in QtPrivate::QSlotObjectBase::call (a=0x7fffffffc930, r=0x3bd4fc0, this=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:130
#7  QMetaObject::activate (sender=0x3bd0160, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>)
    at kernel/qobject.cpp:3723
#8  0x00007ffff7a4dea2 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#9  0x00007ffff7a539ff in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff7a53aec in QAction::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007ffff7a5c32c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#12 0x00007ffff7a61739 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff6ec8f18 in QCoreApplication::notifyInternal2 (receiver=0x3bd0160, event=event@entry=0x7fffffffcc00)
    at kernel/qcoreapplication.cpp:988
#14 0x00007ffff723ef96 in QCoreApplication::sendEvent (event=0x7fffffffcc00, receiver=<optimized out>)
    at /usr/include/qt5/QtCore/qcoreapplication.h:231
#15 QShortcutMap::dispatchEvent (this=this@entry=0x449968, e=e@entry=0x7fffffffccb0) at kernel/qshortcutmap.cpp:674
#16 0x00007ffff723f069 in QShortcutMap::tryShortcut (this=this@entry=0x449968, e=e@entry=0x7fffffffccb0) at kernel/qshortcutmap.cpp:351
#17 0x00007ffff71fad5f in QWindowSystemInterface::handleShortcutEvent (window=<optimized out>, window@entry=0xca8120, 
    timestamp=<optimized out>, keyCode=82, modifiers=..., nativeScanCode=27, nativeVirtualKey=114, nativeModifiers=0, text=..., 
    autorepeat=false, count=1) at kernel/qwindowsysteminterface.cpp:235
#18 0x00007ffff7210fcc in QGuiApplicationPrivate::processKeyEvent (e=0x419f800) at kernel/qguiapplication.cpp:2008
#19 0x00007ffff7216285 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x419f800) at kernel/qguiapplication.cpp:1699
#20 0x00007ffff71f596b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:654
#21 0x00007fffe7a26900 in userEventSourceDispatch (source=<optimized out>) at eventdispatchers/qeventdispatcher_glib.cpp:76
#22 0x00007ffff4a6bd17 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#23 0x00007ffff4a6c788 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#24 0x00007ffff4a6c91c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#25 0x00007ffff6f1aeef in QEventDispatcherGlib::processEvents (this=0x4bb6d0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007ffff6ec704a in QEventLoop::exec (this=this@entry=0x7fffffffd010, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#27 0x00007ffff6ecf48d in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#28 0x00000000004042c3 i    at /var/tmp/portage/kde-apps/kontact-16.08.2/work/kdepim-16.08.2/kontact/src/main.cpp:223
n main (argc=<optimized out>, argv=<optimized out>)
Comment 5 Jan-Matthias Braun 2016-11-03 17:14:00 UTC
Update: I recompiled with "-fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2", but the crash still happens.

Then I took a look at kdepim git and found at, that there is a KF5WebEngineViewerConfig in the works. So it looks like everything will change in git, right?
Comment 6 Jan-Matthias Braun 2016-11-28 12:17:48 UTC
(In reply to Jan-Matthias Braun from comment #5)
> Update: I recompiled with "-fno-delete-null-pointer-checks -fno-lifetime-dse
> -fno-schedule-insns2", but the crash still happens.

Yeah, looks like I did not rccompile with these CFLAGS. Now I did and it looks quite a lot better.

qtwebengine is still using wrong CFLAGS for gcc 6. :-(