Bug 379231 - konsole crash when using font "Noto Color Emoji" for displaying Emoji
Summary: konsole crash when using font "Noto Color Emoji" for displaying Emoji
Status: RESOLVED UPSTREAM
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-04-26 01:08 UTC by Rocket Aaron
Modified: 2018-11-16 11:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Konsole with Noto Color Emoji (289.78 KB, image/png)
2017-06-13 20:06 UTC, Christoph Feck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rocket Aaron 2017-04-26 01:08:02 UTC
Application: konsole (17.04.0)

Qt Version: 5.8.0
Frameworks Version: 5.33.0
Operating System: Linux 4.10.11-1-ARCH x86_64
Distribution: "Arch Linux"

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

shell: fish
remote shell: fish

connect to remote via ssh, and then exec command

user@host$ sudo -s
[sudo] password for user: 

after i entered the correct password, konsole crash;
if the password is wrong, it wouldn't crash

The crash can be reproduced every time.

-- Backtrace:
Application: Konsole (konsole), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f4df2760040 (LWP 958))]

Thread 3 (Thread 0x7f4dd7de0700 (LWP 960)):
#0  0x00007f4de81fc1c9 in g_mutex_lock () from /usr/lib/libglib-2.0.so.0
#1  0x00007f4de81b6101 in g_main_context_query () from /usr/lib/libglib-2.0.so.0
#2  0x00007f4de81b6928 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007f4de81b6acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007f4dee6a309b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007f4dee64c8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#6  0x00007f4dee46ea73 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#7  0x00007f4dec7a6125 in ?? () from /usr/lib/libQt5DBus.so.5
#8  0x00007f4dee4736d8 in ?? () from /usr/lib/libQt5Core.so.5
#9  0x00007f4de9ea12e7 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007f4df212854f in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f4dde43e700 (LWP 959)):
#0  0x00007f4df211e67d in poll () from /usr/lib/libc.so.6
#1  0x00007f4dea2c78e0 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007f4dea2c9679 in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x00007f4de0dc4239 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f4dee4736d8 in ?? () from /usr/lib/libQt5Core.so.5
#5  0x00007f4de9ea12e7 in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007f4df212854f in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f4df2760040 (LWP 958)):
[KCrash Handler]
#6  0x00007f4def094356 in QPainter::end() () from /usr/lib/libQt5Gui.so.5
#7  0x00007f4def0ecfea in QImageTextureGlyphCache::fillTexture(QTextureGlyphCache::Coord const&, unsigned int, QFixed) () from /usr/lib/libQt5Gui.so.5
#8  0x00007f4def0ed364 in QTextureGlyphCache::fillInPendingGlyphs() () from /usr/lib/libQt5Gui.so.5
#9  0x00007f4def08062d in QRasterPaintEngine::drawCachedGlyphs(int, unsigned int const*, QFixedPoint const*, QFontEngine*) () from /usr/lib/libQt5Gui.so.5
#10 0x00007f4def084d47 in QRasterPaintEngine::drawTextItem(QPointF const&, QTextItem const&) () from /usr/lib/libQt5Gui.so.5
#11 0x00007f4def0a1416 in ?? () from /usr/lib/libQt5Gui.so.5
#12 0x00007f4def0a2317 in QPainter::drawText(QPointF const&, QString const&, int, int) () from /usr/lib/libQt5Gui.so.5
#13 0x00007f4df1dbcd96 in Konsole::TerminalDisplay::drawCharacters(QPainter&, QRect const&, QString const&, Konsole::Character const*, bool) () from /usr/lib/libkonsoleprivate.so.17
#14 0x00007f4df1dbd0c5 in Konsole::TerminalDisplay::drawTextFragment(QPainter&, QRect const&, QString const&, Konsole::Character const*) () from /usr/lib/libkonsoleprivate.so.17
#15 0x00007f4df1dc41b1 in Konsole::TerminalDisplay::drawContents(QPainter&, QRect const&) () from /usr/lib/libkonsoleprivate.so.17
#16 0x00007f4df1dc4987 in Konsole::TerminalDisplay::paintEvent(QPaintEvent*) () from /usr/lib/libkonsoleprivate.so.17
#17 0x00007f4def610cd8 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007f4df1dc7d6a in Konsole::TerminalDisplay::event(QEvent*) () from /usr/lib/libkonsoleprivate.so.17
#19 0x00007f4def5c934c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#20 0x00007f4def5d0b61 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007f4dee64e470 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#22 0x00007f4def609a3a in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /usr/lib/libQt5Widgets.so.5
#23 0x00007f4def60a0a6 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQt5Widgets.so.5
#24 0x00007f4def5d9710 in ?? () from /usr/lib/libQt5Widgets.so.5
#25 0x00007f4def5d9922 in ?? () from /usr/lib/libQt5Widgets.so.5
#26 0x00007f4def5f8e7f in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQt5Widgets.so.5
#27 0x00007f4def610da8 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#28 0x00007f4def70fd1b in QMainWindow::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#29 0x00007f4df163845a in KMainWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#30 0x00007f4df1689e85 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#31 0x00007f4def5c934c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#32 0x00007f4def5d0b61 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#33 0x00007f4dee64e470 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#34 0x00007f4dee650bfd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#35 0x00007f4dee6a2c73 in ?? () from /usr/lib/libQt5Core.so.5
#36 0x00007f4de81b67b7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0x00007f4de81b6a20 in ?? () from /usr/lib/libglib-2.0.so.0
#38 0x00007f4de81b6acc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0x00007f4dee6a307f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#40 0x00007f4dee64c8ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#41 0x00007f4dee654e14 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#42 0x00007f4df2408881 in kdemain () from /usr/lib/libkdeinit5_konsole.so
#43 0x00007f4df205c511 in __libc_start_main () from /usr/lib/libc.so.6
#44 0x000000000040065a in _start ()

