MudassarRasool / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Crash when loading assembly containing generics or NUnit test cases #911

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install NUnit 2.6.2
2. Install x64 Gallio Icarus on Win7 x64
3. Create 32-bit .dll assembly with test cases or generic NUnit fixtures
4. Load assembly in Gallio Icarus or Gallio Echo.

What is the expected output? What do you see instead?
Expect: Load and display unit test tree.
Actual: Crash report:
An exception occurred while running a task.
System.InvalidOperationException: Failed to compare two elements in the array. 
---> System.OverflowException: Value was either too large or too small for an 
Int32.
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at Gallio.Icarus.Models.AlphanumComparatorFast.Compare(Object x, Object y)
   at Gallio.Icarus.Models.SortedTreeModel.TestTreeNodeComparer.Compare(TestTreeNode x, TestTreeNode y)
   at System.Collections.Generic.ArraySortHelper`1.SwapIfGreaterWithItems(T[] keys, IComparer`1 comparer, Int32 a, Int32 b)
   at System.Collections.Generic.ArraySortHelper`1.QuickSort(T[] keys, Int32 left, Int32 right, IComparer`1 comparer)
   at System.Collections.Generic.GenericArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
   --- End of inner exception stack trace ---
   at System.Collections.Generic.GenericArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer)
   at Gallio.Icarus.Models.SortedTreeModel.GetChildren(TreePath treePath)
   at Aga.Controls.Tree.TreeViewAdv.ReadChilds(TreeNodeAdv parentNode, Boolean performFullUpdate)
   at Aga.Controls.Tree.TreeViewAdv.ReadChilds(TreeNodeAdv parentNode, Boolean performFullUpdate)
   at Aga.Controls.Tree.TreeViewAdv.ReadChilds(TreeNodeAdv parentNode, Boolean performFullUpdate)
   at Aga.Controls.Tree.TreeViewAdv.ReadChilds(TreeNodeAdv parentNode, Boolean performFullUpdate)
   at Aga.Controls.Tree.TreeViewAdv.ReadChilds(TreeNodeAdv parentNode, Boolean performFullUpdate)
   at Aga.Controls.Tree.TreeViewAdv._model_NodesInserted(Object sender, TreeModelEventArgs e)
   at Gallio.Icarus.Models.TestTreeModel.BuildTestTree(IProgressMonitor progressMonitor, TestModelData testModelData, TreeBuilderOptions options)
   at Gallio.Common.Concurrency.LockBox`1.Read(ReadAction`1 action) in c:\Server\Projects\MbUnit v3\Work\src\Gallio\Gallio\Common\Concurrency\LockBox.cs:line 61
   at Gallio.Icarus.Controllers.TestController.RefreshTestTree(IProgressMonitor progressMonitor)
   at Gallio.Icarus.Controllers.TestController.DoWithTestRunner(Action`1 action, IProgressMonitor progressMonitor, Double initializationAndDisposalWorkUnits, IEnumerable`1 testRunnerExtensions)
   at Gallio.Icarus.Controllers.TestController.Explore(IProgressMonitor progressMonitor, IEnumerable`1 testRunnerExtensions)
   at Gallio.Icarus.Commands.LoadPackageCommand.ExploreTests(IProgressMonitor progressMonitor)
   at Gallio.Icarus.Commands.LoadPackageCommand.Execute(IProgressMonitor progressMonitor)
   at Gallio.Icarus.Commands.OpenProjectCommand.LoadPackage(IProgressMonitor progressMonitor)
   at Gallio.Icarus.Commands.OpenProjectCommand.Execute(IProgressMonitor progressMonitor)
Reported by: 
UnhandledExceptionPolicy
   at Gallio.Common.Policies.EventHandlerPolicy.SafeInvoke[T](EventHandler`1 handlerChain, Object sender, T e) in c:\Server\Projects\MbUnit v3\Work\src\Gallio\Gallio\Common\Policies\EventHandlerPolicy.cs:line 69
   at Gallio.Common.Concurrency.Task.NotifyTerminated(TaskResult result) in c:\Server\Projects\MbUnit v3\Work\src\Gallio\Gallio\Common\Concurrency\Task.cs:line 305
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

What version of the product are you using? On what operating system?
Gallio: 3.4.14.0 x64
OS: Win7 x64

Please provide any additional information below.
I am using NUnit 2.6.2.  Not sure if this influences it or not.
I have tested the same assembly directly inside NUnit and it runs just fine.  
Maybe there have been changes that the Gallio parser is not handling in NUnit 
2.6.2?

Original issue reported on code.google.com by jeremywi...@gmail.com on 20 Feb 2013 at 4:27

GoogleCodeExporter commented 8 years ago
I encountered similar issue.
Seems that gallio doesn't support NUnit2.6.2. Is there any solution/workaround 
to resolve that?

Original comment by zhuoli1...@gmail.com on 24 Sep 2013 at 3:40