The Lock has Already been Initialized

Application Verifier stop message

Locks violation detected. This provides two messages based on your operating system:

  • For Windows Server 2003: The lock has already been initialized.

  • For Windows XP: Lock has been double initialized.

Probable cause

Usually this stop is generated if a critical section has been initialized more than once. In this case, the stack trace in the Tool Window shows the first initialization of the critical section. The current call stack in the debugger shows where the critical section is being initialized again. It is also possible to get this stop if the critical section or its debug information structure has been corrupted. In this case, the stack trace provided in the Tool Window may be incorrect.

Information displayed by Application Verifier in Tool Window

Lock – Critical section address

Owner – N/A

DebugInfo – Critical section debug information address

Description – The lock has already been initialized OR Lock has been double initialized

Trace Description – First Initialization of the lock

Additional information

Check the contents of the current call stack, which shows where the lock is being initialized for the second time. Check the Tool Window to find the stack trace for the first initialization.

Frequency of this error is high.

See Also

Concepts

Lock Verifier