Asset Importer throws null on import with model most of the time.
#1
Hello, I am getting a null ref when attempting to load a model via Assimp about 95% of the time. The other 5% it loads fine. The model is fine, loads fine in Blender or Unity, but dies out attempting to load into Ab3d via Assimp. The error is rather unhelpful so I'm not sure where to look next. The code I'm using is essentially the AssimpWpfImporterSample but in my own code. I can replicate the same issue in the PowerToys sample version. I cannot find another model with the similar problem...yet.

I am new to AB4D and evaluating this software for purchase. Any help is appreciated. Thanks!


Code:
System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=AssimpNet
  StackTrace:
   at Assimp.MemoryHelper.Read[T](IntPtr pSrc, T[] data, Int32 startIndexInArray, Int32 count)
   at Assimp.MemoryHelper.FromNativeArray[T](IntPtr nativeArray, Int32 length)
   at Assimp.MeshAnimationAttachment.Assimp.IMarshalable<Assimp.MeshAnimationAttachment,Assimp.Unmanaged.AiAnimMesh>.FromNative(AiAnimMesh& nativeValue)
   at Assimp.MemoryHelper.FromNativeArray[Managed,Native](IntPtr nativeArray, Int32 length, Boolean arrayOfPointers)
   at Assimp.Mesh.Assimp.IMarshalable<Assimp.Mesh,Assimp.Unmanaged.AiMesh>.FromNative(AiMesh& nativeValue)
   at Assimp.MemoryHelper.FromNativeArray[Managed,Native](IntPtr nativeArray, Int32 length, Boolean arrayOfPointers)
   at Assimp.Scene.Assimp.IMarshalable<Assimp.Scene,Assimp.Unmanaged.AiScene>.FromNative(AiScene& nativeValue)
   at Assimp.MemoryHelper.FromNativePointer[Managed,Native](IntPtr ptr)
   at Assimp.Scene.FromUnmanagedScene(IntPtr scenePtr)
   at Assimp.AssimpContext.ImportFile(String file, PostProcessSteps postProcessFlags)
   at Ab3d.Assimp.AssimpWpfImporter.ReadFileToAssimpScene(String fileName)
   at Ab3d.Assimp.AssimpWpfImporter.ReadModel3D(String fileName, String texturesPath)
   at VirtualAvatarPerfTest.MainWindow.LoadModel(String fileName) in C:\dev\bhive-launchpad\src\VirtualAvatarPerfTest\VirtualAvatarPerfTest\MainWindow.xaml.cs:line 75

   
  


Messages In This Thread
Asset Importer throws null on import with model most of the time. - by pushxtonotdie - 09-10-2020, 01:25 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)