News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

r2185 bug in gui/sprachen.cc

Started by gerw, December 27, 2008, 01:25:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gerw

The newest revision seem to have a bug in gui/sprachen.cc. If I revert gui/sprachen.cc to r2184 all works fine. In r2185 it hangs up in an infinite loop in: dsp_read_bdf_font, because it want's to read the font "font/" (line #9):
#8  0x080b6b6e in dsp_read_bdf_font (fin=0x8aca090, font=0xbff46e64)
    at font.cc:165
#9  0x080b75a2 in load_font (fnt=0xbff46e64, fname=0xbff46ea0 "font/")
    at font.cc:365
#10 0x081413f6 in sprachengui_t (this=0x853f120) at gui/sprachen.cc:105
#11 0x0819808c in simu_main (argc=5, argv=0xbff48df4) at simmain.cc:759
#12 0x081f346d in main (argc=5, argv=0xbff48df4) at simsys_s.cc:667

I think, the main problem is in gui/sprachen.cc:98, when PROP_FONT_FILE isn't translatable and it isn't been checked, whether prop_font_file_name is really a file. But this is only a guess.

prissi

such a tranlation is not allowed anyway and is an error of the pak

gerw

But none of my installed paks contains a valid translation in text/de.tab.

prissi

I should have written: Is an error of the language file. I recently rechecked all files (the one under simutrans/text/de.tab) and they seemed ok. Could you be more specific?

gerw

Immediatly after starting simutrans, it freezes. The log says
Warning: sprachengui_t::sprachengui_t(): no font found for Belaruskaja
and some debug output:
Loading BDF font font/Prop-Latin1.bdf with 255 characters
Loading font 'font/prop-latin2.fnt'
font/prop-latin2.fnt sucessfully loaded as old format prop font!
Loading font 'font/ro_font.fnt'
font/ro_font.fnt sucessfully loaded as old format prop font!
Loading BDF font 'font/'


The problem is, that line 105 in sprachen.cc calls load_font with prop_font_file_name='/font'.

prissi

This should not be a problem, since it should not suceed to open this file for reading.

Even more, the translation is defined, it is cyr.bdf. Or did some funny guy changed this to space? It is the third line in be.tab

z9999

#6
I tested on Ubuntu, and freezed. Both gcc3 and gcc4 versions on nightly site.

Simutrans strat and show title, but when I click on window, simutrans freeze - no new map window, no crash but freezed.



[edit]
Okay, I replaced "be.tab" to new one and did't freeze anymore.

Old one is this
Quote
Belaruskaja
PROP_FONT_FILE
prop_cyrillic-be.fnt

prissi

Maybe there was some linefeed trouble then? Because this is still a defined font. Hmm.