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

bug? corruption during (lots of) 24-bit ANSI escape codes #39

Closed
patsie75 opened this issue Mar 12, 2022 · 5 comments
Closed

bug? corruption during (lots of) 24-bit ANSI escape codes #39

patsie75 opened this issue Mar 12, 2022 · 5 comments

Comments

@patsie75
Copy link

I'm not very familliar with mlterm and only recently installed it to check compatibility with my awk-scripts, which output a lot of ANSI escape codes for 24-bit colors (i.e.: ESC[38;2;(r);(g);(b);48;2;(r);(g);(b)m )
These escape codes seem to cause semi-random corruption in mlterm's output.
An example can be found here: https://youtu.be/rXlc66Ymz_I
When outputting the same ANSI encoded content/file multiple times, the corruption seems to be semi-randomly displayed every time. The above video shows this by 'zcat' the same file multiple times in mlterm.

The used file (demo.frame.gz) with the ANSI encoded content, is attached to this bug-report.
demo.frame.gz

Please advise.

@patsie75
Copy link
Author

Any feedback at all is appreciated

@arakiken
Copy link
Owner

arakiken commented Apr 3, 2022

Thanks.
Sorry for replying late.
I fixed it -> 036c7f0

Even if you apply this patch, the screen gets corrupt if you select it with the mouse.
If you also want to fix this problem, specify --disable-compact-truecolor option to ./configure script in building mlterm.

Regards,

@patsie75
Copy link
Author

patsie75 commented Apr 3, 2022

No need to apologize, I'm happy that you are so active in working on this project! Thank you a lot.
Indeed the corruption is now gone. So that is good news! Thank you for that!

I did notice that because of your 'compact' use of true color, the color accuracy is less than optimal. See this screenshot for example with four different terminals and the output of the same program (awk-demo) at a similar point in time.
Screenshot from 2022-04-03 14-56-57-1
The top-left terminal is standard compiled mlterm from the latest master branch (with your fix) Here you can clearly see color-banding happening, but performance is good.
The top-right is mlterm master branch compiled with --disable-compact-truecolor. The color-banding is now gone and it looks color-accurate! The only issue is that performance of displaying large amounts of (true-color) ANSI escape codes has dropped dramatically. Sometimes more than 50%.
The bottom-left is Gnome Terminal (libvte based) and the bottom-right xterm. Both look color accurate and have great performance.

@arakiken
Copy link
Owner

arakiken commented Apr 3, 2022

Thanks.
"--vtcolor true" option improves accuracy.
I'll investigate the performance problem.

@patsie75
Copy link
Author

patsie75 commented Apr 3, 2022

Running mlterm with --vtcolor true really did the trick! color accuracy looks great and performance is 'good enough'. Mlterm is not as fast as Gnome Terminal or xterm, but it has a reasonable throughput (at least for my usecase :-) )
(Just in case you are interested in my usecase(s), you could try for example https://github.com/patsie75/awk-demo )
For now I will consider this report closed (the color bug has been solved). If you could squeeze some extra performance out of mlterm, I would love it, but won't blame you if have other priorities.

Thanks again for the help!

@patsie75 patsie75 closed this as completed Apr 3, 2022
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Apr 4, 2023
pkgsrc changes:
* make mlconfig.po installed properly (#66)
* remove local patches integrated into upstream

Upstream changes (noted in doc/en/ReleaseNote):

ver 3.9.3
* mlterm-wl supports xdg-decoration.
* Add --disable-compact-truecolor option to ./configure script.
* Add vte 0.68 API symbols to libvte compatible library.
* Add libvterm 0.2 API symbols to libvterm compatible library.
* Add --sdpr / simple_scrollbar_dpr option.
  (arakiken/mlterm#64)
* Set "COLORTERM=truecolor" environmental variable.
  (arakiken/mlterm#36)
* Update unicode property table (generated from UnicodeData.txt and
  EastAsianWidth.txt) to version 15.0.0.
* Support mosh-1.4.0.
* Merge patches:
  arakiken/mlterm#45.
  arakiken/mlterm#46.
  arakiken/mlterm#48.
  arakiken/mlterm#49.
  arakiken/mlterm#55. (Add --role / wm_role option)
  arakiken/mlterm#57.
  arakiken/mlterm#61.
  arakiken/mlterm#62.
  arakiken/mlterm#63.
* Bug fixes:
  Fix arakiken/mlterm#34.
  Fix arakiken/mlterm#35.
  Fix arakiken/mlterm#39.
  Fix arakiken/mlterm#44.
  Fix arakiken/mlterm#50.
  Fix arakiken/mlterm#51.
  Fix arakiken/mlterm#53.
  Fix https://twitter.com/isaki68k/status/1555895011991883783.
  Fix segfault in starting mlterm with --dyncomb and --otl.
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

No branches or pull requests

2 participants