-
-
Notifications
You must be signed in to change notification settings - Fork 23.9k
Open
Description
Tested versions
4.4-based, but looking at the code, the issue is present in 4.5 and master
System information
iOS
Issue description
Crash submitted via telemetry:
Crashed: Godot Thread [instance #1]
0 Xogot 0x624d3cc BitMap::get_size() const + 153 (bit_map.cpp:153)
1 Xogot 0x41f628c EditorBitmapPreviewPlugin::generate(Ref<Resource> const&, Vector2 const&, Dictionary&) const + 241 (editor_preview_plugins.cpp:241)
2 Xogot 0x32e2c00 EditorResourcePreviewGenerator::generate_from_path(String const&, Vector2 const&, Dictionary&) const + 186 (ref_counted.h:186)
3 Xogot 0x32e6998 EditorResourcePreview::_generate_preview(Ref<ImageTexture>&, Ref<ImageTexture>&, EditorResourcePreview::QueueItem const&, String const&, Dictionary&) + 63 (ref_counted.h:63)
4 Xogot 0x32e8360 EditorResourcePreview::_iterate() + 268 (cowdata.h:268)
5 Xogot 0x32e5b54 EditorResourcePreview::_thread() + 349 (cxx_atomic_impl.h:349)
6 Xogot 0x7a15908 Thread::callback(unsigned long long, Thread::Settings const&, void (*)(void*), void*, std::__1::shared_ptr<InstanceMemoryObject> const&) + 4503853320
7 Xogot 0x7a16c0c void* std::__1::__thread_proxy[abi:nn180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(unsigned long long, Thread::Settings const&, void (*)(void*), void*, std::__1::shared_ptr<InstanceMemoryObject> const&), unsigned long long, Thread::Settings, void (*)(void*), void*, std::__1::shared_ptr<InstanceMemoryObject>>>(void*) + 4503858188
8 libsystem_pthread.dylib 0x444c _pthread_start + 136
9 libsystem_pthread.dylib 0x8cc thread_start + 8
The code in question, this is master:
Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const Ref<Resource> &p_from, const Size2 &p_size, Dictionary &p_metadata) const {
Ref<BitMap> bm = p_from;
if (bm->get_size() == Size2()) {
return Ref<Texture2D>();
}
This does not follow the idioms of other ::generate methods in the same file.
Steps to reproduce
Happens in the wild, no idea.
Minimal reproduction project (MRP)
Same