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

Linux X11 message boxes 32 lines or longer display newlines as vertical tabs #3016

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.9
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2018-10-12 12:06:32 +0000, Daniel Bokser wrote:

Created attachment 3366
screenshot

I am running into a bug where i have a fairly large which is longer than 31 lines. After line 31, newlines are replaced with the vertical tab character (shown as VT). I have this issue only on X11. It looks fine on Mac and Windows. I have attached a screenshot and sample program.

On 2018-10-12 12:07:30 +0000, Daniel Bokser wrote:

Created attachment 3367
sample program

On 2018-10-12 12:22:46 +0000, Daniel Bokser wrote:

Apologies, I was assuming that the latest LTS ubuntu had 2.0.8, when in fact it has 2.0.4. Putting this into waiting until I can test on 2.0.8 tonight

On 2018-10-13 02:16:19 +0000, Daniel Bokser wrote:

Confirmed this issue happens in 2.0.8 and the latest repo pull (2.0.9) on Ubuntu 16.04 LTS. Reopening...

On 2018-10-14 18:40:34 +0000, Daniel Bokser wrote:

Found the reason for this. In SDL_x11messagebox.c it looks like the maximum number of lines is 32

#define MAX_TEXT_LINES 32 /* Maximum number of text lines supported */

Increasing this value fixes my problem. I could not find any documented reason for this limit. The SDL_ShowMessageBox page does not document this limitation either.

What is the reason for this limit?

On 2018-10-15 04:47:21 +0000, Ryan C. Gordon wrote:

(In reply to Daniel Bokser from comment # 4)

What is the reason for this limit?

Probably an assumption that it would be more than anyone would need, since it specifies the size of a static array.

To be clear, 32 lines in a messagebox is probably more than one should put in a messagebox, but who am I to dictate absolute limits? This is fixed now, in https://hg.libsdl.org/SDL/rev/cf64a70ad02a

Thanks!

--ryan.

On 2018-10-15 11:57:11 +0000, Daniel Bokser wrote:

Thanks for the fix Ryan! Works perfect for me.

Yea, agreed that 32 lines should be more than enough for a message box, but I am currently using it as a stop-gap to display controls for my emulator until I have a proper UI.

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

1 participant