External exception C0000006

Asked

Viewed 985 times

1

This week I’m hitting myself on this mistake on some machines where the system is running.

Excepção externa C0000006 EXCEPTION_IN_PAGE_ERROR

The machines have access to the system through a shared folder on the network. I don’t know how to solve this.

Give to solve the error via programming and how it would be?

  • This is a file problem: they are running the application over the network but they are searching for some file in the shared folder that does not have access and/or does not exist. It may also be that when running through the shared folder, they are looking for resources while application runs in the temporary folder.

  • But there are machines that work all cretin and others not... :(

  • Then try fetching the Event Viewer data from the machines that occur the error to know which resource you cannot use.

  • this is application error...you have to figure out which application is giving this error, and pass the problem to the developer

1 answer

2


This message occurs when your system is started by the way (UNC) or when there is a mapping to a particular drive, both cases accessing Windows servers that use file control block (FCB) for all user connections.
For example: in TS environment.

This problem has been reported by Microsoft several times by Delphi developers and end users, also considering a problem with Windows memory management.

The incident External Exception C0000006 is an IO page error and may occur when Windows tries to load the application into parts in memory.

1. Cause

  • An application is not fully loaded in memory, the system operating tries to fetch more of the application on HD disk so that it continue to operate.
  • The operating system does not load the required part of the program into memory and has a missing page (file control block - FCB).
  • After page failure, the operating system terminates the application with one Externalexception, because it can no longer perform the applying.
  • Removed or inaccessible file;

2. Solution

  • Best Solution: Run the application locally, instead of running from a shared folder on the same server. This prevents the problem from occurring, which indicates that this is an issue in the operating system. Running the application locally on each workstation will require a distributed model or client/server for application updates as opposed to a centralized model (which was possible before with a shared folder location/path UNC).

  • Possible solution: Add compiler directive to application project:

    {$SetPEFlags IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP}
    {$DEFINE IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $ 8000}
    {$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
    {$SetPEFlags IMAGE_FILE_RELOCS_STRIPPED or
             IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP or
             IMAGE_FILE_NET_RUN_FROM_SWAP}
    

This directive will force the program to be fully loaded into memory and may prevent the external exception from occurring randomly.

Microsoft has published a hot-fix to address an instance of the problem reported in http://support.microsoft.com/kb/294816.

See also this guidance on the Embarcadero.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.