none
System.AccessViolationException: Attempted to read or write protected memory RRS feed

  • Frage

  • Hello,

    I implemented a WCF service (hosted as windows service) and have problems the following exception. My question is: Why do I get a AccessViolationException, although the service trace says there was thrown a OracleException?

    The System.Diagnostics.TextWriterTraceListener wrote:

    log4net:ERROR [AdoNetAppender] Exception while writing to database
    System.Data.OracleClient.OracleException: ORA-01461: can bind a LONG value only for insert into a LONG column
      at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
      at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
      at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor)
      at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
      at log4net.Appender.AdoNetAppender.SendBuffer(IDbTransaction dbTran, LoggingEvent[] events)
      at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] events)
    

    But log4net logged:

    FATAL 03.01.11 16:37:03 [     7072]: Ein unbehandelter Fehler ist aufgetreten (sender: Name:<span lang="DE">RORC.Deal_Archive.</span>DealsServices.exe
    There are no context policies.
    , exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
      at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
      at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential, ExtendedProtectionPolicy policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
      at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
      at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeAcceptor.OnAcceptUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
      at System.ServiceModel.Channels.StreamSecurityUpgradeAcceptorBase.AcceptUpgrade(Stream stream)
      at System.ServiceModel.Channels.InitialServerConnectionReader.UpgradeConnection(IConnection connection, StreamUpgradeAcceptor upgradeAcceptor, IDefaultCommunicationTimeouts defaultTimeouts)
      at System.ServiceModel.Channels.ServerSessionPreambleConnectionReader.ServerFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
      at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
      at System.ServiceModel.Channels.CommunicationObject.Open()
      at System.ServiceModel.Dispatcher.ChannelHandler.OpenAndEnsurePump()
      at System.ServiceModel.Dispatcher.ChannelHandler.OpenAndEnsurePump(Object state)
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.OnSecurityContextCallback(Object o)
      at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
      at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
      at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)) 
     System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
      at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
      at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential, ExtendedProtectionPolicy policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
      at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
      at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeAcceptor.OnAcceptUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
      at System.ServiceModel.Channels.StreamSecurityUpgradeAcceptorBase.AcceptUpgrade(Stream stream)
      at System.ServiceModel.Channels.InitialServerConnectionReader.UpgradeConnection(IConnection connection, StreamUpgradeAcceptor upgradeAcceptor, IDefaultCommunicationTimeouts defaultTimeouts)
      at System.ServiceModel.Channels.ServerSessionPreambleConnectionReader.ServerFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
      at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
      at System.ServiceModel.Channels.CommunicationObject.Open()
      at System.ServiceModel.Dispatcher.ChannelHandler.OpenAndEnsurePump()
      at System.ServiceModel.Dispatcher.ChannelHandler.OpenAndEnsurePump(Object state)
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.OnSecurityContextCallback(Object o)
      at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
      at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
      at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
      at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
    
    
    

    PS: I wonder why the application log shows .Net 2.0 for Event Source since the service is compiled with .Net 3.5 and there is no supportedRuntime-information in app.config:

    Event Type: Error
    Event Source: .NET Runtime 2.0 Error Reporting
    Event Category: None
    Event ID: 5000
    Date: 03.01.2011
    Time: 16:37:05
    User: N/A
    Computer: xx
    Description:
    EventType clr20r3, P1 rorc.deal_archive.dealsservices, P2 1.0.0.0, P3 4d1b11d7, P4 system, P5 2.0.0.0, P6 4ba85929, P7 2bd4, P8 71, P9 system.accessviolationexception, P10 NIL.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 63 00 6c 00 72 00 32 00  c.l.r.2.
    0008: 30 00 72 00 33 00 2c 00  0.r.3.,.
    0010: 20 00 72 00 6f 00 72 00  .r.o.r.
    0018: 63 00 2e 00 64 00 65 00  c...d.e.
    0020: 61 00 6c 00 5f 00 61 00  a.l._.a.
    0028: 72 00 63 00 68 00 69 00  r.c.h.i.
    0030: 76 00 65 00 2e 00 64 00  v.e...d.
    0038: 65 00 61 00 6c 00 73 00  e.a.l.s.
    0040: 73 00 65 00 72 00 76 00  s.e.r.v.
    0048: 69 00 63 00 65 00 73 00  i.c.e.s.
    0050: 2c 00 20 00 31 00 2e 00  ,. .1...
    0058: 30 00 2e 00 30 00 2e 00  0...0...
    0060: 30 00 2c 00 20 00 34 00  0.,. .4.
    0068: 64 00 31 00 62 00 31 00  d.1.b.1.
    0070: 31 00 64 00 37 00 2c 00  1.d.7.,.
    0078: 20 00 73 00 79 00 73 00  .s.y.s.
    0080: 74 00 65 00 6d 00 2c 00  t.e.m.,.
    0088: 20 00 32 00 2e 00 30 00  .2...0.
    0090: 2e 00 30 00 2e 00 30 00  ..0...0.
    0098: 2c 00 20 00 34 00 62 00  ,. .4.b.
    00a0: 61 00 38 00 35 00 39 00  a.8.5.9.
    00a8: 32 00 39 00 2c 00 20 00  2.9.,. .
    00b0: 32 00 62 00 64 00 34 00  2.b.d.4.
    00b8: 2c 00 20 00 37 00 31 00  ,. .7.1.
    00c0: 2c 00 20 00 73 00 79 00  ,. .s.y.
    00c8: 73 00 74 00 65 00 6d 00  s.t.e.m.
    00d0: 2e 00 61 00 63 00 63 00  ..a.c.c.
    00d8: 65 00 73 00 73 00 76 00  e.s.s.v.
    00e0: 69 00 6f 00 6c 00 61 00  i.o.l.a.
    00e8: 74 00 69 00 6f 00 6e 00  t.i.o.n.
    00f0: 65 00 78 00 63 00 65 00  e.x.c.e.
    00f8: 70 00 74 00 69 00 6f 00  p.t.i.o.
    0100: 6e 00 20 00 4e 00 49 00  n. .N.I.
    0108: 4c 00 0d 00 0a 00     L..... 

     

    Dienstag, 4. Januar 2011 07:38

Antworten

Alle Antworten