.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘access violation’

“0×0000003B” Stop error on a terminal server in Windows Server 2008

Symptoms
Consider the following scenario:
You install the Terminal Services role on a computer that is running Windows Server 2008.You connect to this terminal server, and then you perform some window-related operations in a terminal server session.
For example, you open and then close some windows in the terminal server session.In this scenario, the computer may restart unexpectedly. Additionally, you receive a Stop error message that resembles the following:

STOP 0×0000003B (parameter1, parameter2, parameter3, parameter4)
SYSTEM_SERVICE_EXCEPTION
Notes
The parameters in this Stop error message may vary, depending on the configuration of the computer.Not all the “Stop 0×0000003B” Stop errors are caused by this issue.

Resolution
This issue occurs because the Rdpwd.sys driver does not check whether a returned list is NULL or not.
When the returned list is NULL, the Rdpwd.sys driver accesses the wrong memory location. Therefore, an access violation exception occurs.

PRB: An Access Violation Occurs If the Sqlsort.dll Version Is Not Compatible with the SQL Server Version

Symptoms
You receive one of the following error messages:When you connect to SQL Server 7.0 from SQL Server Enterprise Manager:

A connection could not be established to <ServerName>.
Reason: SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Please verify SQL Server is running and check your SQL Server registration properties (by right-clicking on the ServerName node) and try again.-Or-When you click Alerts under SQL Server Agent in SQL Server Enterprise Manager:

Error O: SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.Additionally, the Errorlog file in SQL Server 7.0 contains one of the following stack dumps:

SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..********************************************************************************* BEGIN STACK DUMP:*0x/xx/02 03:12:54 spid 7**Exception Address = 04004697 (Ordinal6 + 297)*Exception Code= c0000005 E*Access Violation occurred writing address 00000004* Input Buffer 54 bytes -*e x e cs p _ M S d b u s e r p r i vN ‘ v e r ‘ * …——-Short Stack Dump0×04004697 Module(sqlsort+4697) (Ordinal6+297)0×005bea83 Module(sqlservr+1bea83) (GetUnicodeRange+e7)0×00575825 Module(sqlservr+175825) (CLikeRangeUtil::LikeRangeTransW+2ec)0×00647680 Module(sqlservr+247680) (CXVariant::LikeRangeStart+7b)0×0056d35b Module(sqlservr+16d35b) (COptExpr::PexprFoldMain+103c)0×00443d71 Module(sqlservr+43d71) (COptExpr::PexprFoldMain+b8)0×00443c08 Module(sqlservr+43c08) (COptExpr::PexprFold+3f)0×004e0d3b Module(sqlservr+e0d3b) (CCvtTree::BuildSte+12e)0×004e0c15 Module(sqlservr+e0c15) (BuildSteFromTree+39)0×004e0b97 Module(sqlservr+e0b97) (CStmtCond::Init+4e)0×00438530 Module(sqlservr+38530) (CCompPlan::FCompileStep+f23)0×0043d00f Module(sqlservr+3d00f) (CProchdr::FCompile+5d9)0×0040ec53 Module(sqlservr+ec53) (CSQLSource::FTransform+234)0×0042140c Module(sqlservr+2140c) (CSQLObject::FTransform2+1ab)0×004e1cdc Module(sqlservr+e1cdc) (CSQLObject::FGetFromDisk+627)0×00420f96 Module(sqlservr+20f96) (CSQLObject::FTransform+21a)0×0040e7b9 Module(sqlservr+e7b9) (CSQLSource::Execute+11d)0×0046225f Module(sqlservr+6225f) (CStmtExec::XretLocalExec+127)0×0046211e Module(sqlservr+6211e) (CStmtExec::XretExecute+253)0×0040f487 Module(sqlservr+f487) (CMsqlExecContext::ExecuteStmts+11b)0×0040ef35 Module(sqlservr+ef35) (CMsqlExecContext::Execute+16b)—————————————————————————Error: 0, Severity: 19, State: 0language_exec: Process 7 generated an access violation. SQL Server is terminating this process. -Or-

