Solved [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Solved [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *petermad »

To reproduce:
  1. Open ONE separate tree.
  2. Open "c:\Users" in the left panel and "c:\Program Files" in the right panel.
  3. Make a View Mode that has for example cm_SrcAllFiles in the "Auto-run commands" field.
  4. Make an Auto Switch Mode rule that applies to c:\Program Files" and uses that View mode.
  5. Save the setings.
  6. Restart TC - in the separate tree "c:\Program Files" is now highlighted instead of c:\Users - this is NOT expected.
  7. Remove the Auto-run command from the View Mode.
  8. Restart TC - in the separate tree c:\Users is now highlighted as expected.
Last edited by petermad on 2022-08-29, 12:17 UTC, edited 2 times in total.
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
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode wit Auto-run command is applied at startup

Post by *white »

Confirmed. But was hard for me to reproduce at first. It's not all the time.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *petermad »

When I tested I had disabled saving Directories and Panels on exit - maybe that help reproducing it.
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
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *white »

petermad wrote: 2022-08-27, 08:40 UTC When I tested I had disabled saving Directories and Panels on exit - maybe that help reproducing it.
No, but changing directories on the right side before exiting seem to help sometime. I don't know, seems quite random.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *petermad »

seems quite random
Not here - steady as a rock.
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
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *white »

petermad wrote: 2022-08-27, 09:52 UTC Not here - steady as a rock.
Try the command cm_SysInfo instead of cm_SrcAllFiles. I bet it always returns to c:\users if you click OK.
User avatar
tuska
Power Member
Power Member
Posts: 3758
Joined: 2007-05-21, 12:17 UTC

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *tuska »

2petermad

I have also tried to recreate the test case (additionally changed storage options, changed directories).
In my case, C:\Users is always selected in the separate directory tree after a restart of TC.
TC_10.51RC3_clean_x64.ini - Windows 11 Pro (x64) Version 21H2 (OS build 22000.918)

Code: Select all

[Configuration]
UseNewDefFont=1
SetEncoding=äö.do.not.remove
firstmnu=2426
FirstTimeIconLib=0
FirstTime=0
test=173
SeparateTreeWidth=160
SeparateTree=1
PanelsVertical=0
onlyonce=0
TrayIcon=0
UseRightButton=1
Savepath=1
Savepanels=1
MarkDirectories=1
AlwaysToRoot=0
SingleClickStart=0
RenameSelOnlyName=0
SaveCommands=1
SaveHistory=1
EverythingForSize=0
GetDirSize=0
CountSpace=1
CountMarked=1
1hourdif=0
CopyComments=6
CommentPreferredFormat=4
IconClickSelection=1
DirTabOptions=824
DirTabLimit=32
DirTabRevert=1
DirTabFilters=1
Aligned extension=1
[ButtonbarCache]
IconDll_default.bar=
IconDll_vertical.bar=
[FileSystemPlugins64]
$checksum$=3014672
[ViewModes]
0_name=<default>
0_icon=
0_options=1|0|0||-1|-1|-1|-1|-1
1_name=cm_SrcAllFiles
1_commands=cm_SrcAllFiles
1_options=1|0|0||-1|-1|-1|-1|-1
[ViewModeSwitch]
Enabled=1
0_rules=+c:\Program Files\
0_mode=1
[left]
path=c:\Users\
ViewMode=0
AutoViewMode=1
activepanelcolor=-1
activepanelcolor2=-1
activepanelcolordark=-1
activepanelcolordark2=-1
ShowAllDetails=1
SpecialView=0
show=1
sortorder=0
negative Sortorder=0
[right]
path=c:\Program Files\
ViewMode=-1
activepanelcolor=-1
activepanelcolor2=-1
activepanelcolordark=-1
activepanelcolordark2=-1
ShowAllDetails=1
SpecialView=0
show=1
sortorder=0
negative Sortorder=0
userspec=*.* !Intel\
[Selection]
0=*.* !Intel\
1=!EIZO\
2=!EIZO
3=*.*
4=*.txt
[1920x1200 (10x20)]
maximized=0
x=288
y=103
dx=1375
dy=1000
Divider=500
DividerQuickView=500
DividerComments=500
Tabstops=250,254,313,190,688,93
monitor(0,0,1920,1200;120)=288,103,1375,1000
[Tabstops]
0=250
1=254
3=313
4=190
6=688
5=93
AdjustWidth=1
[RightHistory]
0=c:\Program Files\
1=c:\Program Files\7-Zip\
2=c:\Program Files\	#1,7-Zip
3=c:\	#3,Program Files
[LeftHistory]
0=c:\Users\
1=c:\	#6,Users
If you could provide me with your Clean.ini, then I could do some more tests.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *petermad »

If you could provide me with your Clean.ini, then I could do some more tests.
here is a clean ini, with the settings added to reproduce the bug.
Spoiler

Code: Select all

[Configuration]
UseIniInProgramDir=7
StartupScreen=0
ResolutionSpecific=0
UseNewDefFont=1
SetEncoding=äö.do.not.remove
firstmnu=3002
FirstTimeIconLib=0
FirstTime=0
SeparateTree=1
PanelsVertical=0
Aligned extension=1
SeparateTreeWidth=207
test=124

[FileSystemPlugins64]
$checksum$=3014672

[ButtonbarCache]
IconDll_default.bar=
IconDll_vertical.bar=

[left]
path=c:\Users\
ViewMode=-1
activepanelcolor=-1
activepanelcolor2=-1
activepanelcolordark=-1
activepanelcolordark2=-1
ShowAllDetails=1
SpecialView=0
show=1
sortorder=0
negative Sortorder=0

[right]
path=c:\Program Files\
ViewMode=-1
activepanelcolor=-1
activepanelcolor2=-1
activepanelcolordark=-1
activepanelcolordark2=-1
ShowAllDetails=1
SpecialView=0
show=1
sortorder=0
negative Sortorder=0

[AllResolutions]
maximized=0
x=344
y=125
dx=1166
dy=800
Divider=500
DividerQuickView=500
DividerComments=500
Tabstops=247,250,304,196,666,100

[Tabstops]
0=247
1=250
3=304
4=196
6=666
5=100
AdjustWidth=1

[ViewModes]
0_name=<default>
0_icon=
0_options=-1|-1|0||-1|-1|-1|-1|-1
1_name=Test
1_commands=cm_SrcAllFiles
1_options=-1|-1|0||-1|-1|-1|-1|-1

[ViewModeSwitch]
Enabled=1
0_rules=+c:\program Files\
0_mode=1
It seems that the StartupScreen=0 parameter is necessary on slow computers.
Last edited by petermad on 2022-08-27, 11:17 UTC, edited 1 time in total.
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
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *white »

petermad wrote: 2022-08-27, 11:00 UTC here is a clean ini, with the settings added to reproduce the bug.
With that ini still random over here.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *petermad »

2white
It seems that the StartupScreen=0 parameter is necessary on slow computers.
Try again with that added.
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
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *white »

2petermad
Yes, that helps :)
User avatar
tuska
Power Member
Power Member
Posts: 3758
Joined: 2007-05-21, 12:17 UTC

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *tuska »

petermad wrote: 2022-08-27, 11:00 UTC ... here is a clean ini, with the settings added to reproduce the bug.
Thanks.

Mmhh.
For me, the marker always stays on c:\Users.
I can't reproduce your point 6. with me.

I wonder what I could do differently.
  1. I have replaced my values in TC_clean_x64.ini with your values from clean.ini.
  2. I start a clean.ini by double-clicking on "C:\totalcmd\Tests\_TC_clean (x64).ini___LNK.lnk" as the second TC instance:
    [2] Total Commander (x64) 10.51RC3.
    Link-target: C:\totalcmd\TOTALCMD64.EXE /N /I="%COMMANDER_PATH%\Tests\TC_clean_x64.ini"
  3. Menu "Show" - Separate Tree - 1 ... is shown
  4. Left panel: c:\Users\ (active), right panel: c:\Program Files\ (inactive)
  5. Menu "Files" - Quit
  6. Double-click on link: _TC_clean (x64).ini___LNK.lnk to restart with TC_clean_x64.ini (values from your .ini!).
  7. c:\Users\ is marked in Separate Tree (Windows 11 Pro x64) *)
  8. I ran a number of tests, such as changing directories, changing windows.
    In the separate directory tree, I always see the folder from the active window,
    which is the left window after a TC restart marked.
