Daily Usage Issues

NCrunch 2 - ArgumentOutOfRangeException Exception

Started by rubenmamo on 6,264 views

Hi,

I'm using the NCrunch 2 beta with Visual Studio 2013.

I have a particular VS Solution that is not displaying the tests correctly in the NCrunch Tests window and is also causing Visual Studio to crash and restart whenever I resize the NCrunch Tests Window. This does not happen on all VS Solutions which have Unit Tests and NCrunch enabled. I turned on the Log to output widow option and am getting the below error in the NCrunch Diagnostic Output window when I click the Run All Tests button.

ERROR (Internal): System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
at System.String.Substring(Int32 startIndex, Int32 length)
at nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableObject.fitTextToObject(Palette palette, String text, Int32 availableWidth, Font customFont)
at nCrunch.VSAddIn.UI.TreeGridControl.PaintableObjects.PaintableBodyCell..ctor(TreeGrid treeGrid, Int32 viewX, Int32 viewY, Int32 width, Int32 height, TreeGridRow row, TreeGridColumn column, Palette palette)
at NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.#=qrvm5Tu74B8hLuA2djQ9KBEKdrlkFA2EbVRnfKHdkIv0=(TreeGridRow #=qj$LORGHXIGaNQUGP$V5cjg==, Int32 #=qwIHnIus$r0$fhVoevvgZjA==, Int32 #=qHfWGU5zRJ9zclODK2lVgRQ==)
at NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.#=qMZr4TL1ptsePvh39vFbLIcO6D0zEmurGgcKomZT6fMA=()
at NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.#=qZq1DklRqGEzV8iLUGfajkLmA_C_IUy72v6fV1$jdmCY=()
at NCrunch.VSAddIn.UI.TreeGridControl.TreeGrid.BindToRows(ExpandedRowCollection allExpandedRows, Type rowType)
at nCrunch.VSAddIn.UI.TestTree.TestsWindow.#=qWS7yMQL8XkwAiEuxWFU9HgMx3DTGzki4fnUkYf4WzfQ=.#=q5f44JZtvB$XH3E84u4OThfYJGw99a9u01aseMlY$6qA=()
at nCrunch.VSAddIn.UI.TestTree.TestsWindow.#=qXAYVREworw3lwIuxjDTZZcbnUBtRIjRz9SiuktzMN_A=(Action #=qvn6ZQ6jiDvUo8VdGdbst2w==)

I tried searching on the forum but could not find anything related to this message.

Any help would be appreciated.

Ruben
Hi Ruben -

Thanks for sharing this issue. It looks to be caused by a column in the Tests Window that has somehow been set to a zero or negative size. I wasn't aware it was possible to physically do this in the UI - well done for discovering it.

In theory, you should be able to get rid of this problem by deleting the .ncrunchsolution.user file next to your solution file while Visual Studio is closed. This will reset the user settings, which include column layouts for the Tests Window.

I'll also introduce a fix for this in the next beta build.


Cheers,

Remco
Hi Remco,

Thanks a lot for your help on this.

I can confirm that removing the .ncrunchsolution.user has in fact resolved the issue for me.

Cheers,

Ruben
Great, thanks Ruben!

Post a reply

Log in to reply.