chkdsk unmounting volume >> C0000006 exception
Moderators: Hacker, petermad, Stefan2, white
chkdsk unmounting volume >> C0000006 exception
Hello, I found some ways to raise the C0000006 exception (EXCEPTION_IN_PAGE_ERROR / STATUS_IN_PAGE_ERROR). Steps to reproduce (tested on Windows XP with TC 9.0 beta3 32-bit):
1) Launch TC and ensure, that immediately after TC start, drive c: has been displayed at least in one panel.
2) Launch "chkdsk c: /f" command from the command line.
3) Chkdsk says that it needs to force the volume unmounting, because the volume is in use. Choose Yes to unmount.
4) Chkdsk says that all opened handles to the volume are invalid now.
Case A) Close TC. The following exception occurs randomly, but with high probability:
---------------------------
Application Error
---------------------------
Exception EExternalException in module TOTALCMD.EXE at 0026C6B8.
External exception C0000006.
---------------------------
OK
---------------------------
Case B) Select "Configuration -> Options..." or "Start -> Change Main Menu..." or "Help -> About Total Commander" or "Commands -> CD Tree". The following problem occurs:
---------------------------
Total Commander 9.0ß3
---------------------------
External exception C0000006.
(In-page I/O error or EResNotFound)
This error usually means that Total Commander or a DLL used by it
could not access its program file due to temporary network problems.
Continue execution?
---------------------------
Yes No
---------------------------
Maybe, in case B), the resource DLL could be reopened in case of the C0000006 exception.
Regards
1) Launch TC and ensure, that immediately after TC start, drive c: has been displayed at least in one panel.
2) Launch "chkdsk c: /f" command from the command line.
3) Chkdsk says that it needs to force the volume unmounting, because the volume is in use. Choose Yes to unmount.
4) Chkdsk says that all opened handles to the volume are invalid now.
Case A) Close TC. The following exception occurs randomly, but with high probability:
---------------------------
Application Error
---------------------------
Exception EExternalException in module TOTALCMD.EXE at 0026C6B8.
External exception C0000006.
---------------------------
OK
---------------------------
Case B) Select "Configuration -> Options..." or "Start -> Change Main Menu..." or "Help -> About Total Commander" or "Commands -> CD Tree". The following problem occurs:
---------------------------
Total Commander 9.0ß3
---------------------------
External exception C0000006.
(In-page I/O error or EResNotFound)
This error usually means that Total Commander or a DLL used by it
could not access its program file due to temporary network problems.
Continue execution?
---------------------------
Yes No
---------------------------
Maybe, in case B), the resource DLL could be reopened in case of the C0000006 exception.
Regards
Re: chkdsk unmounting volume >> C0000006 exception
That won't even work when C: is your Windows/system partition, which is the case on the majority of systems (excluding all of mine). Chkdsk will require you to restart the system to check the system partition because it can't be unounted while the system is using it. So, in what ways is the reported issue relevant? In cases where TC is installed on a partition that is not the system partition - which are mostly portable TCs, I guess...MarcinW wrote:2) Launch "chkdsk c: /f" command from the command line.
3) Chkdsk says that it needs to force the volume unmounting, because the volume is in use. Choose Yes to unmount.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: chkdsk unmounting volume >> C0000006 exception
Let's the Author decide.Dalai wrote:So, in what ways is the reported issue relevant?
It's also theoretically possible, that these errors are symptoms of some more serious problem, so it's sometimes worth to take a look even at such unusual cases.
Regards
Re: chkdsk unmounting volume >> C0000006 exception
Its also theoretically possible that the World explodes while TC is running.MarcinW wrote:Let's the Author decide.Dalai wrote:So, in what ways is the reported issue relevant?
It's also theoretically possible, that these errors are symptoms of some more serious problem, so it's sometimes worth to take a look even at such unusual cases.
Regards
Hopefully Christian handles this case to

When some function calculates - let's say - a PI number and returns 4.1415 instead of 3.1415, it may be a math error - but also a symptom of some other problem, like other thread overwriting the memory.
Since I don't see any, even theoretical, connection between TC and the World, I don't worry about TC
Since I don't see any, even theoretical, connection between TC and the World, I don't worry about TC

- ghisler(Author)
- Site Admin
- Posts: 50856
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately there is nothing I can do - the crash happens outside of Total Commander, when Windows tries to load parts of its EXE into memory.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50856
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately it would leave TC in an unstable state when part of its functions cannot be loaded from the EXE image.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I think there is a safe and good solution for Case A):
By calling Abort instead of re-raising the original exception, we can avoid showing the error dialog if TC is just terminating (the error dialog is useless in this case) - while the execution path does not change.
If the Case A) code can be executed only when TC is terminating, the "if Application.Terminated then" line is not necessary.
Code: Select all
try
// make a call to 0026C6B8 here
except
on E:Exception do
begin
if Application.Terminated then
if E is EExternalException then
if Assigned(EExternalException(E).ExceptionRecord) then
if EExternalException(E).ExceptionRecord^.ExceptionCode = STATUS_IN_PAGE_ERROR then
Abort;
raise;
end;
end;
If the Case A) code can be executed only when TC is terminating, the "if Application.Terminated then" line is not necessary.