guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.83k stars 226 forks source link

Latest nightly exporting a gltf or glb makes UE crash #318

Closed jerobarraco closed 11 months ago

jerobarraco commented 1 year ago

in my experience both glb and gltf have the same issue. i don't know what would be the real issue, feel free to check the issue i've linked to vengi. it does works with blender though i can't see the colors. but it would be nice if it could work from goxel otherwise is a lot of extra work. and it is working on the latest release from april 0.12

tried this build and it crashes on import https://github.com/guillaumechereau/goxel/actions/runs/5609710977

the files ((c) me 2023) Char18.zip

i had a similar issue when importing from vengi/voxedit. https://github.com/mgerhardy/vengi/issues/295

this is the log.


Caught signal 11 Segmentation fault

libUnrealEditor-GLTFCore.so!GLTF::FValidAccessor::GetVec4Array(UE::Math::TVector4<float>*) const [/home/nande/work/UE5.2/Engine/Source/./../Plugins/Editor/GLTFImporter/Source/GLTFCore/Private/GLTF/GLTFAccessor.cpp:546]
libUnrealEditor-GLTFCore.so!GLTF::FMeshFactoryImpl::ImportPrimitive(GLTF::FPrimitive const&, int, int, bool, bool, TMeshAttributesRef<FVertexInstanceID, UE::Math::TVector<float> > const&, TMeshAttributesRef<FVertexInstanceID, UE::Math::TVector<float> > const&, TMeshAttributesRef<FVertexInstanceID, float> const&, TMeshAttributesRef<FVertexInstanceID, UE::Math::TVector2<float> > const&, TMeshAttributesRef<FVertexInstanceID, UE::Math::TVector4<float> > const&, TMeshAttributesRef<FEdgeID, bool> const&, FMeshDescription*, bool) [/home/nande/work/UE5.2/Engine/Source/./../Plugins/Editor/GLTFImporter/Source/GLTFCore/Private/GLTFMeshFactory.cpp:331]
libUnrealEditor-GLTFCore.so!GLTF::FMeshFactoryImpl::FillMeshDescription(GLTF::FMesh const&, FMeshDescription*) [/home/nande/work/UE5.2/Engine/Source/./../Plugins/Editor/GLTFImporter/Source/GLTFCore/Private/GLTFMeshFactory.cpp:229]
libUnrealEditor-InterchangeImport.so!UE::Interchange::Gltf::Private::GetStaticMeshPayloadDataForPayLoadKey(GLTF::FAsset const&, FString const&, UE::Interchange::FStaticMeshPayloadData&) [/home/nande/work/UE5.2/Engine/Source/./../Plugins/Interchange/Runtime/Source/Import/Private/Gltf/InterchangeGltfMesh.cpp:283]
libUnrealEditor-InterchangeImport.so!UE::Core::Private::Function::TFunctionRefCaller<UInterchangeGltfTranslator::GetStaticMeshPayloadData(FString const&) const::$_30, TOptional<UE::Interchange::FStaticMeshPayloadData> ()>::Call(void*) [/home/nande/work/UE5.2/Engine/Source/Runtime/Core/Public/Templates/Function.h:465]
libUnrealEditor-InterchangeImport.so!TAsyncGraphTask<TOptional<UE::Interchange::FStaticMeshPayloadData> >::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) [/home/nande/work/UE5.2/Engine/Source/Runtime/Core/Public/Async/Async.h:127]
libUnrealEditor-InterchangeImport.so!TGraphTask<TAsyncGraphTask<TOptional<UE::Interchange::FStaticMeshPayloadData> > >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool) [/home/nande/work/UE5.2/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:1310]
libUnrealEditor-Core.so!void LowLevelTasks::FTask::Init<FTaskGraphCompatibilityImplementation::QueueTask(FBaseGraphTask*, bool, ENamedThreads::Type, ENamedThreads::Type)::'lambda'()>(char16_t const*, LowLevelTasks::ETaskPriority, FTaskGraphCompatibilityImplementation::QueueTask(FBaseGraphTask*, bool, ENamedThreads::Type, ENamedThreads::Type)::'lambda'()&&, LowLevelTasks::ETaskFlags)::'lambda'(bool)::operator()(bool) const [/home/nande/work/UE5.2/Engine/Source/Runtime/Core/Public/Async/Fundamental/Task.h:499]
libUnrealEditor-Core.so!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask* (bool), 48u>::TTaskDelegateImpl<void LowLevelTasks::FTask::Init<FTaskGraphCompatibilityImplementation::QueueTask(FBaseGraphTask*, bool, ENamedThreads::Type, ENamedThreads::Type)::'lambda'()>(char16_t const*, LowLevelTasks::ETaskPriority, FTaskGraphCompatibilityImplementation::QueueTask(FBaseGraphTask*, bool, ENamedThreads::Type, ENamedThreads::Type)::'lambda'()&&, LowLevelTasks::ETaskFlags)::'lambda'(bool), false>::CallAndMove(LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask* (bool), 48u>&, void*, unsigned int, bool) [/home/nande/work/UE5.2/Engine/Source/Runtime/Core/Public/Async/Fundamental/TaskDelegate.h:171]
libUnrealEditor-Core.so!LowLevelTasks::FTask::ExecuteTask() [/home/nande/work/UE5.2/Engine/Source/Runtime/Core/Public/Async/Fundamental/Task.h:627]
libUnrealEditor-Core.so!LowLevelTasks::FScheduler::ExecuteTask(LowLevelTasks::FTask*&) [/home/nande/work/UE5.2/Engine/Source/./Runtime/Core/Private/Async/Fundamental/Scheduler.cpp:150]
libUnrealEditor-Core.so!bool LowLevelTasks::FScheduler::TryExecuteTaskFrom<LowLevelTasks::TLocalQueueRegistry<1024u>::TLocalQueue, &(LowLevelTasks::TLocalQueueRegistry<1024u>::TLocalQueue::DequeueGlobal(bool, bool)), false>(LowLevelTasks::TLocalQueueRegistry<1024u>::TLocalQueue*, LowLevelTasks::TLocalQueueRegistry<1024u>::FOutOfWork&, bool, bool) [/home/nande/work/UE5.2/Engine/Source/./Runtime/Core/Private/Async/Fundamental/Scheduler.cpp:349]
libUnrealEditor-Core.so!LowLevelTasks::FScheduler::WorkerMain(LowLevelTasks::FSleepEvent*, LowLevelTasks::TLocalQueueRegistry<1024u>::TLocalQueue*, unsigned int, bool) [/home/nande/work/UE5.2/Engine/Source/./Runtime/Core/Private/Async/Fundamental/Scheduler.cpp:378]
libUnrealEditor-Core.so!FThreadImpl::Run() [/home/nande/work/UE5.2/Engine/Source/./Runtime/Core/Private/HAL/Thread.cpp:67]
libUnrealEditor-Core.so!FRunnableThreadPThread::Run() [/home/nande/work/UE5.2/Engine/Source/./Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
libUnrealEditor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/home/nande/work/UE5.2/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:187]
libc.so.6!UnknownFunction(0x94b42)
libc.so.6!UnknownFunction(0x1269ff)
jerobarraco commented 1 year ago

