TrimbleSolutionsCorporation / VSSonarQubeExtension

This is a SonarQube Extension for Visual Studio
http://visualstudiogallery.msdn.microsoft.com/7fc312c3-f1ab-49f8-b286-dbf7fff37305
GNU Lesser General Public License v3.0
24 stars 17 forks source link

My VS2013 IDE is crashing whenever I double click on the issue. #113

Closed RamVedantham closed 9 years ago

RamVedantham commented 9 years ago

I have installed VSSonarExtension 3.1.0.0 on VS 2013. I am able to configure the plugin and view the issues however I am not able to reach the line of code by double clicking on the issue. IDE is crashing whenever I double click on any issue.

Found the following errors in event viewer at the time when IDE crashed.

Faulting application name: devenv.exe, version: 12.0.31101.0, time stamp: 0x54548724 Faulting module name: KERNELBASE.dll, version: 6.1.7601.18798, time stamp: 0x5507b485 Exception code: 0xe0434352 Fault offset: 0x0000c42d Faulting process id: 0x1918 Faulting application start time: 0x01d08eefc909ff35 Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe Faulting module path: C:\windows\syswow64\KERNELBASE.dll

Report Id: 92584718-fae3-11e4-a4bd-005056c00008

Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Reflection.TargetInvocationException Stack: at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[]) at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at GalaSoft.MvvmLight.Helpers.WeakAction1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Execute(System.__Canon) at GalaSoft.MvvmLight.Command.RelayCommand1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Execute(System.Object) at System.Windows.Input.CommandManager.TranslateInput(System.Windows.IInputElement, System.Windows.Input.InputEventArgs) at System.Windows.UIElement.OnMouseDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object) at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs) at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs) at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

jmecosta commented 9 years ago

hi,

try to install version 3.1.2 added to gallery a couple of hours ago

RamVedantham commented 9 years ago

Installed version 3.1.2, but the issue (VS IDE is crashing) is still there.

jmecosta commented 9 years ago

i will prepare a debug version to see if we can see whats going on

related #114

jmecosta commented 9 years ago

@RamVedantham can you try with this https://github.com/jmecosta/VSSonarQubeExtension/releases/tag/3.1.3

RamVedantham commented 9 years ago

Installed 3.1.3 and verified. IDE is not crashing now but the double click on issue is still not leading to the line of code.

jmecosta commented 9 years ago

yep i was expecting it not to crash, the reason it crashed is that you are not correctly associated with a project in server. Are you for example able to open a file in server analysis and retrieve issues for that open file?

My best guess is that you dont have a sonar-project.properties available in source along with solution. You can verify the association if you are able to see the key of the file in the status message.

RamVedantham commented 9 years ago

You are right. sonar-project.properties file was not there before. I created it and configured values. I am now able to view server analysis for the open file. Thanks for pointing it out. I am still unable to go to line of code by double clicking on any issue under issues tab. Am I missing anything obvious here?

jmecosta commented 9 years ago

Can you go to a line of code if you are in the server issues tab? Once the association done if you restart and open the same solution is the extension able to auto associate? Can you also check in the output window if there are some exceptions?

On Fri, May 15, 2015, 21:27 RamVedantham notifications@github.com wrote:

You are right. sonar-project.properties file was not there before. I created it and configured values. I am now able to view server analysis for the open file. Thanks for pointing it out. I am still unable to go to line of code by double clicking on any issue under issues tab. Am I missing anything obvious here?

— Reply to this email directly or view it on GitHub https://github.com/jmecosta/VSSonarQubeExtension/issues/113#issuecomment-102484246 .

RamVedantham commented 9 years ago

Can you go to a line of code if you are in the server issues tab? No, In fact I am not seeing any issues under server analysis tab. I am able to see issues for the Open file only under Local Analysis tab.

