?all tabs deleted in one panel - two occurrances

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

The included source code from TC Plugins Manager on totalcmd.net uses WritePrivateProfileString and GetPrivateProfileString.
MarcinW wrote:Well, I forgot about this. So I don't know any way to restrict file access to one thread only.
I don't see how this could be a problem. IO is handled by Windows.
MSDN about WritePrivateProfileSection function wrote:This operation is atomic; no operations that read from or write to the specified initialization file are allowed while the information is being written.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Single call to WritePrivateProfileString is probably atomic (MSDN says only about atomicity of WritePrivateProfileSection), but sequence of calls is not. Let's consider a situation when:

Program A calls:
WritePrivateProfileString('Section','KeyA','100','file.ini');
WritePrivateProfileString('Section','KeyB','100','file.ini');

And Program B calls in the same time:
WritePrivateProfileString('Section','KeyA','200','file.ini');
WritePrivateProfileString('Section','KeyB','200','file.ini');

The result is unpredictable - for example KeyA may have value '100', and KeyB may have value '200'.



But TC Plugins Manager doesn't seem to be a source of the problem. I downloaded its sources and there is no occurrence of 'lefttabs' string. So it doesn't touch tabs.
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

MarcinW wrote:The result is unpredictable - for example KeyA may have value '100', and KeyB may have value '200'.
What has that to do with a section header appearing twice?
MarcinW wrote:But TC Plugins Manager doesn't seem to be a source of the problem. I downloaded its sources and there is no occurrence of 'lefttabs' string. So it doesn't touch tabs.
Perhaps. The user uses version 2.2.7 and the sources are 2.2.8 (aug 2013).
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

white wrote:What has that to do with a section header appearing twice?
Well, nothing - it was just a general note according to atomic operations.


In other words, I've got no idea what is a cause of the problem described by crconner. I only suppose that it's not the TC Plugins Manager - at least in 2.2.8 version.

Regards
User avatar
tuska
Power Member
Power Member
Posts: 4056
Joined: 2007-05-21, 12:17 UTC

[TC8.50b7] - only 1 TAB in left panel

Post by *tuska »

Hi,
all of my tabs (exept for 1) have been deleted in the left panel too a few days ago.

Background (hope that anything could be of help):
- I copied a file Outlook.msg with large file name into a deeply folder structure and
exceeded the file length of 259 characters. LongNameCopy=1 was set at this time
and I didn't get notice of that.
- On the other day I entered the folder with the one file exeeding 259 characters
which I wanted to read and TC got frozen and had to be closed.

[OT: The too long file name could not be renamed neither with TC nor with
Explorer, but with Explorer I could move the remaining 14 files to another folder.
TC got frozen after entering this folder and therefore moving of files was not possible.
The file had gone and shows strange Icon even in Explorer and I deleted file with Shift+Delete]

- After a few restarts I checked the case (too long path and filename) and
tried to find out how long the path and filename of next-to-last folder is

- I took wdx_FilenameChrCount_2.02 from
http://www.totalcmd.net/plugring/wdx_Filename_ChrCount.html

and was surprised that Norton Internet Security has isolated and finally deleted
filename_chrcount.wdx. It was a false alarm, checked here:
http://ghisler.ch/board/viewtopic.php?t=33860

- ... but afterwords I had only 1 Tab in the left panel and I had to reload
my backup saved Standard.tab as even after two restarts of TC only 1 Tab
was shown in the left panel.

Regards
Karl
User avatar
tuska
Power Member
Power Member
Posts: 4056
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

In Addition to the previous:
Norton Internet Security showed the following:
Performance warning:
CPU is heavily used by ...
Windows Error Reporting Dump Reporting Tool
Gruß,
Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

- On the other day I entered the folder with the one file exeeding 259 characters which I wanted to read and TC got frozen and had to be closed.
While TC itself has no problems to handle directories up to 1022 characters long, there may be Explorer extensions called by TC which do not work. Try to temporarily disable icons in TC if you get hangs in such directories.
Author of Total Commander
https://www.ghisler.com
User avatar
tuska
Power Member
Power Member
Posts: 4056
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Thank you for the hint!
I have called Explorer.exe instead of Totalcmd.exe because I always want to have an entry for Norton Internet Security in the context menu to check files on viruses. But this is another story which was mentioned in the forum already.

Regards,
Karl
User avatar
crconner
Junior Member
Junior Member
Posts: 23
Joined: 2004-12-25, 22:44 UTC
Location: USA

Re: [TC8.50b7] - only 1 TAB in left panel

Post by *crconner »

tuska wrote:Hi,
all of my tabs (exept for 1) have been deleted in the left panel too a few days ago.

Background (hope that anything could be of help):
- I copied a file Outlook.msg with large file name into a deeply folder structure and
exceeded the file length of 259 characters. LongNameCopy=1 was set at this time
and I didn't get notice of that.
- On the other day I entered the folder with the one file exeeding 259 characters
which I wanted to read and TC got frozen and had to be closed.

[OT: The too long file name could not be renamed neither with TC nor with
Explorer, but with Explorer I could move the remaining 14 files to another folder.
TC got frozen after entering this folder and therefore moving of files was not possible.
The file had gone and shows strange Icon even in Explorer and I deleted file with Shift+Delete]

- After a few restarts I checked the case (too long path and filename) and
tried to find out how long the path and filename of next-to-last folder is

- I took wdx_FilenameChrCount_2.02 from
http://www.totalcmd.net/plugring/wdx_Filename_ChrCount.html

and was surprised that Norton Internet Security has isolated and finally deleted
filename_chrcount.wdx. It was a false alarm, checked here:
http://ghisler.ch/board/viewtopic.php?t=33860

- ... but afterwords I had only 1 Tab in the left panel and I had to reload
my backup saved Standard.tab as even after two restarts of TC only 1 Tab
was shown in the left panel.

Regards
Karl
Karl,
Did you use PlugIn Manager in this process?
My hero, Mr. Ghisler. License #37856 since 1999.
User avatar
tuska
Power Member
Power Member
Posts: 4056
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

No, I didn't call the PlugIn Manager in this process.

Regards,
Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe it was caused by Norton? Did it "kill" Total Commander when you tried to use the plugin? If yes, this may have happened when TC was updating the tab list...
Author of Total Commander
https://www.ghisler.com
User avatar
tuska
Power Member
Power Member
Posts: 4056
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

I think that this problem (only 1 tab) was caused by Norton in my case.
Total Commander (Explorer.exe in this case) was killed by entering the folder with too long filename (TC shows 299 characters).
But I called Explorer.exe=TC and Totalcmd.exe several times at that time and now I cannot reproduce this constellation. Sorry.

Regards,
Karl
Post Reply