Reported using DrKonqi
Comment 1 Kurt Hindenburg 2017-04-26 12:57:31 UTC
If you can reproduce this, can you install debug packages to give a better crash output?

I'll try to install fish and see if I can reproduce here
Comment 2 Rocket Aaron 2017-04-26 13:50:33 UTC
(In reply to Kurt Hindenburg from comment #1)
> If you can reproduce this, can you install debug packages to give a better
> crash output?
> 
> I'll try to install fish and see if I can reproduce here

OK...but how to install the debug package?
Comment 3 Rocket Aaron 2017-04-26 13:54:39 UTC
I just created a new user and did the same things that cause that bug,
and there's nothing abnormal ...

maybe there's something wrong with my konsole or fish config ...

sorry to that
Comment 4 Rocket Aaron 2017-05-09 17:06:16 UTC
finally i find some minimal step to reproduce this bug:

set the default font fo Konsole to 'Noto Color Emoji', and try to paste a emoji in the command line. 

for example. just paste "😂" into the command line

and it just got crashed

i used a powerline theme in my remote ssh session, it displays a "⚡" icon when using "sudo -s". and my fallback font for monospace font is "Noto Color Emoji", so it crashs Konsole.

when using font "Noto Emoji", Konsole cant display those emoji. but when I try to select that character and right click on theme, Konsole crachs again.
Comment 5 Rocket Aaron 2017-05-10 14:28:37 UTC
(In reply to Rocket Aaron from comment #3)
> I just created a new user and did the same things that cause that bug,
> and there's nothing abnormal ...
> 
> maybe there's something wrong with my konsole or fish config ...
> 
> sorry to that

would you please read my last commnet for some info to reproduce the bug?

I think I have found that...
Comment 6 Jeremiah Peschka 2017-06-05 20:15:46 UTC
(In reply to Kurt Hindenburg from comment #1)
> If you can reproduce this, can you install debug packages to give a better
> crash output?
> 
> I'll try to install fish and see if I can reproduce here

I can confirm this bug occurs on Kubuntu 17.04. Is there a guide to generating the output that you're looking for?
Comment 8 Christoph Feck 2017-06-13 20:06:56 UTC
Created attachment 106088 [details]
Konsole with Noto Color Emoji

I just tested Qt 5.9.0 with Noto Color Emoji, and got no crash.

You don't really want to use that font. It hardcodes the colors of all digits, and is not monospaced, causing severe alignment issues.
Comment 9 Jeremiah Peschka 2017-06-13 21:50:24 UTC
(In reply to Christoph Feck from comment #8)
> Created attachment 106088 [details]
> Konsole with Noto Color Emoji
> 
> I just tested Qt 5.9.0 with Noto Color Emoji, and got no crash.

That's good to know, at least.

> You don't really want to use that font. It hardcodes the colors of all
> digits, and is not monospaced, causing severe alignment issues.

My goal was to add color emoji into weechat, so font alignment isn't a huge concern.