https://discourse.bsframework.io/t/random-skybox-texture-loading-crash/500?u=hhyyrylainen
Applying this diff to examples:
diff --git a/Source/SkeletalAnimation/Main.cpp b/Source/SkeletalAnimation/Main.cpp
index 3c9b87a..778d3a9 100644
--- a/Source/SkeletalAnimation/Main.cpp
+++ b/Source/SkeletalAnimation/Main.cpp
@@ -88,7 +88,8 @@ namespace bs
assets.exampleMaterial->setTexture("gMetalnessTex", assets.exampleMetalnessTex);
// Load an environment map
- assets.exampleSkyCubemap = ExampleFramework::loadTexture(ExampleTexture::EnvironmentRathaus, false, true, true);
+ assets.exampleSkyCubemap = bs::gResources().load<bs::Texture>(exampleDataPath + "Materials/Thrive_ocean_skybox.asset");
+ // assets.exampleSkyCubemap = ExampleFramework::loadTexture(ExampleTexture::EnvironmentRathaus, false, true, true);
return assets;
}
@@ -212,4 +213,4 @@ int main()
Application::shutDown();
return 0;
-}
\ No newline at end of file
+}
And putting this: https://boostslair.com/files/temp/thrive/Thrive_ocean_skybox.asset asset in: bsfExamples/Data/Materials
Results in this crash:
0 in ?? of /lib64/libnvidia-glcore.so.430.40
1 in ?? of /lib64/libnvidia-glcore.so.430.40
2 in ?? of /lib64/libnvidia-glcore.so.430.40
3 in ?? of /lib64/libnvidia-glcore.so.430.40
4 in ?? of /lib64/libnvidia-glcore.so.430.40
5 in ?? of /lib64/libnvidia-glcore.so.430.40
6 in ?? of /lib64/libnvidia-glcore.so.430.40
7 in bs::ct::GLTextureBuffer::upload of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Plugins/bsfGLRenderAPI/BsGLPixelBuffer.cpp:263
8 in bs::ct::GLTexture::writeDataImpl of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Plugins/bsfGLRenderAPI/BsGLTexture.cpp:445
9 in bs::ct::Texture::writeData of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Foundation/bsfCore/Image/BsTexture.cpp:358
10 in bs::Texture::<lambda(bs::SPtr<bs::ct::Texture>&, bs::UINT32, bs::UINT32, bs::SPtr<bs::PixelData>&, bool, bs::AsyncOp&)>::operator()(const bs::SPtr &, bs::UINT32, bs::UINT32, const bs::SPtr &, bool, bs::AsyncOp &) const of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Foundation/bsfCore/Image/BsTexture.cpp:127
11 in std::_Function_handler<void(const std::shared_ptr<bs::ct::Texture>&, unsigned int, unsigned int, const std::shared_ptr<bs::PixelData>&, bool, bs::AsyncOp&), bs::Texture::writeData(bs::SPtr<bs::PixelData>&, bs::UINT32, bs::UINT32, bool)::<lambda(bs::SPtr<bs::ct::Texture>&, bs::UINT32, bs::UINT32, bs::SPtr<bs::PixelData>&, bool, bs::AsyncOp&)> >::_M_invoke(const std::_Any_data &, const std::shared_ptr<bs::ct::Texture> &, unsigned int &&, unsigned int &&, const std::shared_ptr<bs::PixelData> &, bool &&, bs::AsyncOp &) of /usr/include/c++/8/bits/std_function.h:297
12 in std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)>::operator()(std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&) const of /usr/include/c++/8/bits/std_function.h:687
13 in std::__invoke_impl<void, std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)>&, std::shared_ptr<bs::ct::Texture>&, unsigned int&, unsigned int&, std::shared_ptr<bs::PixelData>&, bool&, bs::AsyncOp&>(std::__invoke_other, std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)>&, std::shared_ptr<bs::ct::Texture>&, unsigned int&, unsigned int&, std::shared_ptr<bs::PixelData>&, bool&, bs::AsyncOp&) of /usr/include/c++/8/bits/invoke.h:60
14 in std::__invoke<std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)>&, std::shared_ptr<bs::ct::Texture>&, unsigned int&, unsigned int&, std::shared_ptr<bs::PixelData>&, bool&, bs::AsyncOp&>(std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)>&, std::shared_ptr<bs::ct::Texture>&, unsigned int&, unsigned int&, std::shared_ptr<bs::PixelData>&, bool&, bs::AsyncOp&) of /usr/include/c++/8/bits/invoke.h:95
15 in std::_Bind<std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)> (std::shared_ptr<bs::ct::Texture>, unsigned int, unsigned int, std::shared_ptr<bs::PixelData>, bool, std::_Placeholder<1>)>::__call<void, bs::AsyncOp&, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(std::tuple<bs::AsyncOp&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul>) of /usr/include/c++/8/functional:400
16 in std::_Bind<std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)> (std::shared_ptr<bs::ct::Texture>, unsigned int, unsigned int, std::shared_ptr<bs::PixelData>, bool, std::_Placeholder<1>)>::operator()<bs::AsyncOp&, void>(bs::AsyncOp&) of /usr/include/c++/8/functional:484
17 in std::_Function_handler<void (bs::AsyncOp&), std::_Bind<std::function<void (std::shared_ptr<bs::ct::Texture> const&, unsigned int, unsigned int, std::shared_ptr<bs::PixelData> const&, bool, bs::AsyncOp&)> (std::shared_ptr<bs::ct::Texture>, unsigned int, unsigned int, std::shared_ptr<bs::PixelData>, bool, std::_Placeholder<1>)> >::_M_invoke(std::_Any_data const&, bs::AsyncOp&) of /usr/include/c++/8/bits/std_function.h:297
18 in std::function<void (bs::AsyncOp&)>::operator()(bs::AsyncOp&) const of /usr/include/c++/8/bits/std_function.h:687
19 in bs::CommandQueueBase::playbackWithNotify(std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*, std::function<void (unsigned int)>) of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Foundation/bsfCore/CoreThread/BsCommandQueue.cpp:113
20 in bs::CommandQueueBase::playback of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Foundation/bsfCore/CoreThread/BsCommandQueue.cpp:140
21 in std::__invoke_impl<void, void (bs::CommandQueueBase::*&)(std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*), bs::CommandQueueBase*&, std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*&> of /usr/include/c++/8/bits/invoke.h:73
22 in std::__invoke<void (bs::CommandQueueBase::*&)(std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*), bs::CommandQueueBase*&, std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*&> of /usr/include/c++/8/bits/invoke.h:95
23 in std::_Bind<void (bs::CommandQueueBase::*(bs::CommandQueueBase*, std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*))(std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) of /usr/include/c++/8/functional:400
24 in std::_Bind<void (bs::CommandQueueBase::*(bs::CommandQueueBase*, std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*))(std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*)>::operator()<, void>() of /usr/include/c++/8/functional:484
25 in std::_Function_handler<void (), std::_Bind<void (bs::CommandQueueBase::*(bs::CommandQueueBase*, std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*))(std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*)> >::_M_invoke(std::_Any_data const&) of /usr/include/c++/8/bits/std_function.h:297
26 in std::function<void ()>::operator()() const of /usr/include/c++/8/bits/std_function.h:687
27 in bs::CommandQueueBase::playbackWithNotify(std::queue<bs::QueuedCommand, std::deque<bs::QueuedCommand, bs::StdAlloc<bs::QueuedCommand, bs::GenAlloc> > >*, std::function<void (unsigned int)>) of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Foundation/bsfCore/CoreThread/BsCommandQueue.cpp:124
28 in bs::CoreThread::runCoreThread of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Foundation/bsfCore/CoreThread/BsCoreThread.cpp:117
29 in std::__invoke_impl<void, void (bs::CoreThread::*&)(), bs::CoreThread*&> of /usr/include/c++/8/bits/invoke.h:73
30 in std::__invoke<void (bs::CoreThread::*&)(), bs::CoreThread*&> of /usr/include/c++/8/bits/invoke.h:95
31 in std::_Bind<void (bs::CoreThread::*(bs::CoreThread*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) of /usr/include/c++/8/functional:400
32 in std::_Bind<void (bs::CoreThread::*(bs::CoreThread*))()>::operator()<, void>() of /usr/include/c++/8/functional:484
33 in std::_Function_handler<void (), std::_Bind<void (bs::CoreThread::*(bs::CoreThread*))()> >::_M_invoke(std::_Any_data const&) of /usr/include/c++/8/bits/std_function.h:297
34 in std::function<void ()>::operator()() const of /usr/include/c++/8/bits/std_function.h:687
35 in bs::PooledThread::run of /home/hhyyrylainen/Projects/bsfExamples/bsf/Source/Foundation/bsfUtility/Threading/BsThreadPool.cpp:122
36 in std::__invoke_impl<void, void (bs::PooledThread::*&)(), bs::PooledThread*&> of /usr/include/c++/8/bits/invoke.h:73
37 in std::__invoke<void (bs::PooledThread::*&)(), bs::PooledThread*&> of /usr/include/c++/8/bits/invoke.h:95
38 in std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) of /usr/include/c++/8/functional:400
39 in std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()>::operator()<, void>() of /usr/include/c++/8/functional:484
40 in std::__invoke_impl<void, std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()>>(std::__invoke_other, std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()>&&) of /usr/include/c++/8/bits/invoke.h:60
41 in std::__invoke<std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()>>(std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()>&&) of /usr/include/c++/8/bits/invoke.h:95
42 in std::thread::_Invoker<std::tuple<std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()> > >::_M_invoke<0ul>(std::_Index_tuple<0ul>) of /usr/include/c++/8/thread:244
43 in std::thread::_Invoker<std::tuple<std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()> > >::operator()() of /usr/include/c++/8/thread:253
44 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<std::_Bind<void (bs::PooledThread::*(bs::PooledThread*))()> > > >::_M_run() of /usr/include/c++/8/thread:196
45 in ?? of /lib64/libstdc++.so.6
46 in start_thread of /lib64/libpthread.so.0
47 in clone of /lib64/libc.so.6
This is on Linux with OpenGL and Vulkan (there's a slightly different crash there, but I don't have a callstack on hand for it right now).
There might be an additional crash lurking somewhere, but I can't try to locate it (see the thread I linked) because this crash always happens.
type: bug