WARNING: Could not find a color reduction algorithm for '<_PropertyDeferred, <built-in function StringProperty>, {'name': 'Controls the algorithm that is used to perform the color reduction', 'default': 'MedianCut', 'description': 'Controls the algorithm that is used to perform the color reduction'}>'
Loaded 12037 colors and quantized to -1
create voxels for 24321 positions
ERROR: Stack trace (most recent call last) in thread 81112:
ERROR: #28 Object "", at 0xffffffffffffffff, in
ERROR: #27 Source "./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78", in __GI___clone3
ERROR: #26 Source "./nptl/./nptl/pthread_create.c:448", in start_thread
ERROR: #25 Source "/build/reproducible-path/gcc-14-14.2.0/build/x86_64-linux-gnu/libsanitizer/asan/../../../../src/libsanitizer/asan/asan_interceptors.cpp:234", in asan_thread_start(void*)
ERROR: #24 Object "/lib/x86_64-linux-gnu/libSDL3.so.0", at 0x7fdc289df1fc, in SDL_DYNAPI_entry
ERROR: #23 Object "/lib/x86_64-linux-gnu/libSDL3.so.0", at 0x7fdc288f4628, in SDL_DYNAPI_entry
ERROR: #22 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/concurrent/Thread.cpp:24", in core::threadTrampoline(void*)
ERROR: 22: static int threadTrampoline(void *data) {
ERROR: 23: core::Function<void()> *func = (core::Function<void()> *)data;
ERROR: > 24: (*func)();
ERROR: 25: func->~Function();
ERROR: 26: core_free(func);
ERROR: 27: return 0;
ERROR: #21 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:155", in core::Function<void ()>::operator()() const
ERROR: 152: }
ERROR: 153:
ERROR: 154: Ret operator()(Args... args) const {
ERROR: > 155: return _callable->invoke(args...);
ERROR: 156: }
ERROR: 157:
ERROR: 158: explicit operator bool() const {
ERROR: #20 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:38", in core::Function<void ()>::Callable<core::ThreadPool::init()::{lambda()#1}>::invoke()
ERROR: 35: F _f;
ERROR: 36: Callable(const F &f) : _f(f) {}
ERROR: 37: Callable(F &&f) : _f(core::move(f)) {}
ERROR: > 38: Ret invoke(Args... args) override { return _f(args...); }
ERROR: 39: void copyTo(void *dst) const override { new (dst) Callable(_f); }
ERROR: 40: void moveTo(void *dst) override { new (dst) Callable(core::move(_f)); }
ERROR: 41: int size() const override { return (int)sizeof(Callable); }
ERROR: #19 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/concurrent/ThreadPool.cpp:96", in core::ThreadPool::init()::{lambda()#1}::operator()() const
ERROR: 93: core_trace_begin_frame(n.c_str());
ERROR: 94: core_trace_scoped(ThreadPoolWorker);
ERROR: 95: Log::trace("Execute task in %i", (int)i);
ERROR: > 96: task();
ERROR: 97: Log::trace("End of task in %i", (int)i);
ERROR: 98: core_trace_end_frame(n.c_str());
ERROR: #18 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:155", in core::Function<void ()>::operator()() const
ERROR: 152: }
ERROR: 153:
ERROR: 154: Ret operator()(Args... args) const {
ERROR: > 155: return _callable->invoke(args...);
ERROR: 156: }
ERROR: 157:
ERROR: 158: explicit operator bool() const {
ERROR: #17 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:38", in core::Function<void ()>::Callable<core::ThreadPool::enqueue<app::for_parallel_impl(int, int, void (*)(void*, int, int), void*, bool)::{lambda()#1}>(app::for_parallel_impl(int, int, void (*)(void*, int, int), void*, bool)::{lambda()#1}&&)::{lambda()#1}>::invoke()
ERROR: 35: F _f;
ERROR: 36: Callable(const F &f) : _f(f) {}
ERROR: 37: Callable(F &&f) : _f(core::move(f)) {}
ERROR: > 38: Ret invoke(Args... args) override { return _f(args...); }
ERROR: 39: void copyTo(void *dst) const override { new (dst) Callable(_f); }
ERROR: 40: void moveTo(void *dst) override { new (dst) Callable(core::move(_f)); }
ERROR: 41: int size() const override { return (int)sizeof(Callable); }
ERROR: #16 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/concurrent/ThreadPool.h:109", in core::ThreadPool::enqueue<app::for_parallel_impl(int, int, void (*)(void*, int, int), void*, bool)::{lambda()#1}>(app::for_parallel_impl(int, int, void (*)(void*, int, int), void*, bool)::{lambda()#1}&&)::{lambda()#1}::operator()() const
ERROR: 106: state->addRef(); // one ref for the Future, one for the lambda
ERROR: 107: if constexpr (core::is_same<return_type, void>::value) {
ERROR: 108: _tasks.emplace([state, func = core::Function<void()>(core::forward<F>(f))]() {
ERROR: > 109: func();
ERROR: 110: state->set();
ERROR: 111: state->release();
ERROR: 112: });
ERROR: #15 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:155", in core::Function<void ()>::operator()() const
ERROR: 152: }
ERROR: 153:
ERROR: 154: Ret operator()(Args... args) const {
ERROR: > 155: return _callable->invoke(args...);
ERROR: 156: }
ERROR: 157:
ERROR: 158: explicit operator bool() const {
ERROR: #14 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:38", in core::Function<void ()>::Callable<app::for_parallel_impl(int, int, void (*)(void*, int, int), void*, bool)::{lambda()#1}>::invoke()
ERROR: 35: F _f;
ERROR: 36: Callable(const F &f) : _f(f) {}
ERROR: 37: Callable(F &&f) : _f(core::move(f)) {}
ERROR: > 38: Ret invoke(Args... args) override { return _f(args...); }
ERROR: 39: void copyTo(void *dst) const override { new (dst) Callable(_f); }
ERROR: 40: void moveTo(void *dst) override { new (dst) Callable(core::move(_f)); }
ERROR: 41: int size() const override { return (int)sizeof(Callable); }
ERROR: #13 Source "/home/mgerhardy/dev/oss/vengi/src/modules/app/Async.cpp:52", in app::for_parallel_impl(int, int, void (*)(void*, int, int), void*, bool)::{lambda()#1}::operator()() const
ERROR: 50: for (int i = start; i < end; i += chunkSize) {
ERROR: 51: uint32_t chunk_end = core_min(i + chunkSize, end);
ERROR: > 52: futures.emplace_back(app::App::getInstance()->threadPool()->enqueue([i, chunk_end, fn, ctx]() { fn(ctx, i, chunk_end); }));
ERROR: 53: }
ERROR: 54:
ERROR: 55: if (!wait) {
ERROR: #12 Source "/home/mgerhardy/dev/oss/vengi/src/modules/app/ForParallel.h:24", in app::for_parallel<core::ParallelMap<int, voxelformat::PosSampling, 3541ul, core::priv::DefaultHasher, core::priv::EqualCompare>::for_parallel(core::Function<void (int const&, voxelformat::PosSampling const&)> const&) const::{lambda(int, int)#1}>(int, int, core::ParallelMap<int, voxelformat::PosSampling, 3541ul, core::priv::DefaultHasher, core::priv::EqualCompare>::for_parallel(core::Function<void (int const&, voxelformat::PosSampling const&)> const&) const::{lambda(int, int)#1} const&, bool)::{lambda(void*, int, int)#1}::_FUN(void*, int, int)
ERROR: 21: template<typename F>
ERROR: 22: inline void for_parallel(int start, int end, const F &f, bool wait = true) {
ERROR: 23: for_parallel_impl(
ERROR: > 24: start, end, [](void *ctx, int s, int e) { (*(const F *)ctx)(s, e); }, const_cast<void *>(static_cast<const void *>(&f)), wait);
ERROR: 25: }
ERROR: 26:
ERROR: 27: } // namespace app
ERROR: #11 Source "/home/mgerhardy/dev/oss/vengi/src/modules/app/ForParallel.h:24", in app::for_parallel<core::ParallelMap<int, voxelformat::PosSampling, 3541ul, core::priv::DefaultHasher, core::priv::EqualCompare>::for_parallel(core::Function<void (int const&, voxelformat::PosSampling const&)> const&) const::{lambda(int, int)#1}>(int, int, core::ParallelMap<int, voxelformat::PosSampling, 3541ul, core::priv::DefaultHasher, core::priv::EqualCompare>::for_parallel(core::Function<void (int const&, voxelformat::PosSampling const&)> const&) const::{lambda(int, int)#1} const&, bool)::{lambda(void*, int, int)#1}::operator()(void*, int, int) const
ERROR: 21: template<typename F>
ERROR: 22: inline void for_parallel(int start, int end, const F &f, bool wait = true) {
ERROR: 23: for_parallel_impl(
ERROR: > 24: start, end, [](void *ctx, int s, int e) { (*(const F *)ctx)(s, e); }, const_cast<void *>(static_cast<const void *>(&f)), wait);
ERROR: 25: }
ERROR: 26:
ERROR: 27: } // namespace app
ERROR: #10 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/collection/ParallelMap.h:35", in core::ParallelMap<int, voxelformat::PosSampling, 3541ul, core::priv::DefaultHasher, core::priv::EqualCompare>::for_parallel(core::Function<void (int const&, voxelformat::PosSampling const&)> const&) const::{lambda(int, int)#1}::operator()(int, int) const
ERROR: 32: for (int i = start; i < end; ++i) {
ERROR: 33: const typename Super::KeyValue *entry = _buckets[i];
ERROR: 34: while (entry != nullptr) {
ERROR: > 35: fn(entry->key, entry->value);
ERROR: 36: entry = entry->next;
ERROR: 37: }
ERROR: 38: }
ERROR: #9 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:155", in core::Function<void (int const&, voxelformat::PosSampling const&)>::operator()(int const&, voxelformat::PosSampling const&) const
ERROR: 152: }
ERROR: 153:
ERROR: 154: Ret operator()(Args... args) const {
ERROR: > 155: return _callable->invoke(args...);
ERROR: 156: }
ERROR: 157:
ERROR: 158: explicit operator bool() const {
ERROR: #8 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Function.h:38", in core::Function<void (int const&, voxelformat::PosSampling const&)>::Callable<voxelformat::MeshFormat::voxelizeTris(scenegraph::SceneGraphNode&, core::ParallelMap<int, voxelformat::PosSampling, 3541ul, core::priv::DefaultHasher, core::priv::EqualCompare> const&, core::DynamicArray<core::SharedPtr<voxelformat::MeshMaterial>, 32ul> const&, bool) const::{lambda(int, voxelformat::PosSampling const&)#1}>::invoke(int const&, voxelformat::PosSampling const&)
ERROR: 35: F _f;
ERROR: 36: Callable(const F &f) : _f(f) {}
ERROR: 37: Callable(F &&f) : _f(core::move(f)) {}
ERROR: > 38: Ret invoke(Args... args) override { return _f(args...); }
ERROR: 39: void copyTo(void *dst) const override { new (dst) Callable(_f); }
ERROR: 40: void moveTo(void *dst) override { new (dst) Callable(core::move(_f)); }
ERROR: 41: int size() const override { return (int)sizeof(Callable); }
ERROR: #7 Source "/home/mgerhardy/dev/oss/vengi/src/modules/voxelformat/private/mesh/MeshFormat.cpp:793", in voxelformat::MeshFormat::voxelizeTris(scenegraph::SceneGraphNode&, core::ParallelMap<int, voxelformat::PosSampling, 3541ul, core::priv::DefaultHasher, core::priv::EqualCompare> const&, core::DynamicArray<core::SharedPtr<voxelformat::MeshMaterial>, 32ul> const&, bool) const::{lambda(int, voxelformat::PosSampling const&)#1}::operator()(int, voxelformat::PosSampling const&) const
ERROR: 790: if (rgba.a <= AlphaThreshold) {
ERROR: 791: return;
ERROR: 792: }
ERROR: > 793: const uint8_t colorIndex = palLookup.findClosestIndex(rgba);
ERROR: 794: const voxel::Voxel voxel = voxel::createVoxel(palette, colorIndex, posSampling.getNormal());
ERROR: 795: core_assert_msg_always(volume->setVoxel(idx, voxel), "Failed to set voxel at index %i (%s)", idx, volume->region().toString().c_str());
ERROR: 796: };
ERROR: #6 Source "/home/mgerhardy/dev/oss/vengi/src/modules/palette/PaletteLookup.cpp:57", in palette::PaletteLookup::findClosestIndex(color::RGBA)
ERROR: 54: #elif defined(__GNUC__) || defined(__clang__)
ERROR: 55: uint16_t oldValue = __atomic_load_n(&_cache[idx], __ATOMIC_RELAXED);
ERROR: 56: if (oldValue == (uint16_t)PaletteColorNotFound) {
ERROR: > 57: core_assert_always(_palette.colorCount() > 0);
ERROR: 58: uint16_t newValue = _palette.getClosestMatch(rgba);
ERROR: 59: __atomic_exchange_n(&_cache[idx], newValue, __ATOMIC_SEQ_CST);
ERROR: 60: }
ERROR: #5 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Assert.cpp:58", in core_report_assert(AssertData&, char const*, int, char const*)
ERROR: 55: }
ERROR: 56:
ERROR: 57: bool core_report_assert(AssertData &data, const char *file, int line, const char *function) {
ERROR: > 58: const SDL_AssertState state = SDL_ReportAssertion((SDL_AssertData *)&data, function, file, line);
ERROR: 59: if (state == SDL_ASSERTION_RETRY) {
ERROR: 60: return true;
ERROR: 61: }
ERROR: #4 Object "/lib/x86_64-linux-gnu/libSDL3.so.0", at 0x7fdc2884886a, in
ERROR: #3 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Assert.cpp:35", in coreAssertionHandler(SDL_AssertData const*, void*)
ERROR: 33: static SDL_assert_state coreAssertionHandler(const SDL_assert_data *data, void *userdata) {
ERROR: 34: if (data->trigger_count <= 1 && data->always_ignore == 0) {
ERROR: > 35: core_stacktrace();
ERROR: 36: }
ERROR: 37: const SDL_AssertState state = SDL_GetDefaultAssertionHandler()(data, userdata);
ERROR: 38: if (state == SDL_ASSERTION_RETRY) {
ERROR: #2 Source "/home/mgerhardy/dev/oss/vengi/src/modules/core/Assert.cpp:128", in core_stacktrace()
ERROR: 125: #elif defined(HAVE_BACKWARD)
ERROR: 126: std::ostringstream os;
ERROR: 127: backward::StackTrace st;
ERROR: > 128: st.load_here(32);
ERROR: 129: backward::Printer printer;
ERROR: 130: printer.print(st, os);
ERROR: 131: std::string str = os.str();
ERROR: #1 Source "/home/mgerhardy/dev/oss/vengi/contrib/libs/backward/backward.h:879", in backward::StackTraceImpl<backward::system_tag::linux_tag>::load_here(unsigned long, void*, void*)
ERROR: 876: return 0;
ERROR: 877: }
ERROR: 878: _stacktrace.resize(depth);
ERROR: > 879: size_t trace_cnt = details::unwind(callback(*this), depth);
ERROR: 880: _stacktrace.resize(trace_cnt);
ERROR: 881: skip_n_firsts(0);
ERROR: 882: return size();
ERROR: #0 Source "/home/mgerhardy/dev/oss/vengi/contrib/libs/backward/backward.h:861", in unsigned long backward::details::unwind<backward::StackTraceImpl<backward::system_tag::linux_tag>::callback>(backward::StackTraceImpl<backward::system_tag::linux_tag>::callback, unsigned long)
ERROR: 859: template <typename F> size_t unwind(F f, size_t depth) {
ERROR: 860: Unwinder<F> unwinder;
ERROR: > 861: return unwinder(f, depth);
ERROR: 862: }
ERROR: 863:
ERROR: 864: } // namespace details
WARNING:
Assertion failure at findClosestIndex (/home/mgerhardy/dev/oss/vengi/src/modules/palette/PaletteLookup.cpp:57), triggered 1 time:
'_palette.colorCount() > 0'