Cannot encode mesh in latest version.
See original GitHub issueTried exporting both a GameObject (default sphere) using Tools > Draco > Encode Selected GameObject
and received this error:
InvalidOperationException: The NativeArray can not be Disposed because it was not allocated with a valid allocator.
Unity.Collections.NativeArray`1[T].Dispose () (at <4cc8ec075538416496e5db5d391208ac>:0)
Draco.Encoder.DracoEncoder.EncodeMesh (UnityEngine.Mesh unityMesh, System.Int32 encodingSpeed, System.Int32 decodingSpeed, System.Int32 positionQuantization, System.Int32 normalQuantization, System.Int32 texCoordQuantization, System.Int32 colorQuantization, System.Int32 genericQuantization) (at C:/.../Runtime/Scripts/Encoder/DracoEncoder.cs:234)
Draco.Encoder.DracoEncoder.EncodeMesh (UnityEngine.Mesh unityMesh, UnityEngine.Vector3 worldScale, System.Single precision, System.Int32 encodingSpeed, System.Int32 decodingSpeed, System.Int32 normalQuantization, System.Int32 texCoordQuantization, System.Int32 colorQuantization, System.Int32 genericQuantization) (at C:/.../Runtime/Scripts/Encoder/DracoEncoder.cs:104)
Draco.Editor.DracoEditorEncoder.CompressMeshFilters (UnityEngine.MeshFilter[] meshFilters, System.String directory) (at C:/.../Editor/DracoEditorEncoder.cs:151)
Draco.Editor.DracoEditorEncoder.Compress () (at C:/.../Editor/DracoEditorEncoder.cs:88)
Tried exporting a mesh (read/write enabled obj in assets) using Tools > Draco > Encode Selected Mesh
and received this error:
InvalidOperationException: The NativeArray can not be Disposed because it was not allocated with a valid allocator.
Unity.Collections.NativeArray`1[T].Dispose () (at <4cc8ec075538416496e5db5d391208ac>:0)
Draco.Encoder.DracoEncoder.EncodeMesh (UnityEngine.Mesh unityMesh, System.Int32 encodingSpeed, System.Int32 decodingSpeed, System.Int32 positionQuantization, System.Int32 normalQuantization, System.Int32 texCoordQuantization, System.Int32 colorQuantization, System.Int32 genericQuantization) (at C:/.../Runtime/Scripts/Encoder/DracoEncoder.cs:234)
Draco.Editor.DracoEditorEncoder.EncodeMesh (UnityEngine.Mesh mesh, System.String directory) (at C:/.../Editor/DracoEditorEncoder.cs:225)
Draco.Editor.DracoEditorEncoder.EncodeSelectedMeshes () (at C:/.../Editor/DracoEditorEncoder.cs:213)
Also received this error sporadically afterwards:
A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.
Same error appeared both when installed using Install-com.atteneder.draco-2.0.0-preview.unitypackage
as well as pulling the latest source from github.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Mesh cannot be decoded after sequential encoding #1013
I have a user-reported error related to a file that becomes invalid (the decoder always fails) after Draco encoding with the sequential method....
Read more >[ANSYS Meshing] Model Information is incompatible with ...
It occur because the meshing cannot detect the face at the setup option, hence i suggest to match the missing surface for the...
Read more >SDK for Mesh v1.0.0 with SES "invalid ASCII encoded byte: ...
I am trying to build and debug the Mesh v1.0.0 light-switch server ... then there is a Segger GUI popup "invalid ASCII encoded...
Read more >TypeError: Cannot call property getEncoder in object
I am trying to encode byte array using java package Base64 in a javascript. Javascript engine is Rhino. Below is the error in...
Read more >Gotchas — Blender Python API
When working with mesh data you may run into the problem where a script fails to run as expected in Edit-Mode. This is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I couldn’t reproduce on 2020.3 LTS nor 2021.1. It makes no sense to me to spend time fixing it for 2020.1, so please upgrade to 2020.3 LTS and see if this solves your problem (reopen and provide steps to reproduce otherwise).
Thanks!
You shouldn’t need to build the binaries yourself. This project uses GIT LFS for dll files, so please make sure you have GIT LFS installed when cloning this repository. Otherwise, the binaries are built in this GitHub project’s actions.