Bug 492465 - konsole breaks after right click inside new tab
Summary: konsole breaks after right click inside new tab
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-31 17:43 UTC by alanas.00
Modified: 2024-11-06 00:09 UTC (History)
0 users

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


Attachments
broken konsole (139.77 KB, image/png)
2024-08-31 17:43 UTC, alanas.00
Details
attachment-3530878-0.html (1.39 KB, text/html)
2024-09-07 16:57 UTC, tcanabrava
Details
after attach.png (52.72 KB, image/png)
2024-09-07 20:16 UTC, alanas.00
Details
write syscall bt.txt (13.29 KB, text/plain)
2024-09-07 20:17 UTC, alanas.00
Details
after del continue.png (76.88 KB, image/png)
2024-09-07 20:18 UTC, alanas.00
Details
sigsegv bt.txt (16.32 KB, text/plain)
2024-09-07 20:19 UTC, alanas.00
Details
attachment-3569405-0.html (1.07 KB, text/html)
2024-09-07 20:20 UTC, tcanabrava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alanas.00 2024-08-31 17:43:20 UTC
Created attachment 173178 [details]
broken konsole

STEPS TO REPRODUCE
1. open konsole
2. click New Tab
3. right click inside terminal

OBSERVED RESULT
inconsistently one or more of:
• context menu works like EXPECTED RESULT
• context menu appears and disappears
• all buttons on left (Copy Paste Find...) disappear (see attachment)
• weird stuff appears inside terminal top left (see attachment)
• konsole crashes

EXPECTED RESULT
normal context menu (as if you didn't click "New tab" before)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon Unstable Edition
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
konsole version: 24.11.70

ADDITIONAL INFORMATION
commit that introduced bug: https://invent.kde.org/utilities/konsole/-/commit/9c72d6301dead5ce1e69f79c4416d8d12cf0d2d4
Comment 1 alanas.00 2024-09-07 06:28:17 UTC
since commit https://invent.kde.org/utilities/konsole/-/commit/c5e3aa26d3723ec9db9af3eb9b7da4c05359d5fd bug doesn't happen with old STEPS TO REPRODUCE but is not fixed!

new STEPS TO REPRODUCE:
1. open konsole
2. run `xxd /dev/urandom` inside terminal (tab 1)
3. click New Tab
4. right click inside terminal (tab 2)
Comment 2 tcanabrava 2024-09-07 16:57:24 UTC
Created attachment 173410 [details]
attachment-3530878-0.html

thanks.
can you provide a backtrace? it really helps ke find the issue.
im the author of the previous patch.


On Sat, 7 Sep 2024 at 07:28 <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=492465
>
> --- Comment #1 from alanas.00@mail.ru ---
> since commit
>
> https://invent.kde.org/utilities/konsole/-/commit/c5e3aa26d3723ec9db9af3eb9b7da4c05359d5fd
> bug doesn't happen with old STEPS TO REPRODUCE but is not fixed!
>
> new STEPS TO REPRODUCE:
> 1. open konsole
> 2. run `xxd /dev/urandom` inside terminal (tab 1)
> 3. click New Tab
> 4. right click inside terminal (tab 2)
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 3 alanas.00 2024-09-07 20:16:20 UTC
better STEPS TO REPRODUCE that I did (very consistent):
1. open konsole
2. run `sleep 8` inside terminal (tab 1)
3. wait 4 (ish) seconds
4. click New Tab
5. wait until tab 1 title changes "s : sleep" → "s : bash"
6. right click inside terminal (tab 2)
7. click outside context menu

custom compiled with -O0 -ggdb3 stuff:
kconfigwidgets: https://invent.kde.org/frameworks/kconfigwidgets/-/commit/3f78f559a7abe69b27181e9c7ff4655759a42bc3
qt 6.7.2: https://download.qt.io/official_releases/qt/6.7/6.7.2/submodules/qtbase-everywhere-src-6.7.2.tar.xz
konsole: https://invent.kde.org/utilities/konsole/-/commit/e556e66331363e63e3503d0cd56232492e4fc48e

I attach gdb (in telnet session not visible on screen) (between steps 5 and 6) ("after attach.png")
I set breakpoint for writing to stderr (`catch syscall 1` and `condition 1 $rdi==2`)
`continue`
I right click inside konsole's terminal (step 6)
gdb breakpoint hit (backtrace (`bt`): "write syscall bt.txt")
I delete breakpoint (`del`)
`continue`
konsole context menu opened ("after del continue.png")
I click outside context menu (step 7)
konsole gets SIGSEGV signal (backtrace (`bt`): "sigsegv bt.txt")

I will make attachments later
Comment 4 alanas.00 2024-09-07 20:16:53 UTC
Created attachment 173414 [details]
after attach.png
Comment 5 alanas.00 2024-09-07 20:17:43 UTC
Created attachment 173415 [details]
write syscall bt.txt
Comment 6 alanas.00 2024-09-07 20:18:36 UTC
Created attachment 173416 [details]
after del continue.png
Comment 7 alanas.00 2024-09-07 20:19:11 UTC
Created attachment 173417 [details]
sigsegv bt.txt
Comment 8 tcanabrava 2024-09-07 20:20:49 UTC
Created attachment 173418 [details]
attachment-3569405-0.html

ok. i think i know whats going on.
ill try a better fix for this tomorrow.


On Sat, 7 Sep 2024 at 21:19 <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=492465
>
> --- Comment #7 from alanas.00@mail.ru ---
> Created attachment 173417 [details]
>   --> https://bugs.kde.org/attachment.cgi?id=173417&action=edit
> sigsegv bt.txt
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 9 alanas.00 2024-10-07 09:35:17 UTC
I think I fixed it: https://invent.kde.org/utilities/konsole/-/merge_requests/1033
Comment 10 Kurt Hindenburg 2024-11-06 00:09:28 UTC
Git commit 1c3eaa8f15ff0858a32d1116426a69a09ccc5c21 by Kurt Hindenburg, on behalf of BZZZZ DZZZZ.
Committed on 06/11/2024 at 00:09.
Pushed by hindenburg into branch 'master'.

Fix crashes with context menus

Also redraw tabs better when tab color changes

M  +0    -3    src/session/SessionController.cpp
M  +2    -0    src/widgets/DetachableTabBar.cpp

https://invent.kde.org/utilities/konsole/-/commit/1c3eaa8f15ff0858a32d1116426a69a09ccc5c21