assimp / assimp/assimp-net

NullReferenceException when trying to import FBX.

Open
#30 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
218
Forks
83
PR merge metrics
No merged PRs in 30d

Description

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.FromNative (Assimp.Unmanaged.AiMaterial& nativeValue)
Assimp.MemoryHelper.FromNativeArray[Material,AiMaterial] (IntPtr nativeArray, Int32 length, Boolean arrayOfPointers)
Assimp.Scene.Assimp.IMarshalable.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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Assimp.Material.CreateFullyQualifiedName and follow the material-property path shown in the trace through AssimpContext.ImportFile. Reproduce the failure with the reported FBX import and verify that the import completes without the NullReferenceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.