Bug 457920

Summary: writeToStream Assert triggers in recent master
Product: [Applications] konsole Reporter: Kurt Hindenburg <khindenburg>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: crash CC: me
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kurt Hindenburg 2022-08-15 15:31:58 UTC
I now get this quite a bit on macos (not sure if related to OS) - added debug statements

I'm not sure the steps to take as that seems random

konsole(64717)/default Konsole::Screen::writeToStream: writeToStream: startIndex: -517 ; _columns: 80 ; endIndex: -502
konsole(58787)/default Konsole::Screen::writeToStream: writeToStream:  -4 ; 0 ; -3 ; -49
Comment 1 ratijas 2022-08-18 22:08:06 UTC
I didn't hit the asserts, but for me I found that Screen::writeToStream writes incomplete part of a formatted selection. For example, when selecting `KPropertiesDialog::KPropertiesDialog` in a colored gdb backtrace, konsole only copies `KPropertiesDialog::K
` portion of it — and (suddenly!) a newline.
Comment 2 ratijas 2022-08-19 12:27:34 UTC
I'm going to add HTML output tests to the ScreenTest class. As a test data, I'll be using some ANSI formatted text, probably from gdb output, but it could be anything.
Comment 3 ratijas 2022-08-19 15:13:35 UTC
I don't know what has changed, but I can't reproduce the partial copy bug anymore :-\
Comment 4 Kurt Hindenburg 2022-08-25 19:57:46 UTC
Git commit 4e875cdfdd88fc86e181ad97825c390ea62ab0d7 by Kurt Hindenburg, on behalf of Matan Ziv-Av.
Committed on 25/08/2022 at 19:47.
Pushed by hindenburg into branch 'master'.

Prevent _replModeStart line number from becoming negative

Hopefully, this solves:
Related: bug 458015

M  +4    -2    src/Screen.cpp

https://invent.kde.org/utilities/konsole/commit/4e875cdfdd88fc86e181ad97825c390ea62ab0d7
Comment 5 Matan Ziv-Av 2022-09-02 09:03:23 UTC
Git commit 97171b59e694893b61a1f70c2998d6967070187a by Matan Ziv-Av.
Committed on 01/09/2022 at 12:48.
Pushed by tcanabrava into branch 'release/22.08'.

Prevent _replModeStart line number from becoming negative

Hopefully, this solves:
Related: bug 458015

M  +4    -2    src/Screen.cpp

https://invent.kde.org/utilities/konsole/commit/97171b59e694893b61a1f70c2998d6967070187a