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

Rendering glitches when switching tabs #366

Closed
alxgnon opened this issue Nov 24, 2021 · 8 comments
Closed

Rendering glitches when switching tabs #366

alxgnon opened this issue Nov 24, 2021 · 8 comments
Labels

Comments

@alxgnon
Copy link

alxgnon commented Nov 24, 2021

When switching tabs, I get visual glitches that stick around until I resize the window.

I've tracked down the specific commit where this issue appeared. This issue has appeared since 33df77e .

Screenshot_2021-11-24_13-19-59

@osa1
Copy link
Owner

osa1 commented Nov 24, 2021

Thanks for reporting and tracking down the commit.

I'm surprised that this started with 33df77e, I don't see anything in that commit that could cause something like this.

Is it possible for you to give instructions to replicate the problem?

I reverted that commit in branch revert_33df77e. Could you please try that branch and let me know if the problem really disappears when that commit is reverted?

@osa1 osa1 added the bug label Nov 24, 2021
@alxgnon
Copy link
Author

alxgnon commented Nov 24, 2021

Everything works fine on the revert branch. This shows that the specific commit is the source of the problem.

Terminal emulator: Alacritty
Server: ZNC

Steps to Reproduce:

  1. Launch tiny to connect to a ZNC instance.
  2. Use alt-2 to switch to the server tab.
  3. Run /msg *backlog #channel 50 to fetch the backlog.
  4. Use alt-3 to switch to the first channel.

Expected behaviour:
The channel contents are printed cleanly with no visual artifacts.

Actual behaviour:
The channel buffer contains garbage characters from the previous tab. The garbage is found at the end of lines that are shorter then the ones from the previous tab.

I was not able to reproduce this bug without running the backlog command on ZNC.

Edit: You need to set up a ZNC instance with the backlog plugin enabled, and you must connect it to at least one channel in order to test out this bug with these instructions. There might be another way to reproduce this bug, I might look into the raw data output to see what special characters might be causing this to happen.

@osa1
Copy link
Owner

osa1 commented Nov 25, 2021

Thanks for the details. I installed ZNC, installed backlog plugin, connected to irc.oftc.net #tiny, and tried your commands. Probably because I don't have any backlog, it doesn't cause any problems. I also tried the same thing in alacritty instead of my default terminal.

Just to understand this better, alt-3 is not the backlog channel, right? And if you skip step (3) and do alt-3, it works fine?

So you need to create the backlog channel, but don't need to switch to it?

In the screenshot you don't have a *backlog channel, but if I run /msg *backlog #channel 50 it creates a *backlog tab in tiny. Why do you not have the tab?

I think we should be able to debug this using tiny debug logs. Could you please try these and share the results?

  • Build tiny: cargo build
  • Make sure you have log_dir set in ~/.config/tiny/config.yml: log_dir: '/home/<user>/tiny_logs'
  • Clear old debug logs (if any): rm <tiny log directory>/tiny_debug_logs.txt
  • Run tiny: TINY_LOG=debug ./target/debug/tiny
  • Run your repro, see the glitches, close tiny

Now if you look at <tiny log directory>/tiny_debug_logs.txt, you will see the parsed messages coming from znc. If the problem starts happening after /msg *backlog #channel 50, you should see some messages coming from user znc@znc.in. Some of those messages should have some IRC formatting characters or ASCII control characters. Some of those should be the issue. If you could share some of the messages (make sure to redact text parts) we should be able to debug this.

@alxgnon
Copy link
Author

alxgnon commented Nov 25, 2021

alt-3 is the first channel I am connected to in the server. If I don't fetch the backlog, everything seems to be fine.(?) Haven't seen what happens if I let the screen fill with text naturally.

The reason I didn't have a backlog tab in the screenshot is because, usually I call an alias for the backlog command, and when I do so it doesn't open the *backlog plugin chat buffer.

This is what I got for the logs. I edited all the messages to remove the text and names. I didn't find any strange control characters or anything.
tiny_debug_logs.txt

I don't see anything that could help in the logs.

@osa1
Copy link
Owner

osa1 commented Nov 25, 2021

Thanks @alxgnon, I figured it out from the log file you shared: it's the new line characters znc backlog plugin is sending.

Interestingly, when I tried it it didn't add new line to the end of the messages. Maybe because they fixed it? I installed it from the source (current master branch).

Could you please try the branch issue_366 and let me know if it fixes the issue?

@osa1
Copy link
Owner

osa1 commented Nov 25, 2021

@alxgnon just pushed one more commit -- I forgot to remove a debug print in the previous version.

@alxgnon
Copy link
Author

alxgnon commented Nov 25, 2021

Works!

@osa1 osa1 closed this as completed in 2c723f6 Nov 25, 2021
@osa1
Copy link
Owner

osa1 commented Nov 25, 2021

Fix is now in master :-)

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

No branches or pull requests

2 participants