rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: Zoremeth on October 11, 2018, 07:26:23 PM

Title: HFS not able to start.
Post by: Zoremeth on October 11, 2018, 07:26:23 PM
I really love using HFS when sharing files with friends. However, the latest build, #300 just does not want to seem to start.

When opening it gives the following error:

Code: [Select]
Application Error:
Exception EKdlError in module hfs.exe at 000A4DB0.
K.D.L initialization error.
Please put uFreeLocalizer before UTF8VCL in an uses clause of Application.

For the record, I am using Windows 10 Home. There are HFS files except the exe itself in the folder. Also, I tried the hfs24b4 version which also did not work.
Screenshot here: http://prntscr.com/l503sm
Title: Re: HFS not able to start.
Post by: LeoNeeson on October 12, 2018, 02:32:45 AM
Hi! and welcome to the forum... :)

That's a weird error, since HFS it's not using "UTF8VCL (https://sourceforge.net/projects/utf8vcl/)" (although it seems to be related to "Kryvich's Delphi Localizer (https://sites.google.com/site/kryvich/localizer/)", but you are the first person to report a problem). Are you using some translated version of HFS? (like this (http://www.rejetto.com/forum/index.php?/topic,11958.0.html;msg=1062536) version).

Please do this: try running HFS v2.3k Build #299 Spanish Beta (http://www.rejetto.com/forum/index.php?/topic,11958.0.html;msg=1062536) and see if it gives you the same error or if it starts normally, but run it on a separate (different) folder (this is very important), without copying any personal file there (if you have another HFS version running, please close it before running this other version). Just unzip it to some folder, and run hfs.exe without adding or deleting any other file (and do not update it to the last version, just for doing this test). If the error continues, try closing any other software you have open (like for example: keynote-nf (https://github.com/dpradov/keynote-nf) or any other software). Then please report the results here. ;)

Cheers,
Leo.-
Title: Re: HFS not able to start.
Post by: Zoremeth on October 12, 2018, 08:04:52 AM
Hi! and welcome to the forum... :)

That's a weird error, since HFS it's not using "UTF8VCL (https://sourceforge.net/projects/utf8vcl/)" (although it seems to be related to "Kryvich's Delphi Localizer (https://sites.google.com/site/kryvich/localizer/)", but you are the first person to report a problem). Are you using some translated version of HFS? (like this (http://www.rejetto.com/forum/index.php?/topic,11958.0.html;msg=1062536) version).

Please do this: try running HFS v2.3k Build #299 Spanish Beta (http://www.rejetto.com/forum/index.php?/topic,11958.0.html;msg=1062536) and see if it gives you the same error or if it starts normally, but run it on a separate (different) folder (this is very important), without copying any personal file there (if you have another HFS version running, please close it before running this other version). Just unzip it to some folder, and run hfs.exe without adding or deleting any other file (and do not update it to the last version, just for doing this test). If the error continues, try closing any other software you have open (like for example: keynote-nf (https://github.com/dpradov/keynote-nf) or any other software). Then please report the results here. ;)

Cheers,
Leo.-

Hi Leo,

I went and followed your steps. I downloaded the version you linked, put it in a separate empty folder and ran it. It still gives me the same error. After getting the error again, I closed off some programs and tried again. Still the same error.

Just for testing sake, I looked around on the internet for an older build. To which I stumbled upon a download of 2.3j (#298). And funny enough, it totally works. No problems at all. Does not even matter what it is in.

Thanks for the warm welcome and let me know if you figure something out,
Zoremeth.
Title: Re: HFS not able to start.
Post by: bmartino1 on October 12, 2018, 01:41:23 PM
I've been trying to isolate your error. As Leo said, your the first to submit something  on this type of error. Out courisity, are you using a remote desktop to the machine?

As your error is pulling some for remote screen mirrored. And potentially netframework errors. (Hfs doesn't rely on net framework installation, but it's worth a check)...

I'm glad you at least found a working build for the moment.

From what I can tell/process from the error message given by windows is:

Windows is complaining about a missing dll file, or a older dll file on which when ran a memory handle exception occurred.

Also what windows 10 build are you running?
Cmd > winver
Title: Re: HFS not able to start.
Post by: Zoremeth on October 12, 2018, 01:45:24 PM
I've been trying to isolate your error. As Leo said, your the first to submit something  on this type of error. Out courisity, are you using a remote desktop to the machine?

As your error is pulling some for remote screen mirrored. And potentially netframework errors. (Hfs doesn't rely on net framework installation, but it's worth a check)...

I'm glad you at least found a working build for the moment.

I am not using any related to remote desktop. As a matter of fact, Windows 10 Home does not even have support for RDP. I'll have an opportunity to try with another machine today, so I'll let you guys know.

Greetings,

Zoremeth.
Title: Re: HFS not able to start.
Post by: bmartino1 on October 12, 2018, 01:48:25 PM
Side note for a FYI, all windows machine including home have rep support for windows built in see here: https://www.google.com/amp/s/www.windowscentral.com/how-use-remove-desktop-app-connect-pc-windows-10-0%3famp

And there always third party tools such as TeamViewer.

Was a courisity. :P
Title: Re: HFS not able to start.
Post by: LeoNeeson on October 14, 2018, 07:22:14 AM
I went and followed your steps. I downloaded the version you linked, put it in a separate empty folder and ran it. It still gives me the same error. After getting the error again, I closed off some programs and tried again. Still the same error.
OK, thanks for your report. I almost sure this is error is caused by some kind of incompatibility with other software you have installed (or with your current Windows build). I don't know if there is a way you could generate a 'debugger dump' to help Rejetto catch and fix this error (and see why this error happened on your PC and not on others). Like bmartino1 said, as a reference it would be nice to know the exact build number of Windows 10 that you run (to do this (https://www.windowscentral.com/how-check-your-windows-10-build): press Win+R, write there "winver"). For the moment, keep using that old version 2.3j (#298).

@Rejetto: is there any 'debugger' that this user could run to generate a 'dump'? I was thinking on WinDbg (https://developer.microsoft.com/en-us/windows/hardware/download-windbg), but I don't if that software generates a crash report that could help you to fix this error. Since I bet this error is 90% related to the "Kryvich's Delphi Localizer" component you added on HFS 2.3 Build 300, I was thinking if there is a way to make a 'conditional' load of this component (a simple check when HFS starts: if the 'hfs.lng' file exist, then load the component normally, but if that file does NOT exist, then the component is not loaded at all, since it's not needed). Perhaps that could be a temporal solution to this (but I don't know if it's feasible to do that).
Title: Re: HFS not able to start.
Post by: rejetto on October 14, 2018, 09:47:56 PM
that's not possible AFAIK.
I'm trying to follow the error message, so i moved the uFreeLocalizer at the top of the 'uses' clause.
Just wait for the next beta to be published so you can test this possible solution.
and welcome Zoremeth!
Title: Re: HFS not able to start.
Post by: Zoremeth on October 17, 2018, 09:09:31 PM
that's not possible AFAIK.
I'm trying to follow the error message, so i moved the uFreeLocalizer at the top of the 'uses' clause.
Just wait for the next beta to be published so you can test this possible solution.
and welcome Zoremeth!

Thanks for the warm welcome!
I already read this message a couple days ago, sorry for replying only now. Thanks for looking into this problem. I'll be eagerly awaiting the next beta. Just @/ping me in the beta topic when it's released and I'll let you know ASAP if it fixed the problem.
Title: Re: HFS not able to start.
Post by: LeoNeeson on October 18, 2018, 01:54:56 AM
I'll be eagerly awaiting the next beta. Just @/ping me in the beta topic when it's released and I'll let you know ASAP if it fixed the problem.
Beta 5 was already released here (http://rejetto.com/forum/index.php?topic=13060.msg1064095#msg1064095).

http://www.rejetto.com/hfsfiles/hfs24b5.exe

Please test it and comment the results... ;)
Title: Re: HFS not able to start.
Post by: Zoremeth on October 18, 2018, 09:10:05 PM
Beta 5 was already released here (http://rejetto.com/forum/index.php?topic=13060.msg1064095#msg1064095).

http://www.rejetto.com/hfsfiles/hfs24b5.exe

Please test it and comment the results... ;)

Hi, I just checked out Beta 5 and it gives a similar error:
Code: [Select]
Exception EKdlError in module hfs24b5.exe at 00092A28
K.D.L. initialization error.
Please put uFreeLocalizer before UTF8VCL in an uses clause of Application.
Title: Re: HFS not able to start.
Post by: rejetto on October 18, 2018, 10:15:09 PM
that's bad, very bad.
do you have a "language" file ? are you using hfs translated someway?
Title: Re: HFS not able to start.
Post by: Zoremeth on October 18, 2018, 10:23:26 PM
that's bad, very bad.
do you have a "language" file ? are you using hfs translated someway?

As far as I am aware not. I have my PC set in US English, If I recall correctly. Actually it might be set in "English (Dutch)". I will have a look tomorrow at my Windows language settings.

Greetings,

Zoremeth
Title: Re: HFS not able to start.
Post by: LeoNeeson on October 19, 2018, 07:00:39 AM
@Zoremeth: I'm as much as you interested on solving this error, given I was who proposed adding a component to HFS to make it multilingual that could lead to this error (so I hope a solution could be found).

The background of this error seems to be not a direct HFS's bug, but an incompatibility of one component used by HFS (Kryvich's Delphi Localizer), with another component (UTF8VCL) used by other software you have installed. It seems to be a very specific error, that is triggered when HFS is running with another software using UTF8VCL. At least that's how I understand that error (perhaps the cause is another thing).

@Rejetto: I don't know if this could be useful, but on the 'uFreeLocalizer.pas' there is a 'aAutoTranslate' boolean and also a 'CheckUtf8vcl' boolean. Perhaps (on theory) a simple "if hfs.lng do not exists, then aAutoTranslate or CheckUtf8vcl disabled" could disable this when the localizer is not used (but I'm not sure if that solves that error). There is (also in 'uFreeLocalizer.pas'), on line 412, the source of that error message box: 'K.D.L. initialization error.' On line 408, you will find this:

Code: [Select]
begin
  if AnsiCP = 0 then
    AnsiCP := 1250;
  if AnsiCP = 65001 then
    raise EKdlError.Create('K.D.L. initialization error.'#13#10+
      'Please put uFreeLocalizer before UTF8VCL in an uses clause of Application');

(sorry, my programming knowledge is very limited to propose a solution to this error :-[)
Title: Re: HFS not able to start.
Post by: LeoNeeson on October 24, 2018, 05:18:24 AM
@Rejetto/Mars: I admit my Delphi knowledge is very basic and limited, but I was thinking if something like this could help on fixing that error:

In hfs.dpr you will find this:

Quote
  Application.Initialize();

  FreeLocalizer.AutoTranslate := True;
  FreeLocalizer.LanguageFile := 'hfs.lng';

Changing the code marked in red, to the green:

Quote
  Application.Initialize();

  if fileExists('hfs.lng') then
  begin
    FreeLocalizer.AutoTranslate := True;
  else
    FreeLocalizer.AutoTranslate := False;
  end
  FreeLocalizer.LanguageFile := 'hfs.lng';

Would this work? (if this doesn't work, we can always revert back to the original code). What do you think?... ???
Title: Re: HFS not able to start.
Post by: rejetto on November 03, 2018, 04:00:08 PM
Code: [Select]
  if fileExists('hfs.lng') then
    begin
    FreeLocalizer.AutoTranslate := True;
    FreeLocalizer.LanguageFile := 'hfs.lng';
    end;

this should be enough.
wait for beta6
Title: Re: HFS not able to start.
Post by: korhojoa on March 15, 2019, 06:00:55 PM
Apologies for the post on a older thread. I had this issue.
A working fix (on Windows 10 1809) was to disable the "Beta: Use Unicode UTF-8 for worldwide language support" in Windows Region Settings.
(found under Region -> Administrative tab -> Language for non-Unicode programs -> Change system locale... -> Checkbox - Beta: Use Unicode UTF-8 for worldwide language support)
Title: Re: HFS not able to start.
Post by: LeoNeeson on March 16, 2019, 06:20:54 AM
Apologies for the post on a older thread. I had this issue.
A working fix (on Windows 10 1809) was to disable the "Beta: Use Unicode UTF-8 for worldwide language support" in Windows Region Settings.
(found under Region -> Administrative tab -> Language for non-Unicode programs -> Change system locale... -> Checkbox - Beta: Use Unicode UTF-8 for worldwide language support)
@Rejetto: Perhaps THIS (https://wiert.me/2018/12/04/utf-8-support-for-single-byte-character-sets-is-beta-in-windows-and-likely-breaks-a-lot-of-applications-not-expecting-this-via-unicode-in-microsoft-windows-utf-8-wikipedia/) article could give some 'light' to make a fix for HFS (a fix for another program is also HERE (https://social.msdn.microsoft.com/Forums/en-US/9dadee2f-2dbb-407c-a258-f1774f57675c/issue-with-quotuse-unicode-utf8-for-worldwide-language-supportquot-and-our-softwarequot?forum=sapi)). It seems a change (https://www.google.com/search?q=%22Beta:+Use+Unicode+UTF-8+for+worldwide+language+support%22&ie=UTF-8) in Windows 10 1803 update, sets UTF-8 support for single byte character and likely breaks a lot of applications not expecting this (a simply fix could be making HFS ignore this setting?).
Title: Re: HFS not able to start.
Post by: rejetto on March 17, 2019, 07:13:38 PM
ok, thanks a lot, i've been able to reproduce the problem.
Anyway i didn't find a real solution, except from ignoring the error coming from the translation library.
This will at least allow people to run HFS.
The error is deliberate, because the library is not supporting this codepage, or at least not this version of the library.
Maybe people can decide to uncheck this Windows' setting to workaround the problem?

Title: Re: HFS not able to start.
Post by: Explorare on April 29, 2019, 01:46:39 PM
Got the same error message on hfs24b1.
Windows 10 1903 (18362.53)
System Language: en-US
So I need to uncheck the UTF-8 thing right?
Title: Re: HFS not able to start.
Post by: bmartino1 on April 29, 2019, 03:50:16 PM
@Explorare

unfortuanlely this is a windows build beta issue adn only a windows option atm is the fix. as reported form are from poster user, he was able to geta workaround via turning off the win 10 betat utf-8

Control panel > region settin > administrative tab > admin systeym chage for non -unicode > unchek box if check.
see picture

Apologies for the post on a older thread. I had this issue.
A working fix (on Windows 10 1809) was to disable the "Beta: Use Unicode UTF-8 for worldwide language support" in Windows Region Settings.
(found under Region -> Administrative tab -> Language for non-Unicode programs -> Change system locale... -> Checkbox - Beta: Use Unicode UTF-8 for worldwide language support)
Title: Re: HFS not able to start.
Post by: Explorare on April 29, 2019, 03:53:55 PM
@Explorare

unfortuanlely this is a windows build beta issue adn only a windows option atm is the fix. as reported form are from poster user, he was able to geta workaround via turning off the win 10 betat utf-8

Control panel > region settin > administrative tab > admin systeym chage for non -unicode > unchek box if check.
see picture

That fixed the problem. Thanks a lot.  :D