*) Just out of interest: Which Windows version do you and white actually use?


Windows 11 Pro (x64) Version 21H2 (OS build 22000.918) | TC 10.51RC3 x64/x86
User avatar
white
Power Member
Power Member
Posts: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *white »

Don't forget StartupScreen=0, that made a lot of difference with me.
tuska wrote: 2022-08-27, 12:44 UTC *) Just out of interest: Which Windows version do you and white actually use?
Same as you.
User avatar
tuska
Power Member
Power Member
Posts: 3758
Joined: 2007-05-21, 12:17 UTC

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *tuska »

white wrote: 2022-08-27, 13:15 UTC Don't forget StartupScreen=0, that made a lot of difference with me.
Thanks for the tip! :)
I added the parameter StartupScreen=0 in the TC_clean_x64.ini (values from petermad) and immediately noticed an error afterwords:

After I started the TC as described above under point 2., the folder c:\Program Files was marked in the separate directory tree
although the focus was on c:\Users.

Then I pressed the TAB key twice to get the correct view.
Files - Quit
Restart TC
The error is again present as described before.

TAB, TAB (c:\Users\ is marked)
Deletion of cm_SrcAllFiles in View mode
Files - Quit
Restart TC
c:\Users\ is marked => OK!

StartupScreen=0 removed from TC_clean_x64.ini
Start TC
c:\Users\ is marked => OK!
Files - Quit
Restart TC
c:\Users\ is marked => OK!

