machine/machine.specifications — Issue #96: NullReferenceException with MSpec ReSharper 7.0/Dev11 runner
Author: jamescrowley
Created: 2012-03-06 11:21:17+00:00
State: open

Just getting the following stacktrace trying to run MSpec using the new runner. Not sure of ReSharper has changed it's behavior of if MSpec needs to handle this?

Failed to evaluate the data rule. Object reference not set to an instance of an object.

--- EXCEPTION #1/3 [NullReferenceException]
Message = “Object reference not set to an instance of an object.”
ExceptionPath = Root.InnerException.InnerException
ClassName = System.NullReferenceException
HResult = COR_E_NULLREFERENCE=E_POINTER=80004003
Source = Machine.Specifications.ReSharperRunner.7.0
StackTraceString = “
at Machine.Specifications.ReSharperRunner.Presentation.ContextSpecificationElement.get_Id() in c:\Development\External Projects\mspec\Source\Machine.Specifications.ReSharperRunner.6.0\Presentation\ContextSpecificationElement.cs:line 91
at Machine.Specifications.ReSharperRunner.Presentation.Element.GetHashCode() in c:\Development\External Projects\mspec\Source\Machine.Specifications.ReSharperRunner.6.0\Presentation\Element.cs:line 292
at System.Collections.Generic.GenericEqualityComparer`1.GetHashCode(T obj)
at System.Collections.Generic.JetHashSet`1.GetEntryIndex(T key) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Util\src\Collections\JetHashSet.cs:line 601
at System.Collections.Generic.JetHashSet`1.Contains(T element) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Util\src\Collections\JetHashSet.cs:line 196
at JetBrains.ReSharper.UnitTestExplorer.Common.UnitTestDataRules.ProcessNode(UnitTestElements elements, ICollection`1 visitedElements, Boolean isSelected, TreeModelNode treeModelNode) in c:\BuildAgent\work\1939c01d7b25093a\Psi.Features\src\UnitTesting\Explorer\src\Common\UnitTestDataRules.cs:line 95
at JetBrains.ReSharper.UnitTestExplorer.Common.UnitTestDataRules.<>c__DisplayClassf.b__b(TreeModelNode node, Boolean isSelected) in c:\BuildAgent\work\1939c01d7b25093a\Psi.Features\src\UnitTesting\Explorer\src\Common\UnitTestDataRules.cs:line 86
at JetBrains.ReSharper.UnitTestExplorer.Common.UnitTestDataRules.VisitNodesRecursive(TreeModelViewNode viewNode, Action`2 visit) in c:\BuildAgent\work\1939c01d7b25093a\Psi.Features\src\UnitTesting\Explorer\src\Common\UnitTestDataRules.cs:line 120
at JetBrains.ReSharper.UnitTestExplorer.Common.UnitTestDataRules.VisitNodesRecursive(TreeModelViewNode viewNode, Action`2 visit) in c:\BuildAgent\work\1939c01d7b25093a\Psi.Features\src\UnitTesting\Explorer\src\Common\UnitTestDataRules.cs:line 126
at JetBrains.ReSharper.UnitTestExplorer.Common.UnitTestDataRules.VisitNodesRecursive(TreeModelViewNode viewNode, Action`2 visit) in c:\BuildAgent\work\1939c01d7b25093a\Psi.Features\src\UnitTesting\Explorer\src\Common\UnitTestDataRules.cs:line 126
at JetBrains.ReSharper.UnitTestExplorer.Common.UnitTestDataRules.TreeModelNodesToUnitTestElements(IDataContext context) in c:\BuildAgent\work\1939c01d7b25093a\Psi.Features\src\UnitTesting\Explorer\src\Common\UnitTestDataRules.cs:line 86
at JetBrains.Application.DataContext.DataRule`1.JetBrains.Application.DataContext.IDataRule.Evaluate(IDataContext context) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\DataContext\IDataProvider.cs:line 158
at JetBrains.Application.DataContext.DataContext.Evaluator.TryEvaluateDataRules(IDataConstant constant, IDataContext dataContext) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\DataContext\DataContext.cs:line 383
”

--- Outer ---

--- EXCEPTION #2/3 [InvalidOperationException]
Message = “Failed to evaluate the data rule.”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
Data.DataConstant = UnitTestElements
Data.DataConstantType = “JetBrains.ReSharper.UnitTestFramework.UnitTestElements, JetBrains.ReSharper.UnitTestFramework, Version=7.0.0.325, Culture=neutral, PublicKeyToken=1010a0d8d6380325”
Data.DataRuleObject = JetBrains.Application.DataContext.DataRule`1[JetBrains.ReSharper.UnitTestFramework.UnitTestElements]
Data.DataRulePriority = 0
InnerException = “Exception #1 at Root.InnerException.InnerException”
HResult = COR_E_INVALIDOPERATION=80131509

--- Outer ---

--- EXCEPTION #3/3 [LoggerException]
Message = “Failed to evaluate the data rule.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.LastExtension = cs
Data.PlatformSccRevision = CompiledWithoutBuildServer
Data.ProductSccRevision = CompiledWithoutBuildServer
Data.VsVersion = 11.0.50214.1
InnerException = “Exception #2 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Application.DataContext.DataContext.Evaluator.TryEvaluateDataRules(IDataConstant constant, IDataContext dataContext) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\DataContext\DataContext.cs:line 401
at JetBrains.Application.DataContext.DataContext.DoGetData(IDataConstant constant) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\DataContext\DataContext.cs:line 122
at JetBrains.Application.DataContext.DataContext.JetBrains.Application.DataContext.IDataContext.GetData[T](DataConstant`1 dataConstant) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\DataContext\DataContext.cs:line 254
at JetBrains.ReSharper.UnitTestExplorer.UnitTestSessionAppendChildren.Update(IDataContext context, ActionPresentation presentation, DelegateUpdate nextUpdate) in c:\BuildAgent\work\1939c01d7b25093a\Psi.Features\src\UnitTesting\Explorer\src\Session\Actions\UnitTestSessionAppendChildren.cs:line 14
at JetBrains.ActionManagement.UpdatableAction.Update(IDataContext context) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\Action\UpdatableAction.cs:line 88
at JetBrains.ActionManagement.ActionManager.<>c__DisplayClass9.b__8(Lifetime lifetime) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionManager\ActionManager.cs:line 196
at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 F) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Util\src\DataFlow\Lifetime\Lifetimes.cs:line 41
at JetBrains.ActionManagement.ActionManager.UpdateAction(IUpdatableAction action, IDataContext dataContext) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionManager\ActionManager.cs:line 196
at JetBrains.VsIntegration.ActionManagement.VsActionManager.UpdateAction(IUpdatableAction action, IDataContext dataContext) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\VisualStudio\Core\src\ActionManagement\VSActionManager.cs:line 1363
at JetBrains.ActionManagement.ActionStripMenuItem.Update(IDataContext context) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionBar\ActionStripMenuItem.cs:line 52
at JetBrains.ActionManagement.ActionContextMenuWinForms.Update(IDataContext context) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionBar\ActionContextMenuImpl.cs:line 182
at JetBrains.ActionManagement.ActionContextMenuWinForms.b__0(Lifetime lifetime) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionBar\ActionContextMenuImpl.cs:line 77
at JetBrains.DataFlow.Lifetimes.Using(Action`1 F) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Util\src\DataFlow\Lifetime\Lifetimes.cs:line 20
at JetBrains.ActionManagement.ActionContextMenuWinForms.JetBrains.ActionManagement.IActionContextMenu.BeginShow(Point ptScreen) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionBar\ActionContextMenuImpl.cs:line 77
at JetBrains.ActionManagement.IActionBarManagerEx.ShowPopupMenu(IActionBarManager thіs, IActionGroup group, Func`1 FGetDataRules, Point ptScreen) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionBar\IActionBarManagerEx.cs:line 33
at JetBrains.ActionManagement.IActionBarManagerWinFormsEx.ShowPopupMenuInWinFormsControl(IActionBarManager thіs, Control control, Control dataContextControl, String sActionGroupId, Point ptClient) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\ActionSystem\ActionBar\IActionBarManagerWinFormsEx.cs:line 57
at JetBrains.IDE.TreeBrowser.TreeModelBrowserPanel.<>c__DisplayClass13.b__12() in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\IDE\src\TreeBrowser\TreeModelBrowserPanel.cs:line 288
at JetBrains.Application.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\Threading\ShellLocks.cs:line 989
at JetBrains.Application.IShellLocksEx.<>c__DisplayClass4.b__3() in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\Threading\ShellLocks.cs:line 813
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Util\src\Concurrency\ReentrancyGuard.cs:line 266
at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Util\src\Concurrency\ReentrancyGuard.cs:line 304
at JetBrains.Threading.IThreadingEx.ExecuteOrQueue(IThreading thіs, String name, Action action) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\Threading\Invocator.cs:line 218
at JetBrains.Application.IShellLocksEx.ExecuteOrQueueReadLock(IShellLocks thіs, String name, Action F) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\Shell\src\Threading\ShellLocks.cs:line 813
at JetBrains.IDE.TreeBrowser.TreeModelBrowserPanel.OnContextMenuRequested(Object sender, ContextMenuEventArgs e) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\IDE\src\TreeBrowser\TreeModelBrowserPanel.cs:line 290
at JetBrains.UI.TreeView.TreeModelView.OnMouseUp(MouseEventArgs e) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\Controls\TreeView\DevExpress\TreeModelView.cs:line 2109
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)
at JetBrains.UI.TreeView.TreeModelView.WndProc(Message& m) in c:\BuildAgent\work\1939c01d7b25093a\Platform\src\UI\src\Controls\TreeView\DevExpress\TreeModelView.cs:line 1595
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)
”