Error: Cannot load language data

Here you can report bugs found in Far Manager.
MortenMacFly
Posts: 45
Joined: Wed 30 Apr, 2008 15:31
Has thanked: 1 time

Error: Cannot load language data

Post by MortenMacFly »

Dear all,
I am having a strange problem with recent Far version (1.8x unicode; but also 1.7x, up to 1.71 alpha 4 build 2449). Whenever I run Far I get the following error message:

Code: Select all

>Far.exe
The FAR manager, version 1.80 alpha 1 (build 603) - TEST ONLY!
Copyright (C) 1996-2000 Eugene Roshal, Copyright (C) 2000-2008 FAR Group

Error: Cannot load language data
I have the language files placed correctly, they are being accessed by Far (procmon from SysInternals says so) but still I get this error. The only version I can run without issues is 1.71 alpha 4 (build 2358). This works.

I searched the forums before and such bug seems to be reported already, unfortunately I am not Russian so I don't understand what's written there.

In addition:
- No, I am not mixing old version of the language files
- Yes, I tried to clean the whole old settings (registry) before
- Yes, I tried running Far from the console in the path where Far.exe and the *.lng file is
- Yes, I tried a clean install of e.g. http://forum.farmanager.com/viewtopic.p ... 943#p16722

Any hint?! I would really like to update Far... ;-)
dolzenko
Posts: 452
Joined: Wed 19 Apr, 2006 14:42
Location: Ростов-на-Дону

Re: Error: Cannot load language data

Post by dolzenko »

FWIW, someone with Vista in really old (1+ year) reported similar issue, and seemed to solve it with running Far as administrator
User avatar
t-rex
Страшный и ужасный
Posts: 4910
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: Error: Cannot load language data

Post by t-rex »

MortenMacFly
If you place Far in let's say C:\Far (not under program files and etc.) does it work?
MortenMacFly
Posts: 45
Joined: Wed 30 Apr, 2008 15:31
Has thanked: 1 time

Re: Error: Cannot load language data

Post by MortenMacFly »

dolzenko_ wrote:FWIW, someone with Vista in really old (1+ year) reported similar issue, and seemed to solve it with running Far as administrator
I don't have Vista, I am using Windows XP Pro - SP3 (and forgot to mention that...). I tried with admin rights anyways - no luck. :-(
t-rex wrote:MortenMacFly
If you place Far in let's say C:\Far (not under program files and etc.) does it work?
I am having a German Windows, so my folder does not contain spaces (C:\Programme\Far). However, even C:\Far\Far.exe does not work and produces the same error.
Denis
Posts: 1444
Joined: Tue 05 Apr, 2005 18:12
Has thanked: 10 times
Been thanked: 5 times

Re: Error: Cannot load language data

Post by Denis »

MortenMacFly
Could you post here result of the dir command in this folder ('dir *')?
MortenMacFly
Posts: 45
Joined: Wed 30 Apr, 2008 15:31
Has thanked: 1 time

Re: Error: Cannot load language data

Post by MortenMacFly »

I did two trials:
Far (1.80 - unicode):

Code: Select all

> Far.exe
> FarEng.lng
> FarRus.lng
...and the other one is exactly the content of http://farmanager.com/farbugs/Far171.b2449.x86.rar (posted in this forum).
Denis
Posts: 1444
Joined: Tue 05 Apr, 2005 18:12
Has thanked: 10 times
Been thanked: 5 times

Re: Error: Cannot load language data

Post by Denis »

Could you provide something like this (with more details) for Far171.b2449.x86.rar:
Directory of D:\2008.11.24
22.11.2008 20:54 791,552 Far.exe
22.11.2008 20:54 167,639 FarEng.hlf
21.11.2008 12:55 32,983 FarEng.lng
22.11.2008 20:54 176,666 FarRus.hlf
21.11.2008 12:55 36,099 FarRus.lng
User avatar
t-rex
Страшный и ужасный
Posts: 4910
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: Error: Cannot load language data

