Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure with 0.4.0 release when launching kakoune #1369

Closed
herrhotzenplotz opened this issue Dec 19, 2023 · 8 comments · Fixed by #1371
Closed

Assertion failure with 0.4.0 release when launching kakoune #1369

herrhotzenplotz opened this issue Dec 19, 2023 · 8 comments · Fixed by #1371

Comments

@herrhotzenplotz
Copy link
Contributor

I just built and tested the 0.4.0 release on FreeBSD:

$ contour version
QML debugging is enabled. Only use this in a safe environment.
Contour Terminal Emulator 0.4.0
$ hg id
c9c1208587ff default/release/tip release
$ uname -a
FreeBSD triton 14.0-RELEASE-p3 FreeBSD 14.0-RELEASE-p3 #3 fix/sennheiser-bt-headphones-n265403-264a2ccd2ec0: Sat Dec 16 23:48:57 CET 2023     nico@triton:/usr/obj/usr/src/amd64.amd64/sys/TRITON140 amd64
$ kak -version
Kakoune unknown
$

This is kakoune built from a git checkout (development version).

When launching it inside the freshly built contour, contour crashes with the following SIGABRT:

$ contour
QML debugging is enabled. Only use this in a safe environment.
Warning: Invalid audio device ((null):0, (null))
Warning: Failed to create a gst element for the audio device, using a default audio sink ((null):0, (null))
[error] freetype: Failed to set LCD filter. unimplemented feature
Debug[default]: sendKeyEvent:  75   "k"   QFlags<Qt::KeyboardModifier>(NoModifier) (/usr/home/nico/src/contour/src/contour/helper.cpp:142, bool contour::sendKeyEvent(QKeyEvent *, vtbackend::KeyboardEventType, TerminalSession &))
Debug[default]: sendKeyEvent:  75   "k"   QFlags<Qt::KeyboardModifier>(NoModifier) (/usr/home/nico/src/contour/src/contour/helper.cpp:142, bool contour::sendKeyEvent(QKeyEvent *, vtbackend::KeyboardEventType, TerminalSession &))
Debug[default]: sendKeyEvent:  16777220   "\r"   QFlags<Qt::KeyboardModifier>(NoModifier) (/usr/home/nico/src/contour/src/contour/helper.cpp:142, bool contour::sendKeyEvent(QKeyEvent *, vtbackend::KeyboardEventType, TerminalSession &))
[2023-12-19 18:33:48.456191.456191] [vt.parser] Unknown VT sequence: CSI > 4;1 m
Assertion failed: (parameterIndex < _parameters.count()), function param, file /usr/home/nico/src/contour/src/vtbackend/Sequence.h, line 317.
Abort trap (core dumped)
$

I haven't looked at any details yet - if you need any more information please let me know.

@christianparpart
Copy link
Member

Oh many many thanks for testing. Let's see if we can get that fixed before actually releasing 0.4.0. :)

@christianparpart
Copy link
Member

Assertion failed: (parameterIndex < _parameters.count()), function param, file /usr/home/nico/src/contour/src/vtbackend/Sequence.h, line 317.
Abort trap (core dumped)

It says "core dumped", do you happen to have a stack trace for me?

many thanks :)

@christianparpart
Copy link
Member

p.s.: you can also run contour like so:

contour debug vt.trace.sequence

and dump me that (past N lines), because the very last printed VT sequence should be the one that's causing this.

@herrhotzenplotz
Copy link
Contributor Author

debug log and lldb trace is here:

https://gist.githubusercontent.com/herrhotzenplotz/1d608331fe175c1337cdf4f845f2f644/raw/758a09aa25b649ea30b61a41179a076fa312cf4b/gistfile1.txt

I also found another minor unrelated issue, will create a quick PR for it.

@christianparpart
Copy link
Member

Ah very nice. Seems like kakoune is doing CSI 22 t I cannot find in ctlseqs.txt, that this should be by any means a valid CSI sequence (maybe @j4james knows?). I am sure what is meant is CSI 22 ; 0 t, so the not-found parameter defaulting to 0`. I'll be fixing this. Many thanks!

@j4james
Copy link

j4james commented Dec 19, 2023

I am sure what is meant is CSI 22 ; 0 t, so the not-found parameter defaulting to 0.

That would be my assumption too. According to both the ANSI and DEC documentation, any missing or empty parameters should be interpreted as their default value. And unless specified otherwise, a selective parameter would usually default to 0, and a numeric parameter would default to 1.

In this case, it's a selective parameter (you can think of it as an enum rather than an integer), so the default would be 0.

@j4james
Copy link

j4james commented Dec 19, 2023

Also, looking at the comments in the kakoune source, it was certainly their intention to save the window title.

https://github.com/mawww/kakoune/blob/83fb65aef5729167b47c6ec22a57e5bd6ac5a9ae/src/terminal_ui.cc#L1472

@christianparpart
Copy link
Member

Ah very nice. Many thanks @j4james :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants