Bug 8732

Summary: openttd flickers / crashes when trying to change settings
Product: Mageia Reporter: Jerome Quelin <jquelin>
Component: RPM PackagesAssignee: Jani Välimaa <jani.valimaa>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: lists.jjorge, nic
Version: CauldronKeywords: NEEDINFO
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: openttd CVE:
Status comment:

Description Jerome Quelin 2013-01-18 11:08:34 CET
1. run "openttd"
2. window opens, but buttons flickers depending on the animation going on *below* the tab containing the buttons

I thought it was due to a wrong graphical setting, so:
3. click "Options" button
4. click on the "resolution" drop-down list to select another res
==> openttd crashes with the following message:

==============================================
Crash encountered, generating crash log...
*** OpenTTD Crash Report ***

Crash at: Fri Jan 18 10:06:42 2013
In game date: 2051-05-09 (27)

Crash reason:
 Signal:  Floating point exception (8)
 Message: <none>

OpenTTD version:
 Version:    1.3.0-beta1 (0)
 NewGRF ver: 13006113
 Bits:       64
 Endian:     little
 Dedicated:  no
 Build date: Jan 13 2013 01:11:46

Stacktrace:
 [00] openttd(_ZNK12CrashLogUnix13LogStacktraceEPcPKc+0x39) [0x6c7e79]
 [01] openttd(_ZNK8CrashLog12FillCrashLogEPcPKc+0xfa) [0x5a809a]
 [02] openttd(_ZNK8CrashLog12MakeCrashLogEv+0x7e) [0x5a832e]
 [03] openttd() [0x6c7dbf]
 [04] /lib64/libc.so.6(+0x34ba0) [0x7f37f2cb8ba0]
 [05] openttd(_Z18ShowDropDownListAtP6WindowPSt4listIP16DropDownListItemSaIS3_EEii4Rect7Coloursbb+0x316) [0x811596]
 [06] openttd(_Z16ShowDropDownListP6WindowPSt4listIP16DropDownListItemSaIS3_EEiijbb+0x188) [0x811988]
 [07] openttd(_ZN17GameOptionsWindow7OnClickE5Pointii+0x75) [0x76cab5]
 [08] openttd(_Z17HandleMouseEventsv+0x14d8) [0x816cd8]
 [09] openttd(_ZN15VideoDriver_SDL8MainLoopEv+0x265) [0x7fa025]
 [10] openttd(_Z8ttd_mainiPPc+0x1543) [0x6b6a83]
 [11] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f37f2ca5c65]
 [12] openttd() [0x4fae31]

Operating system:
 Name:     Linux
 Release:  3.8.0-desktop-0.rc3.2.mga3
 Version:  #1 SMP Wed Jan 16 19:04:42 UTC 2013
 Machine:  x86_64
 Compiler: GCC 4.7.2 "4.7.2"

Configuration:
 Blitter:      8bpp-optimized
 Graphics set: OpenGFX (1002)
 Language:     /usr/share/games/openttd/lang/french.lng
 Music driver: extmidi
 Music set:    OpenMSX (96)
 Network:      no
 Sound driver: sdl
 Sound set:    OpenSFX (87)
 Video driver: sdl

AI Configuration (local: 0):
  0: Human

Libraries:
 FontConfig: 2.10.2
 FreeType:   2.4.11
 ICU:        50.1.1
 LZMA:       5.1.2alpha
 LZO:        2.06
 PNG:        1.5.13
 SDL:        1.2.15
 Zlib:       1.2.7

---- gamelog start ----
Tick 62675: game loaded
     Conversion from OTTD savegame without gamelog: version 4, 1
     Revision text changed to 1.3.0-beta1, savegame version 179, not modified, _openttd_newgrf_version = 0x13006113
     New game mode: 0 landscape: 1
---- gamelog end ----

*** End of OpenTTD Crash Report ***

Crash log generated.

Writing crash log to disk...
Crash log written to /home/jquelin/.openttd/crash.log. Please add this file to any bug reports.

Writing crash savegame...
Crash savegame written to /home/jquelin/.openttd/crash.sav. Please add this file and the last (auto)save to any bug reports.

Writing crash screenshot...
Crash screenshot written to /home/jquelin/.openttd/crash.png. Please add this file to any bug reports.

Abandon
==============================================


This is with an up-to-date cauldron, after mass rebuild.
Manuel Hiebel 2013-01-18 21:49:06 CET

Assignee: bugsquad => jani.valimaa
Source RPM: (none) => openttd

