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

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...