Have you ever tried to cat a large binary file under a very standard bash even without tmux?
Sooner or later it gets borked and you have to restart bash or at least issue the "reset" command.
So maybe in your specific case the bash eats it and tmux doesnt, but that's not the root of the problem.
The problem is that trying to display unescaped binary data in a shell is a bad idea.
 
Good luck with your project though!
 
Cheers,
              Tobias
 
Gesendet: Sonntag, 01. August 2021 um 11:29 Uhr
Von: "Rickard Carlsson" <[email protected]>
An: "tmux-users" <[email protected]>
Betreff: Re: Julia script stops in tmux but not outside of tmux
Hey Andreas
 
Thanks for the thorough answer. I guess I wouldn't expect tmux to interpret any of the output as input.
Sounds like I am wrinting a small filter or continuing this project outside of tmux for now then. 
 
Thanaks for the help!
Regards,
Rickard
 
söndag 1 augusti 2021 kl. 10:12:34 UTC+2 skrev [email protected]:
On 31.07.21 12:33, Rickard Carlsson wrote:
> When I run the following julia script in tmux it just stops on the print
> statement on the 39th and 40th iteration.

The line starting with "40 Message" contains an undefined/never-ending
ANSI escape sequence:

$ grep -a '^40 Message' output | hexdump -C
00000000 34 30 20 4d 65 73 73 61 67 65 3a 20 33 1f 1f 1b |40 Message: 3...|
00000010 19 1e 17 50 3d 33 57 03 50 1c 19 1b 15 50 11 50 |...P=3W.P....P.P|
00000020 00 1f 05 1e 14 50 1f 16 50 12 11 13 1f 1e 0a |.....P..P......|
0000002f

The byte 0x1b (last one in the first line) starts the escape sequence
("ESC["). But the following bytes (0x19, 0x1e, 0x17) are outside the
allowed values and tmux seems to ignore them.
It then comes across 0x50 which is the control code for starting a device
control string (DCS). Now it collects all the rest of the bytes until it
finds the string terminator (ST, "ESC[\" or 0x1b 0x5c). But there is no
such sequence in the rest of your output so there's nothing else to output.

Here are some demo strings which should explain tmux's behavior:

$ echo -e '\x1b\x12\x13foobar'
oobar

(0x12 and 0x13 are ignored, ESC[f does nothing, rest is output)

$ echo -e '\x1b\x12\x50foobar'

(no output because 0x50 starts a never ending DCS)

$ echo -e '\x1b\x12\x50foobar\x1b\x5cHello'
Hello

(everything between 0x50 and 0x1b 0x5c is interpreted as DCS (which
probably does nothing) and the rest is output)

In general I don't think you can expect any reasonable behavior if you
interpret random binary data as text.

Bye, Andreas

 

--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/52404ff1-ab9a-4541-89d9-54caffabc330n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/trinity-cbfb65c2-75f6-452e-adbe-7c4f9992ff3b-1627816279750%403c-app-gmx-bap64.

Reply via email to