.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 ‘violation’

FIX: A NullReferenceException error occurs when you run a .NET Framework 2.0 program

Symptoms
When you run a Microsoft .NET Framework 2.0 program, aNullReferenceException error occurs, or you receive an access violation error message. If you debug the crash, you find an access violation in the MSCORJIT!emitter::emitJumpDistBind function.
Resolution
This problem occurs because of an optimization bug in the just-in-time (JIT) compiler.

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.

An illegal instruction exception or an access violation exception causes the Intersite Messaging service to crash

Symptoms
An illegal instruction (C00000FD) exception or an access violation (C0000005) exception occurs in the Intersite Messaging service (ismserv.exe). The exception causes ismserv.exe to crash.
Resolution
This problem occurs if a function in the Adsiis.dll component leaves a released cache item in the server cache when a remote procedure call (RPC) error occurs. When a subsequent client request tries to use the released cache item, the illegal instruction exception or the access violation exception occurs.

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.