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

Notcurses hangs with tmux (if built with sixel support) #2736

Open
rockorager opened this issue Oct 28, 2023 · 13 comments
Open

Notcurses hangs with tmux (if built with sixel support) #2736

rockorager opened this issue Oct 28, 2023 · 13 comments
Assignees
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Milestone

Comments

@rockorager
Copy link

rockorager commented Oct 28, 2023

tmux recently added sixel support, and in doing so modified their DA1 response from CSI ? 1 ; 2 c to CSI ? 1 ; 2 ; 4 c. In this build, notcurses hangs (ie notcurses-info hangs). I assume this is an issue with the DA1 parser. the xterm ctlseqs docs don't show that a CSI ? 1 ; 2 c response can have param, but the VT220 manual sure seems to imply that a DA1 response can consist of any number of params.

$ export | egrep 'LANG|LC_CTYPE|TERM'
COLORTERM truecolor
GDM_LANG en_US.UTF-8
LANG en_US.UTF-8
TERM foot

nc version 3.0.9

foot 1.16.2

tmux next-3.4 (built off master branch)
tmux TERM tmux-256color

@rockorager rockorager added the bug Something isn't working label Oct 28, 2023
@dankamongmen dankamongmen self-assigned this Oct 28, 2023
@dankamongmen dankamongmen added this to the 3.1.0 milestone Oct 28, 2023
@dankamongmen dankamongmen added the bitmaps bitmapped graphics (sixel, kitty, mmap) label Oct 28, 2023
@dankamongmen
Copy link
Owner

thanks for letting me know about this! this seems pretty serious. do you know which version of tmux added support? notcurses-info seems to work in tmux within kitty using tmux 3.3a:

[schwarzgerat](1) $ tmux -V
tmux 3.3a
[schwarzgerat](0) $ 

@rockorager
Copy link
Author

It's not released yet, but will be version 3.4

tmux/tmux@dfbc6b1

@dankamongmen
Copy link
Owner

oh great, maybe we can stay ahead of it; that would be sweet

@rockorager
Copy link
Author

Also FYI, they did not implement a response to XTSMGRAPHICS, but are open to a PR

@dankamongmen
Copy link
Owner

Also FYI, they did not implement a response to XTSMGRAPHICS, but are open to a PR

that's kinda weird. if you're not opposed to the idea, it's a pretty simple thing to do afaik. i'm currently readying my first novel for publication, on top of a pretty intense (this year) day job, and probably will not be writing tmux code personally, especially as i don't use it. but i wholeheartedly encourage someone else to do so!

which, hrmmm, i guess i just answered my own question from above.

@rockorager
Copy link
Author

Hmm, unfortunately they seem to unilaterally respond with sixel support, regardless of the underlying terminal's support

@rockorager
Copy link
Author

that's kinda weird. if you're not opposed to the idea, it's a pretty simple thing to do afaik. i'm currently readying my first novel for publication, on top of a pretty intense (this year) day job, and probably will not be writing tmux code personally, especially as i don't use it. but i wholeheartedly encourage someone else to do so!

Sorry, I didn't mean to imply you need to fix it :). I don't have plans to do it currently but added it to a "someday, maybe" list.

@rockorager
Copy link
Author

Ok with tmux responding unilaterally with sixel support, notcurses will be broken on non-sixel terminals. The output you get is this:

SIXEL IMAGE (49x16)++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++

I think they should instead respond without sixel support if the underlying terminal doesn't have it, so that at east notcurses can fall back to a sex/quad blitter. I think I'll make a new issue over there about that...

@dankamongmen
Copy link
Owner

Ok with tmux responding unilaterally with sixel support, notcurses will be broken on non-sixel terminals. The output you get is this:

SIXEL IMAGE (49x16)++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++

I think they should instead respond without sixel support if the underlying terminal doesn't have it, so that at east notcurses can fall back to a sex/quad blitter. I think I'll make a new issue over there about that...

yeah if the sixel can't be displayed, they ought not indicate support. ideally they would query the terminal with XTSMGRAPHICS on startup/connection. what happens if you connect to a running tmux with two different terminal types? is that just unadvised?

@dankamongmen
Copy link
Owner

Sorry, I didn't mean to imply you need to fix it :). I don't have plans to do it currently but added it to a "someday, maybe" list.

oh you didn't; i just want to fix things by default lol

@dankamongmen
Copy link
Owner

note that this fucks anything using XTSMGRAPHICS and expecting it to reflect the real universe, not just notcurses

@kmarius
Copy link

kmarius commented Feb 19, 2024

Archlinux is shipping tmux 3.4 with sixel support as of last week and I am now hitting this issue.

@dankamongmen
Copy link
Owner

i'll look into this ASAP. thanks for bumping it, @kmarius .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants