Bug 493711

Summary: konsole crashes when resizing and displaying emoji fonts using vs16+zwj Unicode
Product: [Applications] konsole Reporter: Phil Hord <phil.hord>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: crash    
Priority: NOR    
Version: 24.08.1   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: backtrace from gdb

Description Phil Hord 2024-09-26 20:36:52 UTC
Created attachment 174121 [details]
backtrace from gdb

SUMMARY
konsole crashes when displaying emoji characters using the Unicode Emoji JWV sequences. http://www.unicode.org/reports/tr51/#Emoji_ZWJ_Sequences

STEPS TO REPRODUCE
1. Run this script in a konsole window:

    flag="\xf0\x9f\x8f\xb3"
    emojoin="\xef\xb8\x8f\xe2\x80\x8d"
    rainbow="\xf0\x9f\x8c\x88"
    for j in {0..500}; do
     printf "${flag}${emojoin}${rainbow}"
    done | LESS= less

2. Resize konsole window until it crashes. (Maximize works most reliably for me.)


OBSERVED RESULT
Konsole crashes.

Thread 1 "konsole" received signal SIGBUS, Bus error.
0x00007ffff7d511d7 in Konsole::TerminalDisplay::bidiMap (this=0x555555bcbb10, screenline=<optimized out>, line=..., log2line=<optimized out>, line2log=<optimized out>, shapemap=0x7fffffff9490, vis2line=0x7fffffff9c90, shaped=@0x7fffffff9291: true, shape=true, bidi=true) at ./src/terminalDisplay/TerminalDisplay.cpp:3360
Download failed: Invalid argument.  Continuing without source file ./obj-x86_64-linux-gnu/src/./src/terminalDisplay/TerminalDisplay.cpp.
3360    ./src/terminalDisplay/TerminalDisplay.cpp: No such file or directory.


EXPECTED RESULT
No crashing.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-45-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-10610U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 20UCS4TR00
System Version: ThinkPad X1 Yoga Gen 5

ADDITIONAL INFORMATION
Stacktrace generated using instructions from https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Procedure_gdb_and_debuginfod

I attached the stacktrace instead of pasting here because bugzilla things my post is spam.
Comment 1 Phil Hord 2024-09-26 20:39:53 UTC
I tried pasting my backtrace text in this comment, but bugzilla still rejects it as spam.

`Your comment has been automatically blocked as it is believed to contain spam. Please contact Sysadmin if you believe this to be incorrect.`

I don't know where to report this, so I'm reporting it here.