Once the association done if you restart and open the same solution is the extension able to auto associate? Yes. Can you also check in the output window if there are some exceptions? Yes. Following is the error message that I found in output window. 16-05-2015 00:11:24:VSSonarExtensionMetroVs2013:Object reference not set to an instance of an object. : at VSSonarQubeExtension.Helpers.VsPropertiesHelper.VsFileItem(String filename, Resource associatedProject, Resource fileResource) at VSSonarExtensionUi.ViewModel.SonarQubeViewModel.CreateAResourceForFileInEditor(String fullName) at VSSonarExtensionUi.ViewModel.SonarQubeViewModel.RefreshDataForResource(String fullName) at VSSonarQubeExtension.Helpers.VsEvents.WindowActivated(Window gotFocus, Window lostFocus)

jmecosta commented 9 years ago

i suspect your sonar properties file is not the same has the one used to run analysis on server. would it be possible to run a analysis with the newly created properties file and after do a new association. If that does not work then i will need a small sample project to investigate the issue. Perhaps you are having a weird configuration that the tool does not support yet.

RamVedantham commented 9 years ago

I just noticed that double clicking on issue found for the open file is working as expected. I am able to go to exact line of code, however it is not working in the same way when I double click on any issue under issues tab.

jmecosta commented 9 years ago

ok, so looks like you properties file is still not correctly aligned whit the one used in server when a analysis is done. can you provide the keys that you see in the local analysis and in issues tab? i suspect the key type is different so it does not work

On Mon, 18 May 2015 at 15:26 RamVedantham notifications@github.com wrote:

I just noticed that double clicking on issue found for the open file is working as expected. I am able to go to exact line of code, however it is not working in the same way when I double click on any issue under issues tab.

— Reply to this email directly or view it on GitHub https://github.com/jmecosta/VSSonarQubeExtension/issues/113#issuecomment-103041901 .

RamVedantham commented 9 years ago

All keys under Local analysis are same (00000000-0000-0000-0000-000000000000) but the keys under issue tab are different and (non-zero ids).

jmecosta commented 9 years ago

sorry, keys i mean component

On Mon, 18 May 2015 at 17:23 RamVedantham notifications@github.com wrote:

All keys under Local analysis are same (00000000-0000-0000-0000-000000000000) but the keys under issue tab are different and (non-zero ids).

— Reply to this email directly or view it on GitHub https://github.com/jmecosta/VSSonarQubeExtension/issues/113#issuecomment-103076869 .

RamVedantham commented 9 years ago

I am sorry, I didn't get that. Can you give me an example? On a side note, let me give this quick update, I finally managed to run both Incremental and Preview analysis after copying the properties file from server to my machine but the double click issue still exists.

RamVedantham commented 9 years ago

Ok, I got it. I think you were asking me about the component naming convention. I noticed the difference. For local analysis it is {SONAR Project Name}:{.Net Project Name}/{FileName} This is working fine.

Under issues tab it is {SONAR Project Name}:{.Net Project Name}:{File Name} This is not working, may be because of the colon between project name and file name instead of slash.

jmecosta commented 9 years ago

you must be having on you properties file the visual studio bootstrapper off. set it on and in local analysis the keys will be like the server

try this sonar.visualstudio.enable=true

On Mon, 18 May 2015 at 21:54 RamVedantham notifications@github.com wrote:

Ok, I got it. I think you were asking me about the component naming convention. I noticed the difference. For local analysis it is {SONAR Project Name}:{.Net Project Name}/{FileName} This is working fine.

Under issues tab it is {SONAR Project Name}:{.Net Project Name}:{File Name} This is not working, may be because of the colon between project name and file name instead of slash.

— Reply to this email directly or view it on GitHub https://github.com/jmecosta/VSSonarQubeExtension/issues/113#issuecomment-103174318 .

RamVedantham commented 9 years ago

Issue is now resolved after adding this property (sonar.visualstudio.enable=true). Thanks a lot for your help Jorge. I think I can now switch back to release version from the debug version.