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] "input buffer overflow, can't enlarge buffer because scanner uses REJECT" when using error dialog for large text #1855

Closed
2 tasks done
itspec-ru opened this issue Jun 15, 2023 · 7 comments
Labels

Comments

@itspec-ru
Copy link

itspec-ru commented Jun 15, 2023

Rofi version (rofi -v)

Version: 1.7.5

Configuration

https://gist.github.com/itspec-ru/0c5cb29341c5e51bc2a1deb5aaf68c60

Theme

https://gist.github.com/itspec-ru/9fa95059076302b65602461079938966

Timing report

No response

Launch command

rofi -theme bw -markup -e "${text}"

Step to reproduce

preparing Pango Markup Text of a sufficiently large size

text=$(curl "http://wttr.in/Тольятти?lang=ru" | sed "s/[ \t]*$//" | ansifilter --ignore-csi --pango --font="Liberation Mono" --font-size=15)

using error dialog for display text

rofi -theme bw -markup -e "${text}" -theme-str '* {font: "Liberation Mono 15";} window {fullscreen: false; background-color: rgba ( 0, 0, 0, 0.9 ); location: south east; anchor: south east; width:80%; y-offset:-30;}'

Expected behavior

Some time ago it worked and broke after the update.
2020-01-08_12_39_08

Actual behavior

an error has occurred
input buffer overflow, can't enlarge buffer because scanner uses REJECT

Additional information

If the same text is first output to a file and truncated, the program will display it correctly.

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version
@itspec-ru itspec-ru added the bug label Jun 15, 2023
@DaveDavenport
Copy link
Collaborator

That is a lot of text for an error box, a use case I never expected.
I look at fixing it.

@itspec-ru
Copy link
Author

It worked in 2020 and after some update stopped working.

@DaveDavenport
Copy link
Collaborator

I think we need a more fundamental fix for this. Passing > 14kbyte as an argument is not the best way to do this.

maybe rofi -e - will read the content from stdin instead, allowing more input.

@DaveDavenport
Copy link
Collaborator

rofi -e - now reads from stdin.

@itspec-ru
Copy link
Author

itspec-ru commented Jun 15, 2023

Thanks!
Now all works perfect.

I tested both cases. And they both work.

text=$(curl "http://wttr.in/Тольятти?lang=ru" | sed "s/[ \t]$//" | ansifilter --ignore-csi --pango --font="Liberation Mono" --font-size=15)
rofi -theme bw -markup -e "${text}" -theme-str '
{font: "Liberation Mono 15";} window {fullscreen: false; background-color: rgba ( 0, 0, 0, 0.9 ); location: south east; anchor: south east; width:80%; y-offset:-30;}'

works after commit 635fbd0

curl "http://wttr.in/Тольятти?lang=ru" | sed "s/[ \t]$//" | ansifilter --ignore-csi --pango --font="Liberation Mono" --font-size=15
| rofi -theme bw -markup -e - -theme-str '
{font: "Liberation Mono 15";} window {fullscreen: false; background-color: rgba ( 0, 0, 0, 0.9 ); location: south east; anchor: south east; width:80%; y-offset:-30;}'

works after commit 7814da7

@DaveDavenport
Copy link
Collaborator

Thanks for testing.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants