TC10 crash on startup if .lng language file has unix newlines

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
arberg
Junior Member
Junior Member
Posts: 9
Joined: 2018-04-20, 10:00 UTC

TC10 crash on startup if .lng language file has unix newlines

Post by *arberg »

TC will fail on startup if its .lng language files has been saved with unix-newlines. It would be really nice if TC could just understand both unix and windows newlines in all its config-files. TC already accepts unix-newlines in the .mnu and .ini Language/menu files which is great.

Background for unix-newlines: I have learned to use unix-newlines everywhere, because the only program that I have previously come across that does not understand unix-newlines is Notepad. TC is much to cool to be in such a category with Notepad :) This is also the best method I have found for handling git-repositories, without pretty much ever having to handle changing newlines when I copy scripts around between servers.

Code: Select all

---------------------------
Total Commander 10.00
---------------------------
Access violation.
Access violation
Windows 10 Professional 10.0 (Build 19043), base: 0400000

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Stack trace (x64):53F99E
22003D00380035 
Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Yes   No   
---------------------------
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6498
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *Horst.Epp »

It would be fine if Christian resolves your Problem.
Windows tools have no need to be aware of Unix line feeds
Poeple which transfer files from other environments are responsible to handle the conversion,
if their tools can't handle the Unix format.
In most cases its even done automatically.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
nsp
Power Member
Power Member
Posts: 1806
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *nsp »

Windows standard is CRLF, let's consider that you have degraded the original lng file by changing EOL from CRLF to NL.
IMO: it is not a bug but just a small suggestion.

In any case you do not change language file every day once it's well edited and you can convert from command line in second and once.
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *white »

2arberg
Thank you for taking the trouble to report the issue as you were asked to do by Total Commander.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *petermad »

Not only does a unix-type .lng file crash TC, it also totally prevents it from starting again - without any error message.

Interestingly enough wcmd_*.mnu, wcmd_*.inc and wcmd_*.ini files seems to work fine in unix format.

The above applies to the 64bit version of TC. In the 32bit version - trying to load a unix format .lng file alse crashes TC but without TC's error message, but on the other hand you get this error message if you rty to start 32bit TC again:

Code: Select all

---------------------------
Total Commander 10.00
---------------------------
Access violation at address 004076E5. Write of address 6C617473.
Access violation at address 004076E5. Write of address 6C617473
Windows 7 SP1 Professional 6.1 (Build 7601), base: 00400000

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Windows exception: C0000005
Stack trace:
004076E5
004023FB  004026C4  0041834E  00418396  0043B7BE  0043B496
00473D2C  0044DF4C  0040BB97  0040776F  0040776F  004023FB
004026C4  0044DEA2  0042A42E  0044E9AE  0042A42E  0044DF4C
00402255  004026C4  0044DBC6  0044D88B  0042C50A  004023FB
004026C4  0042B79F  >0042FE20  004272C0  
Raw:
0047676E  0047694E  0040776F  004019F4  00401E05  00401E6D
00406F20  004023FB  004033FC  004023FB  004026C4  004036EF
00455E30  004026C4  00402098  004019F4  00401E05  00401E6D
004013FD  0040149D  00401D34  00401F47  00401F83  0040204A
004013FD  0040149D  0041834E  00418396  0043B7BE  0043B496
00473D2C  0043B7BE  00473D2C  0041834E  00418396  0040776F
0040268F  0040E634  0044DF4C  0042A42E  0040BB97  0040776F
0044E751  004505C8  0040776F  004019F4  00401E05  004020AE
004023FB  004026C4  004036EF  004013FD  0040149D  00401D34
00401F47  00401F83  0040204A  00402255  004026AC  00402D18

Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Ja   Nej   
---------------------------
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *ghisler(Author) »

I agree that it should not crash, so I will definitely add a fix. Btw, mnu files don't work in the 32-bit version, the Delphi readln function only works with Windows line breaks.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *petermad »

history.txt wrote:20.03.22 Fixed: Access violation when trying to use language file .lng with Unix style line breaks (32/64)
Confirmed fixed in TC 10.50b1 :-)

TC now just reverts to internal English.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
arberg
Junior Member
Junior Member
Posts: 9
Joined: 2018-04-20, 10:00 UTC

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *arberg »

Sorry for the 'late' reply. Thank you all. Funny how you don't notice how problems go away, be it your tool or your body, when it works its just nice, when it crashes you suddenly notice the isuse :) In other words, Thx for the fix.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *ghisler(Author) »

Thanks form reporting back! Unfortunately some people never come back after reporting a bug. :(
Author of Total Commander
https://www.ghisler.com
arberg
Junior Member
Junior Member
Posts: 9
Joined: 2018-04-20, 10:00 UTC

Re: TC10 crash on startup if .lng language file has unix newlines

Post by *arberg »

Yeah actually I myself feel bad for doing that once here. I do try to followup at least weekly for a couple of weeks, but sometimes I fail to do even that. As I discovered when I logged in and saw there was a non-empty 'Notifications'-panel :|
Post Reply