Jump to content
The Dark Mod Forums

Crash probably related to issue 0002811 - plus a patch


Zbyl

Recommended Posts

This is a bug that occurs on current (29 Jan 2013, rev. 5694) SVN code. Proposed solutions are in this post.

 

It's probably related to:

0002811: Font loading does not fall back to English

http://bugs.angua.at/view.php?id=2811

 

Reproduction:

After changing language to polish and restarting TDM, the following happens:

 

SetupFonts() in idDeviceContext::Init() can't find fonts for polish language. It does not fall back to loading english fonts.

Lack of ANY fonts loaded causes a crash while loading GUI (in idDeviceContext::SetFontByScale() exactly).

I've attached the stack trace.

 

I have three solutions for this problem:

 

1. I've attaches a patch (I18N.cpp.patch.txt). However:

- it uses a hard coded value "fonts/english",

- it requires #str_04127 to be translated properly for all languages with their own fonts - this is actually an advantage, IMHO.

 

2. I've also attached an alternative patch (DeviceContext.cpp.patch.txt) that solves this problem. It also uses a hard coded value "fonts/english", and is not as good as the first one.

 

3. Third solution is to require for translation of #str_04127 to be present in all languages that do not have their own fonts. Translations such as Polish have to be fixed.

 

I actually think that the first solution is the best one, because it's the most bullet-proof (no risk of crashes, ever).

 

(I wanted to edit the original issue, but I don't have permission.)

stacktrace.txt

DeviceContext.cpp.patch.txt

I18N.cpp.patch.txt

Link to comment
Share on other sites

Hi, thanx for the headsup and the patch!

 

I've looked into why Polish would not fallback to the English fonts, and can see why it could do that - the intention was that if #str_04127 is not translated, it falls back to the value of #str_04127 in english. The code instead uses "fonts/language", which is proper for any other language (like Japanese), but would be invalid for Polish (since it must use English fonts).

 

So I think the issue can equally easily be patched by adding the mission value for #str_04127 to the polish dictionary.

 

HOWEVER, this is what actually is happening. The polish dictionary already contains:

 

    "#str_04127"    "fonts/english"		 // the path to the font files, western languages all use english, while russian etc use their own

 

So, on my system, this works already and the same entry is present in the file we shipped with v1.08 (and such a big bug would not have escpated us).

 

I'm curious, why does it not work on your system?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

No harm done :) Was this a problem with the updater?

 

If you find other bugs, such detailed reports are always welcome :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Hmm, think I've also fixed this in my branch (since there is a more serious issue that the internationalization requires the dynamic link to be correct else the engine will fall over.).

 

Erm, there is nothing to fix, the system works as intended (it picks the language the strings file says, or it falls back to "lang/LANGUAGE"). So what did you "fix"?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...