[9.50, low priority] Dark mode crashes TC and OS in Win98

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

[9.50, low priority] Dark mode crashes TC and OS in Win98

Post by *Flint »

Foreword: I understand that Windows 9x is obnoxiously outdated now, but the results are a bit too dramatic to ignore.

Basically, when I tried to turn the Dark mode on in Windows 98 SE, I've got the following:
1. The main menu becomes replaced with question marks instead of normal titles (even with English translation active, so it's not an encoding problem).
2. When I try to open the main menu, the TC suddenly crashes (after showing a couple of submenus, or immediately). The crash message is (the wording might not be exact; I translated it from Russian):

Code: Select all

Application TOTALCMD caused memory access violation
in module USER.EXE at address 0007:000026b9.
Registers:
EAX=08170001 CS=17b7 EIP=000026b9 EFLGS=00000202
EBX=00011dfc SS=2307 ESP=00008424 EBP=00a9843a
ECX=0002012a DS=16df ESI=0002068c FS=0e07
EDX=0004004e ES=0000 EDI=00a90000 GS=27f7
Bytes at address CS:EIP:
26 f6 45 04 01 74 68 66 8b 76 08 8d 46 f8 16 50 
Stack content:
0002068c 10d01dfc 000017d7 004e012a 00840000 84620090 012a29b8 068c004e 00000002 00000000 00060000 0000004e 068c0084 30cc0002 068c17b7 84b80002 
3. After that, every other application in Windows starts to crash too, when I try to access their main menu (Notepad, Wordpad, Explorer…).
4. In most cases, trying to reboot the OS after this fails (the system freezes), so I have to reset it.
5. Even if I don't try to reboot it, in most cases Windows itself crashed after some time, even if I no longer try to start TC, so I have to reset it anyway.

As a side note, I'm a bit confused also by the fact that all the Dark mode options are visible in TC by default, with empty INI. From the history log and ForceDarkModeOptions description, I expected them to be hidden in such old Windows versions. But in any case, none of the TC actions should affect the OS so drastically. If it's impossible (or too hard) to fix, better disable dark mode completely in Win9x, than have it work like that.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48108
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.50, low priority] Dark mode crashes TC and OS in Win98

Post by *ghisler(Author) »

Funny, I just fixed this yesterday. The problem is the subclassing of the menu, which seems to be a shared window across all windows. I will have to remove that, which means that the main menu will have a white border.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Re: [9.50, low priority] Dark mode crashes TC and OS in Win98

Post by *Flint »

2ghisler(Author)
Sorry, I did not understand what you meant. If you've fixed that, why do you have to remove it? :?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48108
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.50, low priority] Dark mode crashes TC and OS in Win98

Post by *ghisler(Author) »

I had to remove the subclassing of the main menu window to overdraw its border, because this was causing the crashes - not actually the subclassing itself, but the failure to remove the subclass (window procedure) when done.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Re: [9.50, low priority] Dark mode crashes TC and OS in Win98

Post by *Flint »

Confirm fixed in 9.50rc2, on both items. I can no longer make it crash in dark mode, and also the dark mode itself is now blocked by default (tested in Win98SE and Win2000).

However, I noticed that even with ForceDarkModeOptions=0, in the Options - Colors - Define by file type, the button Dark<->Normal is still there and working. Is that intentional, or a bug?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48108
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [9.50, low priority] Dark mode crashes TC and OS in Win98

Post by *ghisler(Author) »

It allows you to configure the colors, e.g. when you multi-boot or want to re-enable it later. I can't do that for the main color dialog because dark mode is applied immediately there.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Re: [9.50, low priority] Dark mode crashes TC and OS in Win98

Post by *Flint »

I confirm that this switch button is no longer displayed in 9.50 final with ForceDarkModeOptions=0 (and in old Windows, without this key).

I admit that it was a bit of an ambiguous case, so I didn't insist, but I'm glad you decided to change it. I personally think, that it became more consistent this way.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Post Reply