Giter Site home page Giter Site logo

Comments (4)

TrueBrain avatar TrueBrain commented on June 2, 2024

Stacktrace:

 	[Inline Frame] openttd.exe!std::_WChar_traits<wchar_t>::length(const wchar_t *) Line 259	C++
 	[Inline Frame] openttd.exe!std::wstring::{ctor}(const wchar_t * const _Ptr) Line 2546	C++
 	openttd.exe!Win32FontCache::SetFontSize(int pixels=10) Line 195	C++
 	openttd.exe!Win32FontCache::Win32FontCache(FontSize fs, const tagLOGFONTW & logfont={...}, int pixels=10) Line 131	C++
 	openttd.exe!LoadWin32Font(FontSize fs, const tagLOGFONTW & logfont={...}, unsigned int size=10, const char * font_name=0x0000005b2309c520) Line 378	C++
 	openttd.exe!LoadWin32Font(FontSize fs=FS_MONO, const std::string & file_name, unsigned int size=10) Line 435	C++
 	openttd.exe!TryLoadDefaultTrueTypeFont(FontSize fs=FS_MONO) Line 185	C++
 	openttd.exe!InitFontCache(bool monospace) Line 209	C++
 	openttd.exe!GameOptionsWindow::OnClick(Point pt, int widget, int click_count=1) Line 770	C++
 	openttd.exe!DispatchLeftClickEvent(Window * w=0x0000005b48263e70, int x=287, int y=127, int click_count=1) Line 733	C++
 	openttd.exe!MouseLoop(MouseClick click=MC_LEFT, int mousewheel=0) Line 2844	C++
 	openttd.exe!HandleMouseEvents() Line 2947	C++
 	openttd.exe!WndProcGdi(HWND__ * hwnd=0x00000000003c0376, unsigned int msg=513, unsigned __int64 wParam=1, __int64 lParam=20710145) Line 445	C++

from openttd.

PeterN avatar PeterN commented on June 2, 2024

Line 195 is this->fontname = FS2OTTD((LPWSTR)((BYTE *)otm + (ptrdiff_t)otm->otmpFaceName));

otm comes from GetOutlineTextMetrics(), so this suggests to me that a bitmap font is selected, but we assume it is an outline font... Or something is fishy with its name.

from openttd.

glx22 avatar glx22 commented on June 2, 2024

otmSize seems to be 0, would mean GetOutlineTextMetrics() failed but we expect it to never fail.

from openttd.

glx22 avatar glx22 commented on June 2, 2024

@Air118 are you able to reproduce it reliably on your system? As I'm unable to reproduce it on mine, but there is a test build with a possible fix in #12406 (comment).

from openttd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.