Post by t-rex »

This is very strange.

Can you run 1.80 in debugger? Look here Language::Init.
MortenMacFly
Posts: 45
Joined: Wed 30 Apr, 2008 15:31
Has thanked: 1 time

Re: Error: Cannot load language data

Post by MortenMacFly »

t-rex wrote:Can you run 1.80 in debugger? Look here Language::Init.
I can and I did. This is the result:
it returns here:

Code: Select all

  if (LangFile==NULL)
    return(FALSE);
...because LangFile *is* NULL. The memory at the address of strLangName contains Hex: "07 00". That's the same for Opt.strLanguage. The provided Path (function argument) is correct and point to the path where the language files are. What other details do you need?
Denis wrote:Could you provide something like this (with more details) for Far171.b2449.x86.rar:
Not for this archive, but for the 1.80 version:
1372160 2008-11-24 10:51 Far.exe
32622 2008-08-19 13:08 FarEng.lng
35705 2008-08-19 13:08 FarRus.lng
...but believe me: the files are correct, the rights are correct. It must be another reason.
MortenMacFly
Posts: 45
Joined: Wed 30 Apr, 2008 15:31
Has thanked: 1 time

Re: Error: Cannot load language data

Post by MortenMacFly »

My fault: For debugging there were indeed no language files in the folder where the debugging binary was. I "fixed" that but still get the error message.
It fails in:

Code: Select all

int Language::Init(const wchar_t *Path,int CountNeed)
at this line:

Code: Select all

if(CountNeed != -1 && CountNeed != MsgCount-1)
Because CountNeed is 2011 and MsgCount is 2000. So it seems the language file I am producing is indeed wrong.
Denis
Posts: 1444
Joined: Tue 05 Apr, 2005 18:12
Has thanked: 10 times
Been thanked: 5 times

Re: Error: Cannot load language data

Post by Denis »

MortenMacFly
Probably you are using wrong language files (from different version).
Denis
Posts: 1444
Joined: Tue 05 Apr, 2005 18:12
Has thanked: 10 times
Been thanked: 5 times

Re: Error: Cannot load language data

Post by Denis »

Mine FarEng.lng(The FAR manager, version 1.80 alpha 1 (build 603)) has size 32863, which is different from yours.
MortenMacFly
Posts: 45
Joined: Wed 30 Apr, 2008 15:31
Has thanked: 1 time

Re: Error: Cannot load language data

Post by MortenMacFly »

Denis wrote:Mine FarEng.lng(The FAR manager, version 1.80 alpha 1 (build 603)) has size 32863, which is different from yours.
Strange. The language files are being produced by this call:

Code: Select all

tools\lng.generator.exe -nc -i lang.ini farlang.templ
I wonder why this should result in a different file than on your machine. Can you tell me the steps your are doing?

EDIT: BTW: Probably I did not mention so far: The 1.80 version is the one I am compiling myself using GCC on Windows. But I followed exactly the steps as described in "HACKING-EN" and it really *used* to work.

From where did you get you lng file?
User avatar
t-rex
Страшный и ужасный
Posts: 4910
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: Error: Cannot load language data

Post by t-rex »

But do you take the generated lng files and copy them to the bin directory? Because they are generated in the source dir (judging by your codeblocks project you are missing that step).
MortenMacFly
Posts: 45
Joined: Wed 30 Apr, 2008 15:31
Has thanked: 1 time

Re: Error: Cannot load language data

Post by MortenMacFly »

t-rex wrote:But do you take the generated lng files and copy them to the bin directory? Because they are generated in the source dir (judging by your codeblocks project you are missing that step).
Yes, of course! Otherwise the Language::Init() Routine would not come that far. It's really a mismatch in the requested and received number of translations in the lng file. The question is: Why is that??? And I am *sure* that I am creating the right language (templ) file in terms of "latest from SVN" and "in sync with other sources". I did another clean checkout to verify.
Post Reply

Return to “Bug Reports”