I'm building an ASP .NET Core MVC app, and I started encountering a random StackOverflowException, it happens when the aplication is idle rather than when I perform an Http request, so I'm having a hard time finding where the problem might be. I have the stack trace, and I see a recursion that should be whats causing the call stack to overflow, but it is from a method from framework itself, so I can't find the underlying cause.
I tried simplifying my ViewModels using DTOs instead of model objects, and at first it looked like it was working, the app was working 8 hours without crashing with the StackOverflowException (normally it happened 10-15 minutes from when I started the app), but now it started happening again, here is my call stack:
> System.Private.CoreLib.dll!System.ModuleHandle.ResolveMethod(System.Runtime.CompilerServices.QCallModule module, int methodToken, System.IntPtr* typeInstArgs, int typeInstCount, System.IntPtr* methodInstArgs, int methodInstCount)
System.Private.CoreLib.dll!System.ModuleHandle.ResolveMethodHandleInternal(System.Reflection.RuntimeModule module, int methodToken, System.IntPtr[] typeInstantiationContext, int typeInstCount, System.IntPtr[] methodInstantiationContext, int methodInstCount) Línea 1405
System.Private.CoreLib.dll!System.ModuleHandle.ResolveMethodHandle(int methodToken, System.RuntimeTypeHandle[] typeInstantiationContext, System.RuntimeTypeHandle[] methodInstantiationContext) Línea 1390
System.Private.CoreLib.dll!System.RuntimeType.GetMethodBase(System.Reflection.RuntimeModule scope, int typeMetadataToken) Línea 1743
System.Private.CoreLib.dll!System.Reflection.RuntimeCustomAttributeData.RuntimeCustomAttributeData(System.Reflection.RuntimeModule scope, System.Reflection.MetadataToken caCtorToken, System.Reflection.ConstArray blob) Línea 273
System.Private.CoreLib.dll!System.Reflection.RuntimeCustomAttributeData.GetCustomAttributes(System.Reflection.RuntimeModule module, int tkTarget) Línea 213
System.Private.CoreLib.dll!System.Reflection.RuntimeCustomAttributeData.GetCustomAttributesInternal(System.RuntimeType target) Línea 22
System.Private.CoreLib.dll!System.Reflection.CustomAttributeData.GetCustomAttributes(System.Reflection.MemberInfo target) Línea 18
Microsoft.Extensions.Logging.dll!Microsoft.Extensions.Logging.ProviderAliasUtilities.GetAlias(System.Type providerType)
Microsoft.Extensions.Logging.dll!Microsoft.Extensions.Logging.LoggerRuleSelector.Select(Microsoft.Extensions.Logging.LoggerFilterOptions options, System.Type providerType, string category, out Microsoft.Extensions.Logging.LogLevel? minLevel, out System.Func<string, string, Microsoft.Extensions.Logging.LogLevel, bool> filter)
Microsoft.Extensions.Logging.dll!Microsoft.Extensions.Logging.LoggerFactory.ApplyFilters(Microsoft.Extensions.Logging.LoggerInformation[] loggers)
Microsoft.Extensions.Logging.dll!Microsoft.Extensions.Logging.LoggerFactory.RefreshFilters(Microsoft.Extensions.Logging.LoggerFilterOptions filterOptions)
Microsoft.Extensions.Options.dll!Microsoft.Extensions.Options.OptionsMonitorExtensions.OnChange.AnonymousMethod__0(System.__Canon o, string _)
Microsoft.Extensions.Options.dll!Microsoft.Extensions.Options.OptionsMonitor<System.__Canon>.ChangeTrackerDisposable.OnChange(System.__Canon options, string name)
Microsoft.Extensions.Options.dll!Microsoft.Extensions.Options.OptionsMonitor<Microsoft.Extensions.Logging.LoggerFilterOptions>.InvokeChanged(string name)
Microsoft.Extensions.Options.dll!Microsoft.Extensions.Options.OptionsMonitor<System.__Canon>..ctor.AnonymousMethod__6_2(string name)
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<string>.OnChangeTokenFired()
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<string>.RegisterChangeTokenCallback.AnonymousMethod__7_0(object s)
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Invoke(System.Delegate d, object state, System.Threading.CancellationTokenSource source) Línea 902
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.CallbackNode.ExecuteCallback.AnonymousMethod__9_0(object s) Línea 1139
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Línea 183
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.CallbackNode.ExecuteCallback() Línea 1141
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(bool throwOnFirstException) Línea 722
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.NotifyCancellation(bool throwOnFirstException) Línea 639
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Cancel() Línea 221
Microsoft.Extensions.Configuration.dll!Microsoft.Extensions.Configuration.ConfigurationManager.RaiseChanged()
Microsoft.Extensions.Configuration.dll!Microsoft.Extensions.Configuration.ConfigurationManager.AddSource.AnonymousMethod__1()
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.OnChange.AnonymousMethod__0_0(System.Action callback)
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<System.Action>.OnChangeTokenFired()
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<System.Action>.RegisterChangeTokenCallback.AnonymousMethod__7_0(object s)
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Invoke(System.Delegate d, object state, System.Threading.CancellationTokenSource source) Línea 902
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.CallbackNode.ExecuteCallback.AnonymousMethod__9_0(object s) Línea 1139
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Línea 183
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.CallbackNode.ExecuteCallback() Línea 1141
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(bool throwOnFirstException) Línea 722
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.NotifyCancellation(bool throwOnFirstException) Línea 639
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Cancel() Línea 221
Microsoft.Extensions.Configuration.dll!Microsoft.Extensions.Configuration.ConfigurationProvider.OnReload()
Microsoft.Extensions.Configuration.FileExtensions.dll!Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(bool reload)
Microsoft.Extensions.Configuration.FileExtensions.dll!Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor.AnonymousMethod__1_1()
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.OnChange.AnonymousMethod__0_0(System.Action callback)
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<System.Action>.OnChangeTokenFired()
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<System.Action>.RegisterChangeTokenCallback.AnonymousMethod__7_0(object s)
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Invoke(System.Delegate d, object state, System.Threading.CancellationTokenSource source) Línea 902
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Register(System.Delegate callback, object stateForCallback, System.Threading.SynchronizationContext syncContext, System.Threading.ExecutionContext executionContext) Línea 610
System.Private.CoreLib.dll!System.Threading.CancellationToken.Register(System.Delegate callback, object state, bool useSynchronizationContext, bool useExecutionContext) Línea 290
System.Private.CoreLib.dll!System.Threading.CancellationToken.UnsafeRegister(System.Action<object> callback, object state) Línea 248
and then it starts repeating this calls until it overflows:
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.CancellationChangeToken.RegisterChangeCallback(System.Action<object> callback, object state)
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<System.Action>.RegisterChangeTokenCallback(Microsoft.Extensions.Primitives.IChangeToken token)
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<System.__Canon>.OnChangeTokenFired()
Microsoft.Extensions.Primitives.dll!Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<System.Action>.RegisterChangeTokenCallback.AnonymousMethod__7_0(object s)
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Invoke(System.Delegate d, object state, System.Threading.CancellationTokenSource source) Línea 902
System.Private.CoreLib.dll!System.Threading.CancellationTokenSource.Register(System.Delegate callback, object stateForCallback, System.Threading.SynchronizationContext syncContext, System.Threading.ExecutionContext executionContext) Línea 610
System.Private.CoreLib.dll!System.Threading.CancellationToken.Register(System.Delegate callback, object state, bool useSynchronizationContext, bool useExecutionContext) Línea 290
System.Private.CoreLib.dll!System.Threading.CancellationToken.UnsafeRegister(System.Action<object> callback, object state) Línea 248
Related
We're using following OWIN middleware in our web app to impersonate user based on incoming request.
public class SomeMiddleware : OwinMiddleware
{
public SomeMiddleware(OwinMiddleware next) : base(next)
public override async Task Invoke(IOwinContext context)
{
var identity = context.Authentication.User?.Identity;
if(identity is WindowsIdentity windowsIdentity)
{
using var ctx = windowsIdentity.Impersonate();
await Next.Invoke(context);
}
}
}
The other middleware in pipeline logs stuff with log4net. The appender layout template has user identity.
Sometimes the web app blows up with following error.
System.ObjectDisposedException: Safe handle has been closed
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
at Microsoft.Win32.Win32Native.GetTokenInformation(SafeAccessTokenHandle TokenHandle, UInt32 TokenInformationClass, SafeLocalAllocHandle TokenInformation, UInt32 TokenInformationLength, UInt32& ReturnLength)
at System.Security.Principal.WindowsIdentity.GetTokenInformation(SafeAccessTokenHandle tokenHandle, TokenInformationClass tokenInformationClass)
at System.Security.Principal.WindowsIdentity.get_User()
at System.Security.Principal.WindowsIdentity.GetName()
at System.Security.Principal.WindowsIdentity.get_Name()
at log4net.Core.LoggingEvent.get_Identity()
at log4net.Layout.Pattern.IdentityPatternConverter.Convert(TextWriter writer, LoggingEvent loggingEvent)
at log4net.Layout.Pattern.PatternLayoutConverter.Convert(TextWriter writer, Object state)
at log4net.Util.PatternConverter.Format(TextWriter writer, Object state)
at log4net.Layout.PatternLayout.Format(TextWriter writer, LoggingEvent loggingEvent)
at log4net.Appender.AppenderSkeleton.RenderLoggingEvent(TextWriter writer, LoggingEvent loggingEvent)
at log4net.Appender.TextWriterAppender.Append(LoggingEvent loggingEvent)
at log4net.Appender.FileAppender.Append(LoggingEvent loggingEvent)
at log4net.Appender.RollingFileAppender.Append(LoggingEvent loggingEvent)
at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent loggingEvent)
...
Invalid token for impersonation - it cannot be duplicated.</Message><StackTrace> at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)
at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken, String authType, Int32 isAuthenticated)
at System.Security.Principal.WindowsIdentity..ctor(SafeAccessTokenHandle safeTokenHandle)
at System.Security.SecurityContext.CaptureCore(Reader currThreadEC, StackCrawlMark& stackMark)
at System.Threading.ExecutionContext.Capture(StackCrawlMark& stackMark, CaptureOptions options)
at System.Threading.ExecutionContext.FastCapture()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.GetCompletionAction(Task taskForTracing, MoveNextRunner& runnerToInitialize)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AwaitUnsafeOnCompleted[TAwaiter,TStateMachine](TAwaiter& awaiter, TStateMachine& stateMachine)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()</StackTrace><ExceptionString>System.ArgumentException: Invalid token for impersonation - it cannot be duplicated.
at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)
at System.Security.Principal.WindowsIdentity..ctor(IntPtr userToken, String authType, Int32 isAuthenticated)
at System.Security.Principal.WindowsIdentity..ctor(SafeAccessTokenHandle safeTokenHandle)
at System.Security.SecurityContext.CaptureCore(Reader currThreadEC, StackCrawlMark& stackMark)
at System.Threading.ExecutionContext.Capture(StackCrawlMark& stackMark, CaptureOptions options)
at System.Threading.ExecutionContext.FastCapture()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.GetCompletionAction(Task taskForTracing, MoveNextRunner& runnerToInitialize)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AwaitUnsafeOnCompleted[TAwaiter,TStateMachine](TAwaiter& awaiter, TStateMachine& stateMachine)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()</ExceptionString></Exception></TraceRecord>
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
How likely is the middleware at fault here? Am I looking at the wrong place?
We have a WPF client that connects with SignalR to one of our servers. When closing the WPF client we also close the SignalR HubConnection:
public HubConnection Connection => _connection ??= GetConnection();
private HubConnection GetConnection()
{
var host = ConfigurationManager.AppSettings["SignalRHost"];
var connection = new HubConnectionBuilder()
.WithUrl(host)
.Build();
connection.Closed += ConnectionOnClosed;
return connection;
}
private async Task ConnectionOnClosed(Exception exception)
{
// The connection is disconnected
if (_disconnecting)
{
// The disconnect was requested by the client
Connection.Closed -= ConnectionOnClosed;
Logger.Information("The connection to SignalR hub was closed.");
}
else
{
await StartAsync();
}
}
public async Task Disconnect()
{
if (_disconnecting) return;
try
{
_disconnecting = true;
await _connection.StopAsync();
}
catch (Exception e)
{
Logger.Error(e, "Error in closing connection");
}
finally
{
await _connection.DisposeAsync();
_connection = null;
}
}
Calling CloseAsync results in two ObjectDisposedExceptions. I only have a partial stacktrace (that seems to be another problem in my VS):
System.dll!System.Net.Sockets.NetworkStream.InternalSocket.get() Line 136
System.dll!System.Net.PooledStream.CancelPendingIoAndCloseIfSafe(bool closeWithTimeout, int timeout) Line 596
System.dll!System.Net.PooledStream.Close(int timeout) Line 682
System.dll!System.Net.Connection.AbortOrDisassociate(System.Net.HttpWebRequest request, System.Net.WebException webException) Line 2859
System.dll!System.Net.HttpWebRequest.Abort(System.Exception exception, int abortState) Line 3173
System.dll!System.Net.HttpWebRequest.Abort() Line 3133
System.dll!System.Net.WebSockets.ClientWebSocket.AbortRequest(object obj) Line 366
mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecutionContextCallback(object obj) Line 1031
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917
mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecuteCallback() Line 1021
mscorlib.dll!System.Threading.CancellationTokenSource.CancellationCallbackCoreWork(System.Threading.CancellationCallbackCoreWorkArguments args) Line 863
mscorlib.dll!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(bool throwOnFirstException) Line 808
mscorlib.dll!System.Threading.CancellationTokenSource.NotifyCancellation(bool throwOnFirstException) Line 743
System.dll!System.Net.WebSockets.ClientWebSocket.Dispose() Line 377
System.dll!System.Net.WebSockets.ClientWebSocket.Abort() Line 360
Microsoft.AspNetCore.Http.Connections.Client.dll!Microsoft.AspNetCore.Http.Connections.Client.Internal.WebSocketsTransport.ProcessSocketAsync(System.Net.WebSockets.WebSocket socket) Line 220
And the next:
> System.dll!System.Net.Sockets.NetworkStream.InternalSocket.get() Line 136 C#
System.dll!System.Net.PooledStream.CancelPendingIoAndCloseIfSafe(bool closeWithTimeout, int timeout) Line 596 C#
System.dll!System.Net.PooledStream.Close(int timeout) Line 682 C#
System.dll!System.Net.Connection.AbortSocket(bool isAbortState) Line 2901 C#
System.dll!System.Net.ConnectStream.CloseInternal(bool internalCall, bool aborting) Line 2707 C#
System.dll!System.Net.ConnectStream.System.Net.ICloseEx.CloseEx(System.Net.CloseExState closeState) Line 2426 C#
System.dll!System.Net.HttpWebResponse.Abort() Line 479 C#
System.dll!System.Net.HttpWebRequest.SetResponse(System.Exception E) Line 3968 C#
System.dll!System.Net.HttpWebRequest.SetAndOrProcessResponse(object responseOrException) Line 3661 C#
System.dll!System.Net.ConnectionReturnResult.SetResponses(System.Net.ConnectionReturnResult returnResult) Line 205 C#
System.dll!System.Net.Connection.AbortOrDisassociate(System.Net.HttpWebRequest request, System.Net.WebException webException) Line 2873 C#
System.dll!System.Net.HttpWebRequest.Abort(System.Exception exception, int abortState) Line 3173 C#
System.dll!System.Net.HttpWebRequest.Abort() Line 3133 C#
System.Net.Http.dll!System.Net.Http.HttpClientHandler.OnCancel(object state) Line 1210 C#
mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecutionContextCallback(object obj) Line 1031 C#
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917 C#
mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecuteCallback() Line 1021 C#
mscorlib.dll!System.Threading.CancellationTokenSource.CancellationCallbackCoreWork(System.Threading.CancellationCallbackCoreWorkArguments args) Line 863 C#
mscorlib.dll!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(bool throwOnFirstException) Line 808 C#
mscorlib.dll!System.Threading.CancellationTokenSource.NotifyCancellation(bool throwOnFirstException) Line 743 C#
mscorlib.dll!System.Threading.CancellationTokenSource.LinkedTokenCancelDelegate(object source) Line 91 C#
mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecutionContextCallback(object obj) Line 1031 C#
mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecuteCallback() Line 1021 C#
mscorlib.dll!System.Threading.CancellationTokenSource.CancellationCallbackCoreWork(System.Threading.CancellationCallbackCoreWorkArguments args) Line 863 C#
mscorlib.dll!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(bool throwOnFirstException) Line 808 C#
mscorlib.dll!System.Threading.CancellationTokenSource.NotifyCancellation(bool throwOnFirstException) Line 743 C#
mscorlib.dll!System.Threading.CancellationTokenSource.TimerCallbackLogic(object obj) Line 534 C#
mscorlib.dll!System.Threading.TimerQueueTimer.CallCallbackInContext(object state) Line 730 C#
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
mscorlib.dll!System.Threading.TimerQueueTimer.CallCallback() Line 713 C#
mscorlib.dll!System.Threading.TimerQueueTimer.Fire() Line 670 C#
mscorlib.dll!System.Threading.TimerQueue.FireQueuedTimerCompletion(object state) Line 444 C#
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Line 1252 C#
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 820 C#
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Line 1161 C#
The server is running in Visual Studio at http://localhost:5008/tubahub. When running the server in IIS on the same machine we also get a SocketException when calling StopAsync due to a timeout. Perhaps that is related.
Well i switched to MySqlConnector in order to be able to use its functionality to upload a Datatable into a MySql Table.
I'm following their simple example for this function as follow :
DataTable datatable = Globals.ds.Tables["Song"];
using (var connection = new MySqlConnection(Globals.connString + "AllowLoadLocalInfile = true;"))
{
await connection.OpenAsync();
var bulkCopy = new MySqlBulkCopy(connection);
bulkCopy.DestinationTableName = "Song2";
await bulkCopy.WriteToServerAsync(datatable);
}
The Song2 table is a empty copy of the Song table that contains 17000 lines and that is feeding the Datatable through a adapter.fill() method (i even did a .FillSchema() before).
When i run this, i have 2 exceptions :
The first one (the innerexception) is Failed to read the result set. while the second one is "System.Reflection.TargetInvocationException"
Anyone can help ?
Thanks in advance
EDIT :
Here is the call stack
System.Reflection.TargetInvocationException
HResult=0x80131604
Message=Une exception a été levée par la cible d'un appel.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MP3_manager.Program.Main() in C:\Users\Utilisateur\source\repos\MP3-manager\MP3-manager\Program.cs:line 23
This exception was originally thrown at this call stack:
MySqlConnector.Utilities.SocketAwaitable.GetResult() in SocketAwaitable.cs
MySqlConnector.Protocol.Serialization.SocketByteHandler.DoWriteBytesAsync(System.ReadOnlyMemory<byte>) in SocketByteHandler.cs
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<TResult>.ConfiguredValueTaskAwaiter.GetResult()
MySqlConnector.Protocol.Serialization.ProtocolUtility.WritePacketAsync.__WritePacketAsyncAwaited|8_0(System.Threading.Tasks.ValueTask<int>, byte[]) in ProtocolUtility.cs
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<TResult>.ConfiguredValueTaskAwaiter.GetResult()
MySqlConnector.Core.ServerSession.SendReplyAsyncAwaited(System.Threading.Tasks.ValueTask<int>) in ServerSession.cs
...
[Call Stack Truncated]
Inner Exception 1:
MySqlException: Failed to read the result set.
Inner Exception 2:
SocketException: Une connexion existante a dû être fermée par l’hôte distant
I am a beginner with WPF, in my application i am using datatable as itemsource for WPF datagrid , this datatable is updated by multiple threads (using lock(datatable) while updating the datatable, the Exception is not consistent(not every time i run the program), i have searched a lot but none of the answers helped me to find the cause of the exception or a solution to it.
Inner Exception:
{"Information for developers (use Text Visualizer to read this):
This exception was thrown because the generator for control 'System.Windows.Controls.DataGrid Items.Count:3' with name 'TraceGridView'has received sequence of CollectionChanged events that do not agree with the current state of the Items collection.
The following differences were detected: Accumulated count 2 is different from actual count 3.
[Accumulated count is (Count at last Reset + #Adds - #Removes since last Reset).]
One or more of the following sources may have raised the wrong events:
System.Windows.Controls.ItemContainerGenerator
System.Windows.Controls.ItemCollection
System.Windows.Data.BindingListCollectionView
System.Data.DataView
(The starred sources are considered more likely to be the cause of the problem.)
The most common causes are (a) changing the collection or its Count without raising a corresponding event, and
(b) raising an event with an incorrect index or item parameter.
The exception's stack trace describes how the inconsistencies were detected, not how they occurred.
To get a more timely exception, set the attached property 'PresentationTraceSources.TraceLevel' on the generator to value 'High' and rerun the scenario.
One way to do this is to run a command similar to the following:
System.Diagnostics.PresentationTraceSources.SetTraceLevel(myItemsControl.ItemContainerGenerator,System.Diagnostics.PresentationTraceLevel.High)from the Immediate window.
This causes the detection logic to run after every CollectionChanged event, so it will slow down the application."}
Stack Trace:
at System.Windows.Controls.ItemContainerGenerator.Verify()
at
System.Windows.Controls.VirtualizingStackPanel.MeasureChild(IItemContainerGenerator& generator, IContainItemStorage& itemStorageProvider, IContainItemStorage& parentItemStorageProvider, Object& parentItem, Boolean& hasUniformOrAverageContainerSizeBeenSet, Double& computedUniformOrAverageContainerSize, Boolean& computedAreContainersUniformlySized, IList& items, Object& item, IList& children, Int32& childIndex, Boolean& visualOrderChanged, Boolean& isHorizontal, Size& childConstraint, Rect& viewport, VirtualizationCacheLength& cacheSize, VirtualizationCacheLengthUnit& cacheUnit, Boolean& foundFirstItemInViewport, Double& firstItemInViewportOffset, Size& stackPixelSize, Size& stackPixelSizeInViewport, Size& stackPixelSizeInCacheBeforeViewport, Size& stackPixelSizeInCacheAfterViewport, Size& stackLogicalSize, Size& stackLogicalSizeInViewport, Size& stackLogicalSizeInCacheBeforeViewport, Size& stackLogicalSizeInCacheAfterViewport, Boolean& mustDisableVirtualization, Boolean isBeforeFirstItem, Boolean isAfterFirstItem, Boolean isAfterLastItem, Boolean skipActualMeasure, Boolean skipGeneration, Boolean& hasBringIntoViewContainerBeenMeasured, Boolean& hasVirtualizingChildren)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(Size constraint, Nullable`1& lastPageSafeOffset, List`1& previouslyMeasuredOffsets, Boolean remeasure)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
at System.Windows.Controls.Primitives.DataGridRowsPresenter.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at GUI_WPF_.App.Main() in d:\work\CANTrackRepo2\GUI(WPF)\obj\Release\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Here is code where i update the DataGrid:
private void UpdateDataGridView(DataTable dt)
{
if (this.TraceGridView.Dispatcher.CheckAccess())
{
this.Dispatcher.BeginInvoke((Action)(() =>
{
this.TraceGridView.ItemsSource = dt.DefaultView;
this.TraceGridView.Items.Refresh();
}));
}
else
{
SetUpdateTraceDataGridCallBack d = new SetUpdateTraceDataGridCallBack(UpdateDataGridView);
this.Dispatcher.BeginInvoke(d, new object[] { dt });
}
}
I encounter errors using Inspect Code 9.1.3 (last version of JetBrains ReSharper Command Line Tool) with SonarQube 4.3.3.
1: "The remote name could not be resolved: 'www.jetbrains.com'"
OK, my server is offline and I cannot change that (enterprise policy)...
2: "Unknown C# language level: Default"
No hint for this one... My solution contains .NET 3.5 and .NET 4.5 C# projects (I'm using the sonar plugin "Analysis Bootstrapper For Visual Studio Projects")
How can I configure my SonarQube/sonar-runner/sonar-project to avoid this errors? Thanks for your help!
Here are some trace logs extracts:
14:12:23.940 INFO - --- EXCEPTION #1/2 [WebException]
14:12:23.975 INFO - Message = "The remote name could not be resolved: 'www.jetbrains.com'"
14:12:23.975 INFO - ExceptionPath = Root.InnerException
14:12:23.976 INFO - ClassName = System.Net.WebException
14:12:23.976 INFO - HResult = COR_E_INVALIDOPERATION=80131509
14:12:23.977 INFO - Source = System
14:12:23.978 INFO - StackTraceString = "
14:12:23.978 INFO - at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
14:12:23.978 INFO - at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
14:12:23.979 INFO - at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
14:12:23.979 INFO - "
14:12:23.979 INFO -
14:12:23.980 INFO - --- Outer ---
14:12:23.980 INFO -
14:12:23.980 INFO - --- EXCEPTION #2/2 [LoggerException]
14:12:23.981 INFO - Message = "The remote name could not be resolved: 'www.jetbrains.com'"
14:12:23.981 INFO - ExceptionPath = Root
14:12:23.981 INFO - ClassName = JetBrains.Util.LoggerException
14:12:23.981 INFO - InnerException = "Exception #1 at Root.InnerException"
14:12:23.982 INFO - HResult = COR_E_APPLICATION=80131600
14:12:23.983 INFO - StackTraceString = "
14:12:23.983 INFO - at System.Windows.Threading.DispatcherOperation.InvokeImpl()
14:12:23.983 INFO - at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:23.983 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:23.984 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
14:12:23.984 INFO - at System.Windows.Threading.DispatcherOperation.Invoke()
14:12:23.984 INFO - at System.Windows.Threading.Dispatcher.ProcessQueue()
14:12:23.984 INFO - at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
14:12:23.986 INFO - at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
14:12:23.986 INFO - at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
14:12:23.986 INFO - at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
14:12:23.986 INFO - at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
14:12:23.986 INFO - at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
14:12:23.987 INFO - at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
14:12:23.987 INFO - at JetBrains.Interop.WinApi.User32Dll.DispatchMessageW(MSG* lpmsg)
14:12:23.987 INFO - at JetBrains.Interop.WinApi.User32Dll.DispatchMessageW(MSG* lpmsg)
14:12:23.987 INFO - at JetBrains.Threading.JetDispatcher.InternalPumpMessagesOnce()
14:12:23.987 INFO - at JetBrains.CommandLine.InspectCode.Unattended.InspectCodeProductMain.Main(IThreading invocator, IComponentContainer container, IShellLocks shellLocks, ILogger logger, IInspectCodeSettings settings, IProductCommandLineArguments argumentsRaw)
14:12:23.987 INFO - at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
14:12:23.987 INFO - at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
14:12:23.988 INFO - at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
14:12:23.988 INFO - at JetBrains.Application.Environment.RunsPublicStaticIntMain.<>c__DisplayClass7.<.ctor>b__0()
14:12:23.988 INFO - at JetBrains.Util.Logging.Logger.Catch(Action action)
14:12:23.988 INFO - at JetBrains.Threading.JetDispatcher.Closure.Execute()
14:12:23.988 INFO - at JetBrains.Threading.JetDispatcher.ProcessQueue()
14:12:23.988 INFO - at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
14:12:23.988 INFO - at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
14:12:23.989 INFO - at System.Windows.Threading.DispatcherOperation.InvokeImpl()
14:12:23.989 INFO - at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:23.989 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:23.989 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
14:12:23.989 INFO - at System.Windows.Threading.DispatcherOperation.Invoke()
14:12:23.989 INFO - at System.Windows.Threading.Dispatcher.ProcessQueue()
14:12:23.989 INFO - at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
14:12:23.990 INFO - at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
14:12:23.990 INFO - at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
14:12:23.990 INFO - at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
14:12:23.990 INFO - at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
14:12:23.990 INFO - at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
14:12:23.990 INFO - at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
14:12:23.990 INFO - at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
14:12:23.991 INFO - at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
14:12:23.991 INFO - at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
14:12:23.991 INFO - at JetBrains.DataFlow.Lifetimes.Using(Action`1 ?)
14:12:23.992 INFO - at JetBrains.Application.Environment.IJetHostEx.RunHostMessageLoop(IComponentContainer containerEnv)
14:12:23.992 INFO - at JetBrains.Application.Environment.HostParameters.JetHostParametersCaller.RunMainLoop(ComponentContainer containerEnv)
14:12:23.992 INFO - at JetBrains.Application.Environment.JetEnvironment.InternalRun(JetHostParametersCaller host, ComponentContainer containerEnv)
14:12:23.992 INFO - at JetBrains.Application.Environment.JetEnvironment.CreateAndRun(Full hostparams)
14:12:23.992 INFO - at JetBrains.CommandLine.InspectCode.InspectCodeProgram.Main(Assembly assembly, HostInfo hostInfo, String[] args)
14:12:23.993 INFO - at JetBrains.CommandLine.InspectCode.InspectCodeProgram.<Main>b__1(RunnerContext ctx)
14:12:23.993 INFO - "
...
14:12:46.683 INFO - --- EXCEPTION #1/2 [InvalidOperationException]
14:12:46.683 INFO - Message = "Unknown C# language level: Default"
14:12:46.683 INFO - ExceptionPath = Root.InnerException
14:12:46.683 INFO - ClassName = System.InvalidOperationException
14:12:46.684 INFO - HResult = COR_E_INVALIDOPERATION=80131509
14:12:46.684 INFO - Source = JetBrains.ReSharper.Psi.CSharp
14:12:46.684 INFO - StackTraceString = "
14:12:46.685 INFO - at JetBrains.ReSharper.Psi.CSharp.CSharpExtensionMethods.GetCSharpVersion(CSharpLanguageLevel level)
14:12:46.685 INFO - at JetBrains.ReSharper.Psi.CSharp.Impl.Tree.AttributeStub.MyConstructorReference.Resolve(IResolveContext resolveContext)
14:12:46.685 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.Managed.ResolveContext.ResolveWithInfoCalculator(IManagedReferenceImpl reference, Object state, IResolveContext resolveContext)
14:12:46.685 INFO - at JetBrains.ReSharper.Psi.Impl.Resolve.Managed.CalculationProcess.Get[TKey,TParameter,TValue](CascadingCacheKey cacheKey, TKey key, TParameter param, IResolveContext resolveContext, Func`4 calculator)
14:12:46.685 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Resolve.Managed.ResolveContext.ResolveWithInfo(IManagedReference reference)
14:12:46.685 INFO - at JetBrains.ReSharper.Daemon.CSharp.Stages.SmartResolverProcess.ScopeResolver.VisitElement(ITreeNode element)
14:12:46.686 INFO - at JetBrains.ReSharper.Psi.Resolve.Resolver.ProcessAfterInterior(ITreeNode element)
14:12:46.686 INFO - at JetBrains.ReSharper.Daemon.CSharp.Stages.SmartResolverProcess.ScopeResolver.ProcessAfterInterior(ITreeNode element)
14:12:46.686 INFO - at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendantForResolve(IRecursiveElementProcessor processor, ITreeNode descendant)
14:12:46.686 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendantsForResolve(IRecursiveElementProcessor processor)
14:12:46.686 INFO - at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendantForResolve(IRecursiveElementProcessor processor, ITreeNode descendant)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendantsForResolve(IRecursiveElementProcessor processor)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendantForResolve(IRecursiveElementProcessor processor, ITreeNode descendant)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendantsForResolve(IRecursiveElementProcessor processor)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendantForResolve(IRecursiveElementProcessor processor, ITreeNode descendant)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendantsForResolve(IRecursiveElementProcessor processor)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendantForResolve(IRecursiveElementProcessor processor, ITreeNode descendant)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendantsForResolve(IRecursiveElementProcessor processor)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendantForResolve(IRecursiveElementProcessor processor, ITreeNode descendant)
14:12:46.687 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendantsForResolve(IRecursiveElementProcessor processor)
14:12:46.688 INFO - at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendantForResolve(IRecursiveElementProcessor processor, ITreeNode descendant)
14:12:46.688 INFO - at JetBrains.ReSharper.Psi.ExtensionsAPI.Tree.TreeElement.ProcessDescendantsForResolve(IRecursiveElementProcessor processor)
14:12:46.688 INFO - at JetBrains.ReSharper.Psi.Resolve.Resolver.Process(ITreeNode topElement)
14:12:46.688 INFO - at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass11.<Create>b__e(Object state)
14:12:46.688 INFO - "
14:12:46.689 INFO -
14:12:46.689 INFO - --- Outer ---
14:12:46.689 INFO -
14:12:46.689 INFO - --- EXCEPTION #2/2 [LoggerException]
14:12:46.689 INFO - Message = "Unknown C# language level: Default"
14:12:46.689 INFO - ExceptionPath = Root
14:12:46.689 INFO - ClassName = JetBrains.Util.LoggerException
14:12:46.690 INFO - InnerException = "Exception #1 at Root.InnerException"
14:12:46.690 INFO - HResult = COR_E_APPLICATION=80131600
14:12:46.690 INFO - StackTraceString = "
14:12:46.690 INFO - at System.Threading.Tasks.Task.Execute()
14:12:46.691 INFO - at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:46.691 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:46.691 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
14:12:46.691 INFO - at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
14:12:46.691 INFO - at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
14:12:46.692 INFO - at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
14:12:46.692 INFO - at System.Threading.Tasks.Task.WrappedTryRunInline(TaskScheduler currentScheduler, Object currentSchedulerStatics)
14:12:46.692 INFO - at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
14:12:46.692 INFO - at JetBrains.Application.Threading.Tasks.TaskBarrier.DisposeUnmanagedResources()
14:12:46.692 INFO - at JetBrains.Util.SafeDisposable.DisposeInternal()
14:12:46.693 INFO - at JetBrains.ReSharper.Daemon.CSharp.Stages.SmartResolverProcess.Execute(Action`1 committer)
14:12:46.693 INFO - at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClassc.<DoHighlighting>b__5(IDaemonStage stage)
14:12:46.693 INFO - at JetBrains.Application.Threading.Tasks.TaskBarrier.<>c__DisplayClassc.<>c__DisplayClasse.<EnqueueDependentJobs>b__a()
14:12:46.693 INFO - at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass11.<Create>b__e(Object state)
14:12:46.693 INFO - at System.Threading.Tasks.Task.Execute()
14:12:46.694 INFO - at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:46.694 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:46.694 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
14:12:46.694 INFO - at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
14:12:46.695 INFO - at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
14:12:46.695 INFO - at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
14:12:46.695 INFO - at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:46.695 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
14:12:46.695 INFO - at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
14:12:46.696 INFO - at System.Threading.ThreadHelper.ThreadStart()
14:12:46.696 INFO - "
Try installing JB InspectCode 9.2. At least "Unknown C# language level: Default" exception should be fixed there https://youtrack.jetbrains.com/issue/RSRP-442801
It sounds like you are facing issues from the JetBrains ReSharper Command Line Tools itselve - which doesn't relate to the SonarQube integration.
Nevertheless, I'd just like to add that the "Analysis Bootstrapper For Visual Studio Projects" plugin is deprecated and that it has been replaced by the "MSBuild SonarQube Runner", which natively integrates with MSBuild.
You can find an example on how to analyze C# project using the ReSharper Command Line Tools & the MSBuild SonarQube Runner here: http://docs.sonarqube.org/display/PLUG/ReSharper+Plugin