Azure Service Bus thrown exceptions cluttering debug output - nservicebus

I'm running Azure Service Bus as a transport with NServiceBus. In my Visual Studio Output window, I am getting tons of exceptions thrown. They don't appear to actually be causing any issues with the system, everything works fine. They fire off every 25-30 seconds, so as you can imagine, this really clutters my output log and makes it difficult to read.
This is a sample of what gets printed every 30 seconds or so. This is only a small section of the total lines, roughly about 50-70 lines of FaultException and TimeoutExceptions in no particular order :
Exception thrown: 'System.ServiceModel.FaultException'1' in Microsoft.ServiceBus.dll
Exception thrown: 'System.ServiceModel.FaultException1' in Microsoft.ServiceBus.dll
Exception thrown: 'System.ServiceModel.FaultException1' in Microsoft.ServiceBus.dll
Exception thrown: 'System.ServiceModel.FaultException1' in Microsoft.ServiceBus.dll
Exception thrown: 'System.ServiceModel.FaultException1' in Microsoft.ServiceBus.dll
Exception thrown: 'System.TimeoutException' in Microsoft.ServiceBus.dll

I was able to resolve this by checking "Enable Just My Code" in Tools -> Options -> Debugging -> General.

Related

Exception access violation (msvcrt.dll)

I received silent crashes, and in order to find their reasons, I collected a crash dump. When I try to debug it, I get the error
Exception thrown at 0x748E89EA (msvcrt.dll) in app.exe.10228.dmp:
0xC0000005: Access violation reading location 0x0457351A.
I can’t find out exactly where this error occurs, because it occurs spontaneously during working.
After all, in vb.net there is no direct memory access, where could this error be? Is it possible that it is from the dll files that the program uses?
Call stack of thread in which appeared exception:
ntdll!NtWaitForMultipleObjects+c
KERNELBASE!WaitForMultipleObjectsEx+133
KERNELBASE!WaitForMultipleObjects+18
kernel32!WerpReportFaultInternal+3b7 kernel32!WerpReportFault+9d
kernel32!BasepReportFault+19 KERNELBASE!UnhandledExceptionFilter+2a2
ntdll!__RtlUserThreadStart+3a4e6 ntdll!_RtlUserThreadStart+1b

Stop printing org.mule.exception.CatchMessagingExceptionStrategy errors

In my mule flow, I get org.mule.exception.CatchMessagingExceptionStrategy error printed to log when the message is rejected. I have an exception strategy that can handle the exception, but the error and exception stack trace is printed to the log which will make the log unreadable by time. How can it be stopped? Actually, it is funny to have an error message when something is rejected by a filter, it should just silently work on accepted items.
ERROR 2017-07-10 11:33:18,723 [[...-flow].connector.sftp.mule.default.receiver.01] org.mule.exception.CatchMessagingExceptionStrategy
if you are using a newer mule version the catch exception strategy should allow you to set logException="true" on the catch-exception-strategy element
i.e. <catch-exception-strategy logException="true">
or else you can uncheck the "Log Exceptions" button from within studio's GUI.

Mule global catch exception not being called

I'm using the global exception strategy at this link
Global Catch Exception Strategy is not used
I use a ref to this in each of my flow footers and have also used defaultExceptionStrategy-ref="catchExceptionStrategy" as shown in the link. But this exception
org.mule.exception.DefaultSystemExceptionStrategy: Caught exception in Exception Strategy: null
java.util.ConcurrentModificationException
...
is not being caught by my global exception. My assumption was that this is a message exception and the flow refs would therefore direct it to the global catch. Also that the defaultExceptionStrategy-ref configuration would direct any other exceptions to the global catch.
The log you are showing proves that the exception strategy is actually called but there has been a concurrent modification exception on it. In order to help you further we would need to understand better what is in you message when the exception happens and the actual xml of your exception strategy.

How to debug exception on other thread?

I have a lot of shortlived threads that updates my program, by events fired from a socket connection. My problem is I don't know how to debug this, like how to get the proper information on where in the code the exceptions occur. Because I get for example an exception like below, and this will just be the print in the Immidiate Window. There is no pop-up window, and it does not highlight any line in the code or show even what method it was in.
What am I missing? What I can do to see these things? And what improvements does VS2010 give on this situation, if any?
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in Krs.Ats.IBNet.dll
Go to "Debug -> Exceptions...", locate the "Common Language Runtime Exceptions" and check the "Thrown" mark. Now start debugging your application. Once any of CLR exception occurs the execution will stop on that line.

A first chance exception

I have a project that runs perfect under windows xp.
Now I have tried to run it under Windows 7 and got there a lot of exceptions under Immediate window.
A first chance exception of type 'System.ArgumentNullException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in LP_Wizard.exe
A first chance exception of type 'System.ArgumentException' occurred in LP_Wizard.exe
A first chance exception of type 'System.NullReferenceException' occurred in LP_Wizard.exe
A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentNullException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in LP_Wizard.exe
A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentNullException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in LP_Wizard.exe
A first chance exception of type 'System.ArgumentNullException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in LP_Wizard.exe
Any idea what wrong with that Microsoft.VisualBasic.dll in windows 7 and how i correct that problem ?
Thanks a lot for help .
If you want to pinpoint where the exceptions are occurring, you can select the Debug->Exceptions menu item, and in the dialog that appears, check the first checkbox for "Common Language Runtime Exceptions". This will make the debugger break as soon as an exception occurs instead of only breaking on unhandled exceptions.
This is also one reason why it is generally a bad idea to catch generic exceptions unless you are clearly logging the information caught.
What is happening is the debugger can "see" exceptions as soon as they are raised (hence the "first chance") before any catch block is hit. Any exception which is not handled by a catch block is considered a "second chance" exception and will break normally.
If these exceptions aren't stopping the running of your application because they are unhandled then you are probably OK. Most of the time the exception is handled by code and this isn't a problem. The output is simply Visual Studio letting you know the exceptions were raised.
See the "Avoiding first chance exception messages when the exception is safely handled" question for some methods to reduce this if there are too many to ignore.
Are your in the debugger? Are these exceptions your program is handling? If so you need to find a setting that tells VB to supress warning you of handled exceptions. Maybey this was set when installed on XP but not when you installed on W7. See if this helps:
http://www.helixoft.com/blog/archives/24