1

Topic: agsXMPP - I can not catch an exception

There is an application, sta.net-4.0, winforms in it the client agsXMPP subscriptions on AppDomain.CurrentDomain.UnhandledException and Application is used jabber. ThreadException is. Sometimes, at problems with a network from bowels agsXMPP the exception which not where is not caught falls and does not get to broad gulls. Application falls, in the event log appears . Application:.... The platform Version: v4.0.30319 the Description. Process has been completed because of a raw exception. Convergence on an exception: System. NullReferenceException in agsXMPP.Xml. StreamParser. Push (Byte [], Int32, Int32) in agsXMPP.XmppConnection. SocketOnReceive (System. Object, Byte [], Int32) in agsXMPP.net. BaseSocket. FireOnReceive (Byte [], Int32) in agsXMPP.net. ClientSocket. EndReceive (System. IAsyncResult) in System. Net. LazyAsyncResult. Complete (IntPtr) in System.Net.ContextAwareResult.CompleteCallback (System. Object) in System.Threading.ExecutionContext.runTryCode (System. Object) in System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup (TryCode, CleanupCode, System. Object) in System.Threading.ExecutionContext.RunInternal (System. Threading. ExecutionContext, System. Threading. ContextCallback, System. Object) in System. Threading. ExecutionContext. Run (System. Threading. ExecutionContext, System. Threading. ContextCallback, System. Object, Boolean) in System. Threading. ExecutionContext. Run (System. Threading. ExecutionContext, System. Threading. ContextCallback, System. Object) in System. Net. ContextAwareResult. Complete (IntPtr) in System.Net.LazyAsyncResult.ProtectedInvokeCallback (System. Object, IntPtr) in System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback (UInt32, UInt32, System. Threading. NativeOverlapped *) in System.Threading._IOCompletionCallback.PerformIOCompletionCallback (UInt32, UInt32, System. Threading. NativeOverlapped *) I do not understand, how I should catch this exception. Why all application at me falls? Can prompt - where to dig. At me only two ideas: 1. To dig inside agsXMPP and something there  2. Operation with agsXMPP to deduce in separate process. As-so, I cannot control all exceptions in the managed application. Can prompt - where to dig? I.e. In essence, it is necessary that application did not fall all.

2

Re: agsXMPP - I can not catch an exception

Hello, pumpurumer, you wrote: P> P> Convergence on an exception: System. NullReferenceException P> in agsXMPP.Xml. StreamParser. Push (Byte [], Int32, Int32) P> in agsXMPP.XmppConnection. SocketOnReceive (System. Object, Byte [], Int32) P> P> I do not understand, how I should catch this exception. Why all application at me falls? P> can prompt - where to dig. P> at me only two ideas: P> 1. To dig inside agsXMPP and something there  Well, I to begin with would open the Reflector  agsXMPP, would glance in function Push and would look what variable can be . Probably, the search circle will be narrowed.

3

Re: agsXMPP - I can not catch an exception

