Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

NullReferenceException when trying to import FBX. #30

Open
ruzannakamalyan opened this issue Apr 2, 2016 · 3 comments
Open

NullReferenceException when trying to import FBX. #30

ruzannakamalyan opened this issue Apr 2, 2016 · 3 comments

Comments

@ruzannakamalyan
Copy link

Hi, I'm getting the following exception with the latest versions for both (assimpnet and assimp)

NullReferenceException: Object reference not set to an instance of an object System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:1940) System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:1873) System.String.Format (System.String format, System.Object arg0, System.Object arg1, System.Object arg2) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:1863) Assimp.Material.CreateFullyQualifiedName (System.String baseName, TextureType texType, Int32 texIndex) Assimp.MaterialProperty.get_FullyQualifiedName () Assimp.Material.AddProperty (Assimp.MaterialProperty matProp) Assimp.Material.Assimp.IMarshalable<Assimp.Material,Assimp.Unmanaged.AiMaterial>.FromNative (Assimp.Unmanaged.AiMaterial& nativeValue) Assimp.MemoryHelper.FromNativeArray[Material,AiMaterial] (IntPtr nativeArray, Int32 length, Boolean arrayOfPointers) Assimp.Scene.Assimp.IMarshalable<Assimp.Scene,Assimp.Unmanaged.AiScene>.FromNative (Assimp.Unmanaged.AiScene& nativeValue) Assimp.MemoryHelper.FromNativePointer[Scene,AiScene] (IntPtr ptr) Assimp.Scene.FromUnmanagedScene (IntPtr scenePtr) Assimp.AssimpContext.ImportFile (System.String file, PostProcessSteps postProcessFlags)

Any help is appreciated.

@kewur
Copy link

kewur commented May 7, 2016

Having the exact same problem. Tested both FBX and DAE getting it from both.

NullReferenceException: Object reference not set to an instance of an object (wrapper stelemref) object:stelemref (object,intptr,object) System.String.Format (System.String format, System.Object arg0, System.Object arg1, System.Object arg2) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/String.cs:1863) Assimp.Material.CreateFullyQualifiedName (System.String baseName, TextureType texType, Int32 texIndex) Assimp.MaterialProperty.get_FullyQualifiedName () Assimp.Material.AddProperty (Assimp.MaterialProperty matProp) Assimp.Material.Assimp.IMarshalable<Assimp.Material,Assimp.Unmanaged.AiMaterial>.FromNative (Assimp.Unmanaged.AiMaterial& nativeValue) Assimp.MemoryHelper.FromNativeArray[Material,AiMaterial] (IntPtr nativeArray, Int32 length, Boolean arrayOfPointers) Assimp.Scene.Assimp.IMarshalable<Assimp.Scene,Assimp.Unmanaged.AiScene>.FromNative (Assimp.Unmanaged.AiScene& nativeValue) Assimp.MemoryHelper.FromNativePointer[Scene,AiScene] (IntPtr ptr) Assimp.Scene.FromUnmanagedScene (IntPtr scenePtr) Assimp.AssimpContext.ImportFile (System.String file, PostProcessSteps postProcessFlags) Entities.Player.Player.Start () (at Assets/Scripts/Entities/Player/Player.cs:94)

@ruzannakamalyan
Copy link
Author

@kewur ,
we got rid off the exception by using assimp-net version 3.0 and the latest version for assimp.

@kewur
Copy link

kewur commented May 8, 2016

@ruzannakamalyan
Thanks, that's exactly what I did but I'm using 3.2 instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants