Convert UnsafeList to NativeContainer

Hello !
I need to convert an UnsafeList to a NativeSlice.

I’m using NativeSliceUnsafeUtility.ConvertExistingDataToNativeSlice but it throws an exception.
What is the proper way of converting from UnsafeList to a Native Container ?

NativeSlice<SVOByte.SVONodeBufferStruct> slice1 = new NativeSlice<SVOByte.SVONodeBufferStruct>(svoBufferArray, offset,  item.Value.svo.svoNodeArray.Length);
NativeSlice<SVOByte.SVONodeBufferStruct> slice2 = NativeSliceUnsafeUtility.ConvertExistingDataToNativeSlice<SVOByte.SVONodeBufferStruct>(item.Value.svo.svoNodeArray.Ptr, UnsafeUtility.SizeOf(typeof(SVOByte.SVONodeBufferStruct)), item.Value.svo.svoNodeArray.Length);
slice1.CopyFrom(slice2);

Here is the stack trace

NullReferenceException: Object reference not set to an instance of an object
    Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <59e7be63019b4518baaf30c245954236>:0)
Unity.Collections.LowLevel.Unsafe.NativeSliceUnsafeUtility.GetUnsafeReadOnlyPtr[T] (Unity.Collections.NativeSlice`1[T] nativeSlice) (at <59e7be63019b4518baaf30c245954236>:0)
Unity.Collections.NativeSlice`1[T].CopyFrom (Unity.Collections.NativeSlice`1[T] slice) (at <59e7be63019b4518baaf30c245954236>:0)
VoxelChunkWorldManagerComputeBuffer.dumpSvoToBuffer () (at Assets/SVOComputeShader/VoxelChunkWorldManagerComputeBuffer.cs:260)
VoxelChunkWorldManagerComputeBuffer.GenerateWorld (System.UInt32 numChunkX, System.UInt32 numChunkY, System.UInt32 numChunkZ) (at Assets/SVOComputeShader/VoxelChunkWorldManagerComputeBuffer.cs:372)
VoxelChunkWorldManagerComputeBuffer.Start () (at Assets/SVOComputeShader/VoxelChunkWorldManagerComputeBuffer.cs:53)

It throws error, because an AtomicSafetyHandle is missing.

You need to NativeSliceUnsafeUtility.SetAtomicSafetyHandle().