Strange Error - InvalidOperationException

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Spam Catcher

    #1

    Strange Error - InvalidOperationException

    Anyone know what this error means?

    The Undo operation encountered a context that is different from what was
    applied in the corresponding Set operation. The possible cause is that a
    context was Set on the thread and not reverted(undone ).


    It seems to pop up when I use nSoftware's IPDaemon...
  • Lance

    #2
    Re: Strange Error - InvalidOperatio nException

    On Jun 1, 12:02 pm, Spam Catcher <spamhoney...@r ogers.comwrote:
    Anyone know what this error means?
    >
    The Undo operation encountered a context that is different from what was
    applied in the corresponding Set operation. The possible cause is that a
    context was Set on the thread and not reverted(undone ).
    >
    It seems to pop up when I usenSoftware'sI PDaemon...
    Can you post the stacktrace?

    --
    Lance


    Comment

    • Spam Catcher

      #3
      Re: Strange Error - InvalidOperatio nException

      Lance <lmrobins@gmail .comwrote in news:1180722740 .878211.47350
      @p47g2000hsd.go oglegroups.com:
      On Jun 1, 12:02 pm, Spam Catcher <spamhoney...@r ogers.comwrote:
      >Anyone know what this error means?
      >>
      >The Undo operation encountered a context that is different from what
      was
      >applied in the corresponding Set operation. The possible cause is
      that a
      >context was Set on the thread and not reverted(undone ).
      >>
      >It seems to pop up when I usenSoftware'sI PDaemon...
      >
      Can you post the stacktrace?

      Hi Lance,

      Thanks for posting the 10035 Winsock Error code... we found the code on
      your blog which allowed us to handle the Operation Would Block error.

      In anycase, the InvalidOperatio nException seems to be the same problem
      as seen here



      Here is the StackTrace:

      at System.Threadin g.Synchronizati onContextSwitch er.Undo()
      at System.Threadin g.ExecutionCont extSwitcher.Und o()
      at System.Threadin g.ExecutionCont ext.runFinallyC ode(Object userData,
      Boolean exceptionThrown )
      at
      System.Runtime. CompilerService s.RuntimeHelper s.ExecuteBackou tCodeHelper
      (Object backoutCode, Object userData, Boolean exceptionThrown )
      at
      System.Runtime. CompilerService s.RuntimeHelper s.ExecuteCodeWi thGuaranteed
      Cleanup(TryCode code, CleanupCode backoutCode, Object userData)
      at System.Threadin g.ExecutionCont ext.RunInternal (ExecutionConte xt
      executionContex t, ContextCallback callback, Object state)
      at System.Threadin g.ExecutionCont ext.Run(Executi onContext
      executionContex t, ContextCallback callback, Object state)
      at System.Net.Cont extAwareResult. Complete(IntPtr userToken)
      at System.Net.Lazy AsyncResult.Pro tectedInvokeCal lback(Object result,
      IntPtr userToken)
      at
      System.Net.Sock ets.BaseOverlap pedAsyncResult. CompletionPortC allback
      (UInt32 errorCode, UInt32 numBytes, NativeOverlappe d* nativeOverlappe d)
      at System.Threadin g._IOCompletion Callback.Perfor mIOCompletionCa llback
      (UInt32 errorCode, UInt32 numBytes, NativeOverlappe d* pOVERLAP)


      As you see - it looks like a REALLY low level error.

      My IPDaemon is hosted in a Windows Form. A reference to the Daemon is
      passed to worker threads which handle each connection. InvokeThrough is
      set to the Form. In order to get rid of the InvalidOperatio nException, I
      had to invoke all calls to the daemon order to remove the error. I had
      to treat IPDaemon like a graphic control - even tho it doesn't touch the
      GUI at all. I'm worried that marshalling all calls through the GUI
      thread will bottleneck the daemon...

      Have you see this problem before?

      I e-mailed IPWorks support and they said the Daemon is supposed to be
      threadsafe?

      Comment

      Working...