Comment 1 Jani Välimaa 2013-02-11 18:29:19 CET
Is this still valid with new beta2?
Comment 2 Jerome Quelin 2013-02-13 09:49:04 CET
openttd-1.3.0-0.beta2.1.mga3
==> still crashing
Comment 3 José Jorge 2013-09-01 22:17:24 CEST
Bug confirmed here on a i586 MGA3 box. Bug is not there in another i586 MGA3 box, so I suppose it is a font package problem?

CC: (none) => lists.jjorge
Hardware: x86_64 => All

Comment 4 Jani Välimaa 2013-09-02 16:05:58 CEST
(In reply to José Jorge from comment #3)
> Bug confirmed here on a i586 MGA3 box. Bug is not there in another i586 MGA3
> box, so I suppose it is a font package problem?

Same graphic card in both machines?

Could you also run 'fc-cache -sf' as root in this crashing machine to eliminate some possible font issues? You can also add -v switch to see what's happening.
Comment 5 José Jorge 2013-09-02 23:04:43 CEST
(In reply to Jani Välimaa from comment #4)
> Could you also run 'fc-cache -sf' as root in this crashing machine to
> eliminate some possible font issues? You can also add -v switch to see
> what's happening.

This did not fix anything. But I can confirm it is a font problem : adding this lines to ~/.openttd/openttd.cfg fixes the bug :

small_font = /usr/share/fonts/TTF/liberation/LiberationSans-Regular.ttf
medium_font = /usr/share/fonts/TTF/liberation/LiberationSans-Regular.ttf
large_font = /usr/share/fonts/TTF/liberation/LiberationSans-Regular.ttf
mono_font = /usr/share/fonts/TTF/liberation/LiberationMono-Regular.ttf

Still, it looks ugly. How to know which font is used by OpenTTD defaults?
Comment 6 Jani Välimaa 2013-09-03 10:28:24 CEST
I'll try to dig used fonts later.

Could you check which font packages you have installed in working machine and compare them with non-working ones to see which one is missing?
Comment 7 Jani Välimaa 2013-09-03 15:24:27 CEST
This seems to be also related to used language. If I change language (from openttd settings) to for example French fonts are ugly as *beep*.
Comment 8 Jani Välimaa 2013-09-03 15:31:34 CEST
You can also start openttd from cmd with debugging enabled with 'openttd -d 2'. It shows at least some info about fonts when changing used language.
Comment 9 Jani Välimaa 2013-09-03 15:39:31 CEST
(In reply to Jani Välimaa from comment #8)
> You can also start openttd from cmd with debugging enabled with 'openttd -d
> 2'. It shows at least some info about fonts when changing used language.

Actually better way is to use 'openttd -d freetype=2'.
Comment 10 José Jorge 2013-09-03 20:21:48 CEST
We are getting closer, the machine where I have the bug uses french locale, while other is in portuguese. Switching to french triggers the bug. I get the following log when switching to french, I suppose you have the same (lines repeated were removed):

[jose@r930 ~]$ openttd -d freetype=2
dbg: [freetype] Initialized
dbg: [freetype] Requested '/usr/share/fonts/TTF/arabic/arabeyes/ae_Ouhod-Bold.ttf', using 'Ouhod Bold'
dbg: [freetype] Font "/usr/share/fonts/TTF/arabic/arabeyes/ae_Ouhod-Bold.ttf" misses glyphs
dbg: [freetype] Requested '/usr/share/fonts/75dpi/helvR12.pcf.gz', using 'Helvetica Regular'
dbg: [freetype] Font "/usr/share/fonts/75dpi/helvR12.pcf.gz" misses no glyphs
dbg: [freetype] Requested '/usr/share/fonts/75dpi/ncenB12.pcf.gz', using 'New Century Schoolbook Bold'
dbg: [freetype] Font "/usr/share/fonts/75dpi/ncenB12.pcf.gz" misses no glyphs
dbg: [freetype] Requested '/usr/share/fonts/75dpi/ncenB12.pcf.gz', using 'New Century Schoolbook Bold'
Comment 11 Samuel Verschelde 2015-05-17 17:29:04 CEST
Is this still valid in Mageia 4 or 5?

Keywords: (none) => NEEDINFO

Comment 12 José Jorge 2015-05-17 21:17:00 CEST
I don't have the problem anymore in MGA5, but I don't know if this is beacause of some more fonts installed...
Comment 13 Nic Baxter 2016-02-09 10:09:15 CET
I can't reproduce in Mga5 so closed

Status: NEW => RESOLVED
CC: (none) => nic
Resolution: (none) => FIXED