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

Crash on startup with certain font settings #5711

Closed
DorpsGek opened this issue Aug 16, 2013 · 6 comments
Closed

Crash on startup with certain font settings #5711

DorpsGek opened this issue Aug 16, 2013 · 6 comments
Labels
component: ICU Issue caused by problems with ICU layout flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Terkhen opened the ticket and wrote:

OpenTTD r25723 crashes on startup when using Windows 7 x64 with the attached configuration files (the configuration files are from before the implementation of the new windows.cfg file and therefore it is not included). I'm also attaching the generated crash files.

EDIT: I managed to reproduce the crash just by using the openttd.cfg file generated by OpenTTD and making the following changes:

small_font = Calibri
medium_font = Calibri
large_font = Calibri
mono_font =
small_aa = true
medium_aa = true
large_aa = true
mono_size = 0

Attachments

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/5711
@DorpsGek
Copy link
Member Author

frosch wrote:

"mono_size = 0" looks weird for sure.
So, is the crash triggered by "Calibri" or by the size 0 ?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5711#comment12524

@DorpsGek
Copy link
Member Author

frosch wrote:

Backtrace is likely not useful:

00000000`001ce300 00000001`3fade519 : 00000000`0de4d5b0 00000000`029ac070 00000000`00000000 00000000`0de4d5b0 : openttd!icu_51::ParagraphLayout::nextLine+0x44
00000000`001ce330 00000001`3fada3fd : 00000000`001ce4d8 00000000`001ce532 00000000`7fffffff 00000001`0000000c : openttd!Layouter::Layouter+0x695 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\gfx_layout.cpp @ 506]
00000000`001ce4a0 00000001`3fada48b : 00000000`0de48500 00000001`406e7c40 00000000`000000a1 00000000`000003ff : openttd!GetStringBoundingBox+0x31 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\gfx.cpp @ 692]
00000000`001ce500 00000001`3fb42a67 : 00000000`0de48810 00000000`029df520 00000000`0de487a0 00000000`0de487a0 : openttd!GetStringBoundingBox+0x27 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\gfx.cpp @ 708]
00000000`001ced30 00000001`3fb405d5 : 0000000e`00000000 00000000`0de48500 00000000`029daf60 00000001`3fb3fc0e : openttd!NWidgetLeaf::SetupSmallestSize+0x2c7 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\widget.cpp @ 2325]
00000000`001ceda0 00000001`3fb47711 : 00000000`029dca60 00000000`00000000 00000000`00000000 00000000`00000013 : openttd!NWidgetVertical::SetupSmallestSize+0x59 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\widget.cpp @ 1294]
00000000`001cede0 00000001`3fb7f74a : 00000000`029dca60 00000000`029dca60 00000000`00000001 00000000`00000000 : openttd!Window::FinishInitNested+0xa5 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\window.cpp @ 1749]
00000000`001cee30 00000001`3fad8fe6 : 00000000`029dca60 00000000`0de41830 00000000`00000000 00000000`00000000 : openttd!SetupColoursAndInitialWindow+0x24e [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\main_gui.cpp @ 556]
00000000`001cee90 00000001`3fb08401 : 00000000`00000000 00000000`001cefe0 00000000`024103b0 00000000`00000007 : openttd!GenerateWorld+0x1a6 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\genworld.cpp @ 320]
00000000`001ceee0 00000001`3fd7dfa7 : 00000000`00000000 00000000`001cf1f0 00000000`00000000 00000000`00000000 : openttd!openttd_main+0xead [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\openttd.cpp @ 849]
00000000`001cf1d0 00000001`3fe6a5b4 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : openttd!WinMain+0x13f [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w64bit\src\os\windows\win32.cpp @ 452]


This comment was imported from FlySpray: https://bugs.openttd.org/task/5711#comment12526

@DorpsGek
Copy link
Member Author

Terkhen wrote:

Thanks for the hints :)

It seems that the crash is triggered by Calibri. The following settings do not produce a crash, but they will if Arial is changed to Calibri:

small_font = Arial
medium_font = Arial
large_font = Arial
small_size = 12
medium_size = 16
large_size = 22
small_aa = true
medium_aa = true
large_aa = true
mono_font =
large_mono = 10
mono_aa = false
mono_size = 10

I also tried to disable antialiasing with Calibri, but the game still crashed. In case that the spanish Ñ was causing the crash, I switched to English and relaunched the game while using Calibri, but it crashed too.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5711#comment12558

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Problem is in the ICU library; using a different version makes the problem go away.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5711#comment12759

@DorpsGek
Copy link
Member Author

Rubidium wrote:

The problem is related to the font.

As you can see on e.g. https://bbs.archlinux.org/viewtopic.php?id=165528 the Calibri font caused problems from a particular version of ICU. That's, as far as I know, roughly the version where they beefed up their handling of fonts. Now it thinks that font is bad for some reason. Maybe it's solved in a newer version of ICU, but that yet needs to be tested.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5711#comment12782

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r26017


This comment was imported from FlySpray: https://bugs.openttd.org/task/5711

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@andythenorth andythenorth added the component: ICU Issue caused by problems with ICU layout label Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ICU Issue caused by problems with ICU layout flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

2 participants