Code: Select all

View Mode "Test":	Auto-run commands: cm_SrcAllFiles  ) EN: The error does NOT occur with these parameters at the same time!
							   ) DE: Mit diesen Parametern gleichzeitig tritt der Fehler NICHT auf!
[Configuration]		StartupScreen=1			   ) Turn splash screen at startup on/off (on=1, off=0)
- OR -							   )
[Configuration]		StartupScreen=     Not present     )
The deletion of cm_SrcAllFiles in View mode then has no effect any more (pls see: 7. Remove the Auto-run command from the View Mode.)
(also as shown above as an example "Deletion of cm_SrcAllFiles in View mode"),
i.e. after a TC restart the folder "Users" is marked on the "Separate Tree".

Thus, for me StartupScreen=0 is NOT compatible with the "Separate Tree" under Windows 11 Pro.
Windows 11 Pro (x64) Version 21H2 (OS Build 22000.918) ... StartupScreen 0 on *** slow *** computers ...
https://aka.ms/Windows11/ReleaseInfo

Code: Select all

Sources	 		msinfo32.exe (System Information), Windows logo key + Pause key (System > About)
.
OS Name			Microsoft Windows 11 Pro
Version			10.0.22000 Build 22000
Processor		Intel(R) Core(TM) i5-12600K 12th Gen, 3.70 GHz, 10 Cores, 16 Logical Processors
Installed RAM		32.0 GB (31.8 GB usable)
System type		64-bit operating system, x64-based processor

Edition			Windows 11 Pro
Version			21H2
Installed on		20/‎06/‎2022
OS build		22000.918
Experience		Windows Feature Experience Pack 1000.22000.918.0
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 10.51rc3] Wrong dir selected in Separate tree, when View Mode with Auto-run command is applied at startup

Post by *petermad »

I guess that if the startup screen is shown then timing of the executing the Automatic View Mode switch is altered so that the bug is not showing up.

I tested first in Windows 7. After hearing that you guys could not confirm the error, I tested in Windows 10, and at first could not reproduce the errror, but noticed the startupscreen that stays on for much longer in my Windows 10, because my Windows 10 computer is much slower, and Windows 10 is also slower that Windows 7. That gave me the idea to set the StartupScreen=0 parameter.

The fact that White could some times reproduce the error, but not always, also makes me think that it is a timing problem.
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
Post Reply