Error: loaded more than two type of ASE file

Jun 14, 2011 at 3:53 AM
Edited Jun 14, 2011 at 7:18 AM

For my exception(An unknown error occurred.). If loaded only one ASE file,The program will be OK. But,if loaded the ASE files more than twoNo problem with different types of ASE files【For example:a Box and a Teapot】, the ASE files will have the same type of problem【For example:a Box and a Box】,The program will be broken.

Could you tell me why that how should I deal with this problem?


The errors list:
    值不在预期的范围内。( Value is not within the expected range. )
   位于( At ) MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   位于 MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
   位于 MS.Internal.XcpImports.Collection_Add[T](PresentationFrameworkCollection`1 collection, Object value)
   位于 System.Windows.PresentationFrameworkCollection`1.AddImpl(Object value)
   位于 System.Windows.Controls.ItemCollection.AddImpl(Object value)
   位于 System.Windows.Controls.ItemCollection.AddInternal(Object value)
   位于 System.Windows.PresentationFrameworkCollection`1.Add(T value)
   位于 Balder.HierarchicalNode.ChildrenChanged(Object sender, NotifyCollectionChangedEventArgs e)
   位于 System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   位于 System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   位于 System.Collections.ObjectModel.Collection`1.Add(T item)
   位于 Balder.Collections.NodeCollection.Add(INode node)
   位于 Balder.Collections.NodeCollection.AddRange(IEnumerable`1 nodes)
   位于 Balder.Objects.Geometries.Mesh.SetAssetParts(IEnumerable`1 assetParts)
   位于 Balder.Content.ContentManager.LoadInto[T](T asset, String assetName)
   位于 Balder.Objects.Geometries.Mesh.Prepare(Viewport viewport)
   位于 Balder.Node.OnPrepare(Viewport viewport)
   位于 Balder.Rendering.NodeRenderingService.PrepareNode(Viewport viewport, INode node)
   位于 Balder.Rendering.NodeRenderingService.PrepareChildren(Viewport viewport, INode node)
   位于 Balder.Rendering.NodeRenderingService.PrepareNode(Viewport viewport, INode node)
   位于 Balder.Rendering.NodeRenderingService.Prepare(Viewport viewport, NodeCollection nodes)
   位于 Balder.Scene.Prepare(Viewport viewport)
   位于 Balder.Display.Viewport.Prepare(PrepareMessage prepareMessage)
   位于 Balder.Execution.MessageSubscriptions`1.Notify(T message)
   位于 Balder.Execution.MessengerContext.Send[T](T message)
   位于 Balder.Display.Silverlight.Display.Prepare()
   位于 Balder.Rendering.Silverlight.RenderEventHandler.Invoke()
   位于 Balder.Rendering.Silverlight.RenderingManager.ShowTimer(Object sender, EventArgs e)
   位于 System.Windows.Media.CompositionTarget.OnRendering(Object sender, RenderingEventArgs e)
   位于 MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)
Jun 14, 2011 at 8:32 AM

I don't really know why do you get this error, but also I don't know why are you trying to load the same object twice. If you need multiple instances of the same mesh, the correct way is to load it once and then duplicate it (Mesh.Clone() ... right?). I hope this helps...

Jun 14, 2011 at 8:50 AM

Although they have the same type, but their sizes is different.

The trouble comes in when I try to dynamically resize the mesh at run time. The mesh's mouse events will be failure. When the mesh.scale is a default coordinate(1,1,1),the mesh's mouse events be OK. This's the Balder's bug. So I chose another way.

Jun 14, 2011 at 9:05 AM

Despite this error, but the result is still correct.

The project does not allow this error message box.

Jun 14, 2011 at 11:00 AM

Now I understand. It looks like mouse events does not work fine if you scale your mesh to (X>1, Y>1, Z>1) but they work properly if you scale it down (make it smaller than the original size). So the solution is to export your .ase using a scale lager than you will ever use, like 16 x.

Jun 15, 2011 at 5:39 AM

Oh! Thank you very much!

This is indeed another way.

Jun 15, 2011 at 10:20 PM

The ContentManager should go to the cache and clone it automatically if you load the same mesh twice. If it doesn't, its a bug. 

As for the mouse events for scaled objects, this is a known bug and will be addressed this or next week.

Jun 16, 2011 at 2:59 AM

Thank you!

Jun 24, 2011 at 5:48 PM

The mouse events and scaled objects is now addressed - you should be able to pull the latest source and get that bug fixed!

Jun 28, 2011 at 6:55 AM
Edited Jun 28, 2011 at 6:59 AM

Thank you!

But I don't know why that I can't debug the source. The Silverlight is Silverlight 3 SDK and my OS is Windows7(x86), VS is 2008 Sp1 and 2010. Would you help me?

Jul 4, 2011 at 4:15 AM

It seems there is no Silverlight version 3.0 source code.

Jul 10, 2011 at 12:57 PM

SL3 is no longer supported - it should probably compile with SL3 and run, but Balder is not explicitly supporting it. So you won't find any solution files in the source that is SL3.