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]: ICU Layouter crash #10790

Closed
PeterN opened this issue May 8, 2023 · 2 comments · Fixed by #10791
Closed

[Bug]: ICU Layouter crash #10790

PeterN opened this issue May 8, 2023 · 2 comments · Fixed by #10791

Comments

@PeterN
Copy link
Member

PeterN commented May 8, 2023

Version of OpenTTD

git master 878c5d8

Expected result

No crash :-)

Actual result

openttd: ../src/gfx_layout_icu.cpp:498: virtual std::unique_ptr<const ICUParagraphLayout::Line> ICUParagraphLayout::NextLine(int): Assertion `run.length > new_partial_length' failed.

Steps to reproduce

  1. Set medium font to "DejaVu Sans". (I'm using default font size, 2x interface.)
  2. Open NewGRF settings window and select a NewGRF in either the upper or lower list.
  3. Crash.
@PeterN
Copy link
Member Author

PeterN commented May 8, 2023

My immediate thought is there a long string (MD5Sum!) that doesn't have any place to wrap, but that might just be coincidence.

@TrueBrain
Copy link
Member

It happens during the drawing of MD5sum, yes. But it seems the reason why is because I kinda misunderstood how harfbuzz returns clusters. I expected the first char to be in the first cluster, but this doesn't always seems to be the case. Need to look a bit deeper what is actually going on here.

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

Successfully merging a pull request may close this issue.

2 participants