Bug 508070 - Many Emojis in notification body causes plasmashell to briefly freeze in scary font code after the notification is manually dismissed
Summary: Many Emojis in notification body causes plasmashell to briefly freeze in scar...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (other bugs)
Version First Reported In: 6.4.4
Platform: EndeavourOS Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-10 01:13 UTC by Timothy B
Modified: 2025-08-16 23:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Recording of the bug (189.66 KB, video/webm)
2025-08-10 01:13 UTC, Timothy B
Details
Backtrace (258.98 KB, text/vnd.kde.kcrash-report)
2025-08-10 01:20 UTC, Timothy B
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy B 2025-08-10 01:13:31 UTC
Created attachment 183919 [details]
Recording of the bug

SUMMARY
The Plasma desktop and panels would freeze for a few seconds when trying to display notifications with a lot of emojis in its body

STEPS TO REPRODUCE
1. Run `notify-send 'Bad emoji spam' $(printf '😂%.0s' {1..100})` on the terminal
2. Wait for the notification to appear
3. Dismiss the notification

OBSERVED RESULT
It takes about a second or two (0.5 seconds on my machine) for the `notify-send` command to complete and about the same amount of time as long to dismiss the notification. plasmashell would also freeze for about twice as long when trying to open or close the notifications popup, but only if there are notifications with a lot of emojis in their body sections. The more emojis are shown, the longer plasmashell takes to display the notifications.

The rest of the desktop, including the mouse cursor, appears to remain responsive during the delay.

EXPECTED RESULT
The notification would appear instantly, it would be dismissed instantly, and there should be no delay in opening or closing the notifications popup.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Graphics Processor: AMD Radeon RX 6750 XT
Graphics Driver: AMDGPU

ADDITIONAL INFORMATION
This might be related to bug #507304; the only difference is the desktop would not crash and restart before displaying the notifications, and the fix for that bug doesn't seem to affect this one. If I remember correctly, I first noticed this behavior in Plasma 6.3.

The cursor does stutter in the attached video, but actually it's fully responsive on-screen.

I couldn't get plasmashell to freeze when I put the emojis in the notification title instead of the body, even with multiple notifications sent this way.
Comment 1 Timothy B 2025-08-10 01:20:57 UTC
Created attachment 183920 [details]
Backtrace

I managed to get a backtrace of the freezing behavior by running these two commands:
1. `notify-send 'Bad emoji spam' $(printf '😂%.0s' {1..500})`
2. `pkill -SEGV plasmashell` on another terminal tab during the freeze
Comment 2 Nate Graham 2025-08-11 20:11:17 UTC
Can reproduce. The backtrace says we're deep in font stuff:


