OpenTTD

Tasklist

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

Attached to Project: OpenTTD
Opened by FooBar (foobar) - Sunday, 15 December 2013, 15:56 GMT
Last edited by frosch (frosch) - Thursday, 02 January 2014, 17:56 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System Windows
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This happened on the main menu while trying to open Game Settings.
r26160 on Win7 x64
   crash.log (10.3 KiB)
   crash.png (756.3 KiB)
(application/octet-stream)    crash.dmp (6.65 MiB)
This task depends upon

Closed by  frosch (frosch)
Thursday, 02 January 2014, 17:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r26206
Comment by Remko Bijker (Rubidium) - Sunday, 22 December 2013, 12:23 GMT
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
Comment by Remko Bijker (Rubidium) - Sunday, 22 December 2013, 12:24 GMT
What font are you using, i.e. could you attach your configuration file?
Comment by FooBar (foobar) - Sunday, 22 December 2013, 12:41 GMT
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.
Comment by Remko Bijker (Rubidium) - Sunday, 22 December 2013, 18:00 GMT
  • Field changed: Status (New → Unreproducable)
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.
Comment by Zooks (zooks) - Friday, 27 December 2013, 18:53 GMT
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
Comment by Hans (hackalittlebit) - Saturday, 28 December 2013, 01:12 GMT
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)
Comment by FooBar (foobar) - Monday, 30 December 2013, 20:09 GMT
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 :)
Comment by frosch (frosch) - Thursday, 02 January 2014, 16:49 GMT
The assertion is triggered by the character '\r'. It is present in the nogfx descriptions in the .obg file.

Loading...