Mesh throw exception

Oct 17, 2010 at 12:15 PM

Hi Adept,

First of all, congratulations, i´ve been following Balder prior to version and the new release ( has some great improvements, specially in performance...

Somehow i got an exception thrown when loading mesh:


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.1; msn OptimizedIE8;PTPT)
Timestamp: Sun, 17 Oct 2010 12:13:05 UTC

Message: Unhandled Error in Silverlight Application Value does not fall within the expected range.   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
   at MS.Internal.XcpImports.Collection_Add[T](PresentationFrameworkCollection`1 collection, Object value)
   at System.Windows.PresentationFrameworkCollection`1.AddImpl(Object value)
   at System.Windows.Controls.ItemCollection.AddImpl(Object value)
   at System.Windows.Controls.ItemCollection.AddInternal(Object value)
   at Balder.HierarchicalNode.ChildrenChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at Balder.Collections.NodeCollection.Add(INode node)
   at Balder.Collections.NodeCollection.AddRange(IEnumerable`1 nodes)
   at Balder.Objects.Geometries.Mesh.SetAssetParts(IEnumerable`1 assetParts)
   at Balder.Content.ContentManager.LoadInto[T](T asset, String assetName)
   at Balder.Objects.Geometries.Mesh.Prepare(Viewport viewport)
   at Balder.Node.OnPrepare(Viewport viewport)
   at Balder.Rendering.NodeRenderingService.PrepareNode(Viewport viewport, INode node)
   at Balder.Rendering.NodeRenderingService.Prepare(Viewport viewport, NodeCollection nodes)
   at Balder.Scene.Prepare(Viewport viewport)
   at Balder.Display.Viewport.Prepare(PrepareMessage prepareMessage)
   at Balder.Execution.MessageSubscriptions`1.Notify(T message)
   at Balder.Execution.MessengerContext.Send[T](T message)
   at Balder.Display.Silverlight.Display.Prepare()
   at Balder.Rendering.Silverlight.RenderEventHandler.Invoke()
   at Balder.Rendering.Silverlight.RenderingManager.ShowTimer(Object sender, EventArgs e)
   at System.Windows.Media.CompositionTarget.OnRendering(Object sender, RenderingEventArgs e)
   at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)
Line: 1
Char: 1
Code: 0

Message: Unhandled Error in Silverlight Application
Code: 2028   
Category: ParserError      
Message: The name already exists in the tree: "Cylinder0141".    
Line: 0    
Position: 0    

Line: 58
Char: 13
Code: 0


It's kind of annoying since iexplore stops to show a javascript error and freezes...

I Already change then name in the Ase file but still happens...

Thanks in advance..

Oct 17, 2010 at 2:17 PM

Hi and thanks,

I fixed this on Friday, its because its using the Name property in the release, which needs to be unique. If you get the latest source and build it, you should avoid this problem.


Oct 17, 2010 at 2:22 PM

Thx...I´ll do that...i tried to pull changes in Tortoise, but although its has made changes, the buid version haven´t change, i´ll guess i have to download the latest source code...


Oct 17, 2010 at 7:08 PM

Hi Adept,

I´ve downloaded the latest source code, pull repository with Mercurial Clone URL:, build Balder.dll and still ot the same error :(

Oct 17, 2010 at 8:35 PM

Odd. Is it possible for you to give a reproduction of the problem - a project with the problem, then I can debug it and see whats going on.