#5  0x00007cb194710890 in png_do_expand_palette (png_ptr=0x57619217e9a0, row_info=0x7ffc9f0726b0, row=<optimized out>, palette=0x576192474130, trans_alpha=0x57618d734350 "", num_trans=143) at /usr/src/debug/libpng/libpng/pngrtran.c:4417
#6  png_do_read_transformations (png_ptr=0x57619217e9a0, row_info=0x7ffc9f0726b0) at /usr/src/debug/libpng/libpng/pngrtran.c:4866
#7  0x00007cb194706485 in png_read_row (png_ptr=png_ptr@entry=0x57619217e9a0, row=0x5761926c2ee0 "", dsp_row=dsp_row@entry=0x0) at /usr/src/debug/libpng/libpng/pngread.c:479
#8  0x00007cb19470a6f2 in png_read_image (png_ptr=0x57619217e9a0, image=0x576194d969b0) at /usr/src/debug/libpng/libpng/pngread.c:660
#9  0x00007cb1945369ad in Load_SBit_Png (slot=0x57618fa23570, x_offset=0, y_offset=0, pix_bits=<optimized out>, metrics=0x7ffc9f072aa0, memory=0x57618dfeb980, data=0x7caff3780c2b "\211PNG\r\n\032\n", png_len=3976, populate_map_and_metrics=0 '\000', metrics_only=0 '\000') at ../ft2demos-2.13.3/subprojects/freetype2/src/sfnt/pngshim.c:440
#10 0x00007cb19453f0b6 in tt_sbit_decoder_load_png (decoder=<optimized out>, p=<optimized out>, limit=<optimized out>, x_pos=<optimized out>, y_pos=0, recurse_count=<optimized out>) at ../ft2demos-2.13.3/subprojects/freetype2/src/sfnt/ttsbit.c:1070
#11 0x00007cb19453cb47 in tt_sbit_decoder_load_bitmap (decoder=0x7ffc9f072960, glyph_format=<optimized out>, glyph_start=<optimized out>, glyph_size=<optimized out>, x_pos=<optimized out>, y_pos=0, recurse_count=0, metrics_only=<optimized out>) at ../ft2demos-2.13.3/subprojects/freetype2/src/sfnt/ttsbit.c:1229
#12 tt_sbit_decoder_load_image (decoder=decoder@entry=0x7ffc9f072960, glyph_index=glyph_index@entry=885, x_pos=x_pos@entry=0, y_pos=y_pos@entry=0, recurse_count=recurse_count@entry=0, metrics_only=metrics_only@entry=0 '\000') at ../ft2demos-2.13.3/subprojects/freetype2/src/sfnt/ttsbit.c:1425
#13 0x00007cb194541955 in tt_face_load_sbit_image (face=0x576191cdb5b0, strike_index=<optimized out>, glyph_index=885, load_flags=1114624, stream=<optimized out>, map=0x57618fa23608, metrics=0x7ffc9f072aa0) at ../ft2demos-2.13.3/subprojects/freetype2/src/sfnt/ttsbit.c:1619
#14 0x00007cb194502415 in load_sbit_image (size=0x576191907910, glyph=0x57618fa23570, glyph_index=885, load_flags=1114624) at ../ft2demos-2.13.3/subprojects/freetype2/src/truetype/ttgload.c:2120
#15 TT_Load_Glyph (size=0x576191907910, glyph=0x57618fa23570, glyph_index=885, load_flags=1114624) at ../ft2demos-2.13.3/subprojects/freetype2/src/truetype/ttgload.c:2442
#16 0x00007cb1944f571e in FT_Load_Glyph (face=0x576191cdb5b0, glyph_index=885, load_flags=<optimized out>) at ../ft2demos-2.13.3/subprojects/freetype2/src/base/ftobjs.c:1066
#17 0x00007cb196a8cde4 in QFontEngineFT::loadGlyph (this=this@entry=0x57619272bf60, set=0x0, glyph=885, subPixelPosition=..., color=..., format=QFontEngine::Format_ARGB, fetchMetricsOnly=true, disableOutlineDrawing=false) at /usr/src/debug/qt6-base/qtbase/src/gui/text/freetype/qfontengine_ft.cpp:1810
#18 0x00007cb196a8e6df in QFontEngineFT::recalcAdvances (this=this@entry=0x57619272bf60, glyphs=glyphs@entry=0x7ffc9f072f10, flags=...) at /usr/src/debug/qt6-base/qtbase/src/gui/text/freetype/qfontengine_ft.cpp:2514
#19 0x00007cb196a3a51d in _hb_qt_font_get_glyph_h_advance (font=<optimized out>, font_data=0x57619272bf60, glyph=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qharfbuzzng.cpp:504
#20 0x00007cb19460c585 in hb_font_t::get_glyph_h_advance (this=<optimized out>, glyph=<optimized out>, synthetic=false) at ../harfbuzz/src/hb-font.hh:356
#21 hb_font_get_glyph_h_advances_default (font=0x5761907ffe90, font_data=<optimized out>, count=500, first_glyph=0x5761a602c804, glyph_stride=20, first_advance=0x57619e7c3374, advance_stride=20, user_data=0x0) at ../harfbuzz/src/hb-font.cc:283
#22 0x00007cb1946a6c90 in hb_font_t::get_glyph_h_advances (this=<optimized out>, count=<optimized out>, first_glyph=<optimized out>, glyph_stride=20, first_advance=0x57619e7c1010, advance_stride=20, synthetic=true) at ../harfbuzz/src/hb-font.hh:394
#23 hb_ot_position_default (c=0x7ffc9f0730d0) at ../harfbuzz/src/hb-ot-shape.cc:998
#24 hb_ot_position (c=<optimized out>) at ../harfbuzz/src/hb-ot-shape.cc:1085
#25 hb_ot_shape_internal (c=<optimized out>) at ../harfbuzz/src/hb-ot-shape.cc:1166
#26 0x00007cb1946b32c3 in _hb_ot_shape (shape_plan=0x576191a34f00, font=0x5761907ffe90, buffer=0x7cb180028f10, features=0x7ffc9f073408, num_features=1) at ../harfbuzz/src/hb-ot-shape.cc:1187
#27 _hb_shape_plan_execute_internal (shape_plan=0x576191a34f00, font=0x5761907ffe90, buffer=0x7cb180028f10, features=<optimized out>, num_features=<optimized out>) at ../harfbuzz/src/hb-shaper-list.hh:47
#28 hb_shape_plan_execute (shape_plan=shape_plan@entry=0x576191a34f00, font=font@entry=0x5761907ffe90, buffer=buffer@entry=0x7cb180028f10, features=features@entry=0x7ffc9f073408, num_features=num_features@entry=1) at ../harfbuzz/src/hb-shape-plan.cc:452
#29 0x00007cb1946b3f31 in hb_shape_full (font=0x5761907ffe90, buffer=0x7cb180028f10, features=0x7ffc9f073408, num_features=1, shaper_list=<optimized out>) at ../harfbuzz/src/hb-shape.cc:150
#30 0x00007cb1969014fc in QTextEngine::shapeTextWithHarfbuzzNG (this=this@entry=0x5761917933d0, si=..., string=string@entry=0x57619a9e6b40, itemLength=itemLength@entry=1000, fontEngine=fontEngine@entry=0x57618d8c5400, itemBoundaries=..., kerningEnabled=kerningEnabled@entry=true, hasLetterSpacing=<optimized out>, fontFeatures=...) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextengine.cpp:1692
#31 0x00007cb196904ff8 in QTextEngine::shapeText (this=0x5761917933d0, item=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextengine.cpp:1485
#32 0x00007cb196936056 in QTextLine::layout_helper (this=0x7ffc9f073a10, maxGlyphs=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextlayout.cpp:1875
#33 0x00007cb1968fb5f5 in QTextDocumentLayoutPrivate::layoutBlock (this=this@entry=0x576194cff950, bl=..., blockPosition=blockPosition@entry=0, blockFormat=..., layoutStruct=layoutStruct@entry=0x7ffc9f073d80, layoutFrom=layoutFrom@entry=0, layoutTo=<optimized out>, previousBlockFormat=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:3510
#34 0x00007cb1968fc406 in QTextDocumentLayoutPrivate::layoutFlow (this=0x576194cff950, it=..., layoutStruct=0x7ffc9f073d80, layoutFrom=0, layoutTo=2147483647, width=...) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:3288
#35 0x00007cb1968f2bce in QTextDocumentLayoutPrivate::layoutFrame (this=this@entry=0x576194cff950, f=f@entry=0x576191b1d6b0, layoutFrom=layoutFrom@entry=0, layoutTo=layoutTo@entry=2147483647, frameWidth=..., frameWidth@entry=..., frameHeight=..., parentY=...) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:3029
#36 0x00007cb1968f317b in QTextDocumentLayoutPrivate::layoutFrame (this=0x576194cff950, f=0x576191b1d6b0, layoutFrom=0, layoutTo=2147483647, parentY=...) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:2919
#37 0x00007cb1968f6d0b in QTextDocumentLayout::doLayout (this=0x576191f8eb60, from=0, oldLength=oldLength@entry=0, length=2147483647) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:3838
#38 0x00007cb1968f79dd in QTextDocumentLayoutPrivate::ensureLayoutedByPosition (this=<optimized out>, position=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:4015
#39 QTextDocumentLayoutPrivate::ensureLayoutedByPosition (this=0x576194cff950, position=1000) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:4007
#40 QTextDocumentLayoutPrivate::layoutStep (this=this@entry=0x576194cff950) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:4021
#41 0x00007cb1968f7f58 in QTextDocumentLayout::documentChanged (this=this@entry=0x576191f8eb60, from=from@entry=0, oldLength=oldLength@entry=0, length=1002) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocumentlayout.cpp:3798
#42 0x00007cb19689d607 in QTextDocument::setPageSize (this=<optimized out>, size=...) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocument.cpp:1759
#43 QTextDocument::setTextWidth (this=<optimized out>, width=width@entry=306) at /usr/src/debug/qt6-base/qtbase/src/gui/text/qtextdocument.cpp:738
#44 0x00007cb197638424 in QQuickTextEdit::updateSize (this=this@entry=0x5761906698b0) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquicktextedit.cpp:3094
#45 0x00007cb19763ad15 in QQuickTextEdit::q_textChanged (this=0x5761906698b0) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquicktextedit.cpp:2910
#46 0x00007cb19764a0a7 in QQuickTextEdit::qt_metacall (this=0x5761906698b0, _c=<optimized out>, _id=60, _a=0x7ffc9f074358) at /usr/src/debug/qt6-declarative/build/src/quick/Quick_autogen/include/moc_qquicktextedit_p.cpp:1006
#47 0x00007cb195dd3c2b in doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4172
#48 0x00007cb19762accc in QQuickTextControl::textChanged (this=0x576194f9a280) at /usr/src/debug/qt6-declarative/build/src/quick/Quick_autogen/include/moc_qquicktextcontrol_p.cpp:316
#49 QQuickTextControlPrivate::setContent (this=0x5761921469c0, format=<optimized out>, text=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquicktextcontrol.cpp:314
#50 0x00007cb19763636b in QQuickTextControl::setHtml (this=<optimized out>, text=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquicktextcontrol.cpp:804
#51 QQuickTextEdit::setText (this=0x5761906698b0, text=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/quick/items/qquicktextedit.cpp:433
#52 0x00007cb197088ea3 in QQmlPropertyData::writeProperty (this=<optimized out>, target=<optimized out>, value=<optimized out>, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:344
#53 0x00007cb1970a86d0 in GenericBinding<10>::doStore<QString> (this=0x5761907dc8a0, value=..., pd=<optimized out>, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlbinding.cpp:284
#54 GenericBinding<10>::write (this=0x5761907dc8a0, result=..., isUndefined=<optimized out>, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlbinding.cpp:265
#55 0x00007cb1970a2de5 in QQmlBinding::doUpdate (this=0x5761907dc8a0, watcher=..., flags=..., scope=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlbinding.cpp:715
#56 0x00007cb1970a485d in QQmlBinding::update (this=0x5761907dc8a0, flags=...) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlbinding.cpp:165
#57 0x00007cb19713b460 in QQmlNotifier::emitNotify (endpoint=<optimized out>, a=0x0) at /usr/src/debug/qt6-declarative/qtdeclarative/src/qml/qml/qqmlnotifier.cpp:70
#58 0x00007cb195dd3462 in doActivate<false> (sender=0x576192f01a20, signal_index=3, argv=0x0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4036
#59 0x00007cb18c0319a9 in Kirigami::Platform::PlatformTheme::emitSignalsForChanges (this=0x576192f01a20, changes=4) at /usr/src/debug/kirigami/kirigami-6.16.0/src/platform/platformtheme.cpp:921
#60 0x00007cb18c032cef in Kirigami::Platform::PlatformThemeChangeTracker::~PlatformThemeChangeTracker (this=0x7ffc9f0761c0) at /usr/include/qt6/QtCore/qflags.h:146
#61 0x00007cb18c035e77 in Kirigami::Platform::PlatformThemePrivate::setDataColor (this=0x576191a42d70, theme=0x576192f01a20, color=Kirigami::Platform::PlatformThemeData::VisitedLinkColor, value=...) at /usr/src/debug/kirigami/kirigami-6.16.0/src/platform/platformtheme.cpp:363
#62 Kirigami::Platform::PlatformThemePrivate::setDataColor (this=0x576191a42d70, theme=0x576192f01a20, color=Kirigami::Platform::PlatformThemeData::VisitedLinkColor, value=...) at /usr/src/debug/kirigami/kirigami-6.16.0/src/platform/platformtheme.cpp:345
Comment 3 Timothy B 2025-08-16 23:47:52 UTC
I like how you worded the title and it, indeed, does give that scary feeling. However, do keep in mind that this also happens when the notification itself appears (i.e., before interacting with it) or opening the notifications popup that already has such similar notifications.