build 61 has the same issue https://github.com/guillaumechereau/goxel/actions/runs/4976685160

jerobarraco commented 1 year ago

build 51 works https://github.com/guillaumechereau/goxel/actions/runs/4901178124

jerobarraco commented 1 year ago

build 56 breaks https://github.com/guillaumechereau/goxel/actions/runs/4972320108/job/13465196754

jerobarraco commented 1 year ago

build 55 works, build 56 breaks. so whatever changes there might be the responsible.

guillaumechereau commented 1 year ago

Thanks for the work! I need to investigate why unreal engine does not like float colors. Unfortunately I am running out of disk space to install unreal right now.

jerobarraco commented 1 year ago

thanks a lot. jic the binary versions (installed) are smaller. and you don't need to compile. https://www.unrealengine.com/en-US/linux ill be glad to test your app as long as you can provide a precompiled binary like the one from github actions.

i could try to compile if there's a way to keep all the dependencies and libraries isolated from the system. but i'm running out of time.

Te3Que commented 1 year ago

I have observed equivalent behaviour. In the Goxel stable release 0.12.0 if I open .gltf that was exported from Goxel, in MeshLab it will crash, but if I build from source like now 5 minutes ago it opens but are a mess. Unlike if open in Blender 3.5 it looks normal

jerobarraco commented 1 year ago

it seems that ue5.3 doesn't crash anymore with the build from the action 70. still doesnt support drako compression.

guillaumechereau commented 11 months ago

Drako compression is a different issue. I'll close this issue for now since the crash as been fixed and open a new one for the compression.