Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch 2 - ArgumentOutOfRangeException Exception
rubenmamo
#1 Posted : Friday, January 10, 2014 10:34:39 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/10/2014(UTC)
Posts: 2
Location: Malta

Thanks: 1 times
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
Remco
#2 Posted : Friday, January 10, 2014 10:46:58 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
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
1 user thanked Remco for this useful post.
rubenmamo on 1/10/2014(UTC)
rubenmamo
#3 Posted : Friday, January 10, 2014 12:39:55 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/10/2014(UTC)
Posts: 2
Location: Malta

Thanks: 1 times
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
Remco
#4 Posted : Friday, January 10, 2014 11:21:45 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Great, thanks Ruben!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.038 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download