Hello, pumpurumer, you wrote: P> in agsXMPP.Xml. StreamParser. Push (Byte [], Int32, Int32) P> in agsXMPP.XmppConnection. SocketOnReceive (System. Object, Byte [], Int32) P> in agsXMPP.net. BaseSocket. FireOnReceive (Byte [], Int32) P> in agsXMPP.net. ClientSocket. EndReceive (System. IAsyncResult) P> in System. Net. LazyAsyncResult. Complete (IntPtr) P> in System.Net.ContextAwareResult.CompleteCallback (System. Object) P> in System.Threading.ExecutionContext.runTryCode (System. Object) P> in System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup (TryCode, CleanupCode, System. Object) P> in System.Threading.ExecutionContext.RunInternal (System. Threading. ExecutionContext, System. Threading. ContextCallback, System. Object) P> in System. Threading. ExecutionContext. Run (System. Threading. ExecutionContext, System. Threading. ContextCallback, System. Object, Boolean) P> in System. Threading. ExecutionContext. Run (System. Threading. ExecutionContext, System. Threading. ContextCallback, System. Object) P> in System. Net. ContextAwareResult. Complete (IntPtr) P> in System.Net.LazyAsyncResult.ProtectedInvokeCallback (System. Object, IntPtr) P> in System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback (UInt32, UInt32, System. Threading. NativeOverlapped *) P> in System.Threading._IOCompletionCallback.PerformIOCompletionCallback (UInt32, UInt32, System. Threading. NativeOverlapped *) P> [/cs] P> I do not understand, how I should catch this exception. Why all application at me falls? P> can prompt - where to dig. P> at me only two ideas: P> 1. To dig inside agsXMPP and something there  It seems that only so. I fluently esteemed - problems in PerformIOCompletionCallback () as a rule that the application-oriented code (agsXMPP.XmppConnection. SocketOnReceive () and is deeper on a stack) not thread-safe. And to intercept an exception thrown in another's flow, by means of UnhandledException, does not quit. P> 2. Operation with agsXMPP to deduce in separate process. P> as-so, I cannot control all exceptions in the managed application. P> can prompt - where to dig? I.e. it is basic, it is necessary that application did not fall all. Get  on https://github.com/meebey/agsxmpp/

4

Re: agsXMPP - I can not catch an exception

5

Re: agsXMPP - I can not catch an exception

Hello, Sinclair, you wrote: S> And to intercept an exception thrown in another's flow, by means of UnhandledException, does not quit. AppDomain. CurrentDomain should intercept...

6

Re: agsXMPP - I can not catch an exception

Hello, Sharov, you wrote: S> Hello, Sinclair, you wrote: S>> And to intercept an exception thrown in another's flow, by means of UnhandledException, does not quit. S> AppDomain. CurrentDomain should intercept... Does not intercept, it is proved by an empirical way.

7

Re: agsXMPP - I can not catch an exception

Hello, Sharov, you wrote: S> AppDomain. CurrentDomain should intercept... And after call UnhandledException application will be all the same shot down.

8

Re: agsXMPP - I can not catch an exception

9

Re: agsXMPP - I can not catch an exception

Hello, Sinclair, you wrote: S> And after call UnhandledException application will be all the same shot down. Judging by it, it is valid so. But why the HARDWARE cannot intercept an exception of other flow? Also what other flow in a domain context (that is superficial process) means?

10

Re: agsXMPP - I can not catch an exception

Hello, Sharov, you wrote: S> Judging by it, it is valid so. That's not the point. Event UnhandledException () allows to write down, for example, exception details in a broad gull. Any handholds to tell CLR "Well and a horse-radish with it, continue to work" in the output agent is not present. S> But why the HARDWARE cannot intercept an exception of other flow? Also what other flow in a domain context (that is superficial process) means? It means that the stack begins with the asynchronous output agent who is caused in the arbitrary flow from a pool. Therefore it is impossible to make, for example, at itself in application try {Application. Run} catch (Exception) {}.

11

Re: agsXMPP - I can not catch an exception

Hello, pumpurumer, you wrote: P> there is an application, sta.net-4.0, winforms P> in it the client agsXMPP P> subscriptions on AppDomain.CurrentDomain.UnhandledException and Application is used jabber. ThreadException is. P> sometimes, at problems with a network from bowels agsXMPP the exception which not where is not caught falls and does not get to broad gulls. P> application falls, in the event log appears . Adjust Windows Error Reporing that it collected  the fallen application. Arrange falling independently - through unsafe most easier to collect test  and to be convinced that all demanded debug symbols are accessible to you. Then at you after falling will be high-grade  into which it will be possible to come simply a debugger and to research a question.

12

Re: agsXMPP - I can not catch an exception

Hello, Sinclair, you wrote: S>> But why the HARDWARE cannot intercept an exception of other flow? Also what other flow in a domain context (that is superficial process) means? S> It means that the stack begins with the asynchronous output agent who is caused in the arbitrary flow from a pool. It is possible more in detail a little. About that the raw exception in a pool flow cuts down application (domain), I know. But why it does not manage to be caught for  at domain level?