********************************************************************************* BEGIN STACK DUMP:*0x/xx/02 16:49:07 spid 7**Exception Address = 105B498A*Exception Code= c0000005 E*Access Violation occurred reading address FFFFFFFF* Input Buffer 54 bytes -*e x e cs p _ M S d b u s e r p r i vN ‘ v e r ‘ ………Short Stack Dump0×105b498a Module(UNKNOWN+0)—————————————————————————Error: 0, Severity: 19, State: 0language_exec: Process 7 generated an access violation. SQL Server is terminating this process.***************************************************************************** BEGIN STACK DUMP:*0x/xx/02 16:47:50 spid 7**Exception Address = 105B48FA*Exception Code= c0000096 E* Input Buffer 188 bytes -*E X E C U T Em s d b . d b o . s p _ h e l p _ a l e r t@ o r d e *r _ b y=N ‘ s e v e r i t yA S C ,m e s s a g e _ i dA S *C ,d a t a b a s e _ n a m eD E S C ‘ *—————————————————————————Short Stack Dump0×105b48fa Module(UNKNOWN+0)—————————————————————————Error: 0, Severity: 19, State: 0language_exec: Process 7 generated an access violation. SQL Server is terminating this process.
Resolution
This behavior occurs if the versions of Sqlsort.dll and Sqlservr.exe are not compatible.

BUG: Spy++ Causes Exception in Owner-Drawn Combo Box

Symptoms
Using Spy++ with message logging on an owner-drawn combo box results in oneof the following errors:

First-chance exception in OWNCOMBO.exe (USER32.DLL): 0xC0000005:Access Violation.
-or-

First-chance exception in OWNCOMBO.exe (KERNEL32.DLL): 0xC0000005:Access Violation.This exception is printed out in the Visual C++ debug output window. Thishappens both on Windows 95 and Windows NT version 3.51.
Resolution
This exception is caused by the Spy++ installed Windows hook function. Itdoesn’t cause the program to quit, so no action should be necessary.

BUG: Access Violation Occurs with Non-Updateable Derived Table in UPDATE Statement

Symptoms
If you run a query that tries to update a derived table that contains a UNION statement, a handled Access Violation occurs and the connection is closed. For example, the following query:

declare @x intupdate tset @x = coalesce( @x , 0 ) + nfrom ( select 1 union all select 2 union all select 3 ) as t( n ) returns this error message:

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Connection BrokenSQL Server also prints a stack dump to the error log with text similar to the following example. Please check the error log for the Access Violation and note that the Exception Address is in (res_view(class CAlgStmt *,class TREE * *):

2000-08-28 12:13:37.77 spid51Error: 0, Severity: 19, State: 02000-08-28 12:13:37.77 spid51SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..********************************************************************************* BEGIN STACK DUMP:*08/28/00 12:13:37 spid 51**Exception Address = 0067CA0C (res_view(class CAlgStmt *,class TREE * *) + 000003E3 Line 0+00000000)*Exception Code= c0000005 EXCEPTION_ACCESS_VIOLATION*Access Violation occurred reading address 00000000* Input Buffer 256 bytes -*declare @x intupdate tset @x = coalesce( @x , 0 ) + nfrom ( select*1 union all select 2 union all select 3 ) as t( n )**
Resolution
Microsoft has confirmed this to be a problem in SQL Server 2000.

BUG: “Unhandled exception in EXENAME.EXE(OLE32.DLL): 0xC0000005: Access Violation” when you use an ATL Composite control on computers without Visual C++ installed

Symptoms
When you create an ATL Composite control with other ActiveX controls embedded in it, you may get an access violation in Ole32.dll. Usually, a message box is displayed with the following error message:

Unhandled exception in EXENAME.EXE(OLE32.DLL): 0xC0000005: Access ViolationYou may also see a Web Browser control displayed with the following message, instead of the child ActiveX control:
This page cannot be displayed. Usually, these controls work correctly on computers with Visual C++ installed, but they do not work on computers without Visual C++ installed.
Resolution
The ActiveX controls embedded in the Composite control may be licensed controls. Composite controls and ATL containment do not directly support creation of licensed controls.
When the Composite control attempts to create a licensed control on a computer without providing a run-time license, the Composite control fails with an HRESULT of 0×80040112 (CLASS_E_NOTLICENSED – Class is not licensed for use). The default handling of this failure creates a Web Browser control; the default handling also tries to initialize the Web Browser control with persisted properties of the licensed control. This mismatch of properties may result in an access violation in the Ole32.dll file.
If there is no access violation, the Web Browser control attempts to navigate to a URL that is the string representation of the licensed control’s CLSID. This action results in the error message “The page cannot be displayed.”

An Exception Occurs in WtvMailApp

Symptoms
You may receive an “Access violation while reading from location 0×0FB04000″ exception in the worker thread of the mail program.
Resolution
Offset and length parameters for CWtvMailApp::GetRequestParam that are not valid cause the mail program to try to access memory that is beyond the message’s data.