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

Assertion failed at line 82 of ..\src\fontcache.cpp: IsPrintable(key) #5829

Closed
DorpsGek opened this issue Dec 15, 2013 · 9 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

foobar opened the ticket and wrote:

This happened on the main menu while trying to open Game Settings.
r26160 on Win7 x64

Attachments

Reported version: trunk
Operating system: Windows


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

Rubidium wrote:

KERNELBASE.dll!RaiseException() + 0x3d bytes
openttd.exe!raise(int signum) Line 593 C
openttd.exe!abort() Line 81 C
openttd.exe!error(const char * s, ...) Line 123 C++
openttd.exe!SpriteFontCache::MapCharToGlyph(unsigned int key) Line 82 + 0x43 bytes C++
openttd.exe!icu_51::LEFontInstance::canDisplay() + 0xa bytes C++
openttd.exe!icu_51::MultipleSubstitutionSubtable::process() + 0x63 bytes C++
openttd.exe!icu_51::GlyphSubstitutionLookupProcessor::applySubtable() + 0x121 bytes C++
openttd.exe!icu_51::LookupProcessor::process() + 0x1b8 bytes C++
openttd.exe!icu_51::GlyphSubstitutionTableHeader::process() + 0xb7 bytes C++
openttd.exe!icu_51::LayoutEngine::characterProcessing() + 0x332 bytes C++
openttd.exe!icu_51::LayoutEngine::computeGlyphs() + 0xb4 bytes C++
openttd.exe!icu_51::LayoutEngine::layoutChars() + 0xc0 bytes C++
openttd.exe!icu_51::ParagraphLayout::ParagraphLayout() + 0x457 bytes C++
openttd.exe!Layouter::Layouter(const char * str, int maxw, TextColour colour, FontSize fontsize) Line 659 + 0x13b bytes C++
openttd.exe!GetStringHeight(const char * str, int maxw, FontSize fontsize) Line 541 + 0x16 bytes C++
openttd.exe!GetStringHeight(unsigned short str, int maxw) Line 556 C++
openttd.exe!GameOptionsWindow::UpdateWidgetSize(int widget, Dimension * size, const Dimension & padding, Dimension * fill, Dimension * resize) Line 348 + 0xc bytes C++
openttd.exe!NWidgetLeaf::SetupSmallestSize(Window * w, bool init_array) Line 2367 C++
openttd.exe!NWidgetVertical::SetupSmallestSize(Window * w, bool init_array) Line 1299 C++
openttd.exe!NWidgetBackground::SetupSmallestSize(Window * w, bool init_array) Line 1753 C++
openttd.exe!NWidgetVertical::SetupSmallestSize(Window * w, bool init_array) Line 1299 C++
openttd.exe!NWidgetBackground::SetupSmallestSize(Window * w, bool init_array) Line 1753 C++
openttd.exe!NWidgetVertical::SetupSmallestSize(Window * w, bool init_array) Line 1299 C++
openttd.exe!Window::FinishInitNested(int window_number) Line 1745 + 0x91 bytes C++
openttd.exe!ShowGameOptions() Line 648 + 0x8e bytes C++
openttd.exe!SelectGameWindow::OnClick(Point pt, int widget, int click_count) Line 130 + 0x5 bytes C++
openttd.exe!DispatchLeftClickEvent(Window * w, int x, int y, int click_count) Line 734 + 0x17 bytes C++
openttd.exe!MouseLoop(MouseClick click, int mousewheel) Line 2837 C++
openttd.exe!HandleMouseEvents() Line 2919 C++
openttd.exe!WndProcGdi(HWND__ * hwnd, unsigned int msg, unsigned int64 wParam, int64 lParam) Line 721 C++
user32.dll!UserCallWinProcCheckWow() + 0x11d bytes
user32.dll!DispatchMessageWorker() + 0x12a bytes
openttd.exe!VideoDriver_Win32::MainLoop() Line 1249 C++
openttd.exe!openttd_main(int argc, char * * argv) Line 870 C++
openttd.exe!WinMain(HINSTANCE * hInstance, HINSTANCE
* hPrevInstance, char * lpCmdLine, int nCmdShow) Line 452 C++
openttd.exe!__tmainCRTStartup() Line 275 + 0x21 bytes C
kernel32.dll!BaseThreadInitThunk() + 0xd bytes
ntdll.dll!RtlUserThreadStart() + 0x21 bytes


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12836

@DorpsGek
Copy link
Member Author

Rubidium wrote:

What font are you using, i.e. could you attach your configuration file?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12837

@DorpsGek
Copy link
Member Author

foobar wrote:

None in particular I suppose, as it also happened after deleting openttd.cfg.
I don't have access to my computer until Dec 29th, so I can upload my config then when needed.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12839

@DorpsGek
Copy link
Member Author

Rubidium wrote:

It is unreproducable for me on either Windows or Linux. Also the stack trace seems does not contain the character that the assertion triggered on, so not much information there either.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12841

@DorpsGek
Copy link
Member Author

zooks wrote:

same error found here, but only when using this specific patch, but it might give additional info:
http://www.tt-forums.net/viewtopic.php?f=33&t=68894&p=1107259# p1107259


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12859

@DorpsGek
Copy link
Member Author

hackalittlebit wrote:

d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'void SetCompositionPos(HWND)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:517:14: warning: NULL used in arithmetic [-Wpointer-arith]
d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'void SetCandidatePos(HWND)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:539:14: warning: NULL used in arithmetic [-Wpointer-arith]
d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'LRESULT HandleIMEComposition(HWND, WPARAM, LPARAM)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:574:14: warning: NULL used in arithmetic [-Wpointer-arith]
d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'void CancelIMEComposition(HWND)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:637:14: warning: NULL used in arithmetic [-Wpointer-arith]
d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'void SetCompositionPos(HWND)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:517:14: warning: NULL used in arithmetic [-Wpointer-arith]
d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'void SetCandidatePos(HWND)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:539:14: warning: NULL used in arithmetic [-Wpointer-arith]
d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'LRESULT HandleIMEComposition(HWND, WPARAM, LPARAM)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:574:14: warning: NULL used in arithmetic [-Wpointer-arith]
d:/development/ottd/trunkhg/src/video/win32_v.cpp: In function 'void CancelIMEComposition(HWND)':
d:/development/ottd/trunkhg/src/video/win32_v.cpp:637:14: warning: NULL used in arithmetic [-Wpointer-arith]

Or maybe this can be the cause.
The crashlog is from windows machine.

$ gcc -v
Using built-in specs.
COLLECT_GCC=d:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12861

@DorpsGek
Copy link
Member Author

foobar wrote:

I narrowed it down. It crashed due to the presence of attached nogfx-nogfx baseset. Apparently there is /something/ wrong with it (which wasn't a problem previously). I don't know what's wrong with this baseset, as it does load if it's the only baseset available. But I'm pretty sure OpenTTD shouldn't crash due to a faulty baseset.

I hope this is useful. At least I now know what I should do to not let OpenTTD crash :)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12878

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 2, 2014

frosch wrote:

The assertion is triggered by the character '\r'. It is present in the nogfx descriptions in the .obg file.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5829#comment12888

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 2, 2014

frosch closed the ticket.

Reason for closing: Fixed

in r26206


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

@DorpsGek DorpsGek closed this as completed Jan 2, 2014
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant