Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Video attached) When resizing screen with ScrollContainer and ScrollContainer transitions from scrollable to non-scrollable game crashes #81878

Open
MCDever opened this issue Sep 18, 2023 · 3 comments

Comments

@MCDever
Copy link

MCDever commented Sep 18, 2023

Godot version

4.1.1.stable.mono

System information

Godot v4.1.1.stable.mono - Windows 10.0.22000 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.3713) - Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz (8 Threads)

Issue description

2023-09-18.14-21-05.mp4

When i resize the screen of my game and i make the screen big enough for the screen to not need a scroll list anymore it crashes, this happens in the oppisite context aswell where the game boots without the need for a scroll list but if i make it smaller to the point where it needs a scroll list it crashes.

Steps to reproduce

Resize screen to the point where it doesnt need a scroll list.

Minimal reproduction project

Stranded - Copy.zip

@bitsawer
Copy link
Member

The attached MRP project seems to be very incomplete and gives a lot of erros when opened, including missing main scene "res://Scenes/Test.tscn" which makes testing it impossible. Can you double check the project you uploaded?

@bitsawer
Copy link
Member

bitsawer commented Sep 19, 2023

I managed to tinker the project enough to repro this bug, fixed project:

mrp-Stranded-fixed.zip

Looks like Godot enters some kind of infinite drawing/update loop, when breaking in debugger the stack looks usually something like this with some changes after CanvasItem::_redraw_callback(). Seems to have something to with Windows WM_TIMER messages we use to call Main::iteration() during resize. Removing that call prevents the hang, but naturally stops updating controls during the resize, too. Might be a Windows specific issue.

CowData<RenderingDeviceVulkan::StagingBufferBlock>::get(int) const (e:\Repositories\godot\core\templates\cowdata.h:155)
Vector<RenderingDeviceVulkan::StagingBufferBlock>::operator[](int) const (e:\Repositories\godot\core\templates\vector.h:96)
RenderingDeviceVulkan::_buffer_update(RenderingDeviceVulkan::Buffer*, unsigned long long, unsigned char const*, unsigned long long, bool, unsigned int) (e:\Repositories\godot\drivers\vulkan\rendering_device_vulkan.cpp:1582)
RenderingDeviceVulkan::index_buffer_create(unsigned int, RenderingDevice::IndexBufferFormat, Vector<unsigned char> const&, bool) (e:\Repositories\godot\drivers\vulkan\rendering_device_vulkan.cpp:4570)
RendererCanvasRenderRD::request_polygon(Vector<int> const&, Vector<Vector2> const&, Vector<Color> const&, Vector<Vector2> const&, Vector<int> const&, Vector<float> const&) (e:\Repositories\godot\servers\rendering\renderer_rd\renderer_canvas_render_rd.cpp:317)
RendererCanvasRender::Polygon::create(Vector<int> const&, Vector<Vector2> const&, Vector<Color> const&, Vector<Vector2> const&, Vector<int> const&, Vector<float> const&) (e:\Repositories\godot\servers\rendering\renderer_canvas_render.h:148)
RendererCanvasCull::canvas_item_add_triangle_array(RID, Vector<int> const&, Vector<Vector2> const&, Vector<Color> const&, Vector<Vector2> const&, Vector<int> const&, Vector<float> const&, RID, int) (e:\Repositories\godot\servers\rendering\renderer_canvas_cull.cpp:1405)
RenderingServerDefault::canvas_item_add_triangle_array(RID, Vector<int> const&, Vector<Vector2> const&, Vector<Color> const&, Vector<Vector2> const&, Vector<int> const&, Vector<float> const&, RID, int) (e:\Repositories\godot\servers\rendering\rendering_server_default.h:869)
StyleBoxFlat::draw(RID, Rect2 const&) const (e:\Repositories\godot\scene\resources\style_box_flat.cpp:548)
Slider::_notification(int) (e:\Repositories\godot\scene\gui\slider.cpp:287)
Slider::_notificationv(int, bool) (e:\Repositories\godot\scene\gui\slider.h:37)
HSlider::_notificationv(int, bool) (e:\Repositories\godot\scene\gui\slider.h:99)
Object::notification(int, bool) (e:\Repositories\godot\core\object\object.cpp:828)
CanvasItem::_redraw_callback() (e:\Repositories\godot\scene\main\canvas_item.cpp:140)
void call_with_variant_args_helper<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (e:\Repositories\godot\core\variant\binder_common.h:303)
void call_with_variant_args<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, int, Callable::CallError&) (e:\Repositories\godot\core\variant\binder_common.h:417)
CallableCustomMethodPointer<CanvasItem>::call(Variant const**, int, Variant&, Callable::CallError&) const (e:\Repositories\godot\core\object\callable_method_pointer.h:104)
Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (e:\Repositories\godot\core\variant\callable.cpp:50)
CallQueue::_call_function(Callable const&, Variant const*, int, bool) (e:\Repositories\godot\core\object\message_queue.cpp:219)
CallQueue::flush() (e:\Repositories\godot\core\object\message_queue.cpp:324)
SceneTree::physics_process(double) (e:\Repositories\godot\scene\main\scene_tree.cpp:471)
Main::iteration() (e:\Repositories\godot\main\main.cpp:3468)
DisplayServerWindows::WndProc(HWND__*, unsigned int, unsigned long long, long long) (e:\Repositories\godot\platform\windows\display_server_windows.cpp:3704)
WndProc(HWND__*, unsigned int, unsigned long long, long long) (e:\Repositories\godot\platform\windows\display_server_windows.cpp:3915)
CallWindowProcW (@CallWindowProcW:232)
CallWindowProcW (@CallWindowProcW:39)
glPushClientAttrib (@glPushClientAttrib:28449)
CallWindowProcW (@CallWindowProcW:232)
DispatchMessageW (@DispatchMessageW:223)
SendMessageTimeoutW (@SendMessageTimeoutW:90)
KiUserCallbackDispatcher (@KiUserCallbackDispatcher:10)
NtUserMessageCall (@NtUserMessageCall:8)
GetWindowTextW (@GetWindowTextW:504)
IsIconic (@IsIconic:68)
GetUserColorPreference (@GetUserColorPreference:1396)
171B07162 (@:455)
IsCompositionActive (@IsCompositionActive:2320)
IsCompositionActive (@IsCompositionActive:1991)
GetWindowTextW (@GetWindowTextW:298)
DisplayServerWindows::WndProc(HWND__*, unsigned int, unsigned long long, long long) (e:\Repositories\godot\platform\windows\display_server_windows.cpp:3909)
WndProc(HWND__*, unsigned int, unsigned long long, long long) (e:\Repositories\godot\platform\windows\display_server_windows.cpp:3915)
CallWindowProcW (@CallWindowProcW:232)
CallWindowProcW (@CallWindowProcW:39)
glPushClientAttrib (@glPushClientAttrib:28449)
CallWindowProcW (@CallWindowProcW:232)
DispatchMessageW (@DispatchMessageW:223)
SendMessageTimeoutW (@SendMessageTimeoutW:90)
KiUserCallbackDispatcher (@KiUserCallbackDispatcher:10)
NtUserMessageCall (@NtUserMessageCall:8)
GetWindowTextW (@GetWindowTextW:504)
IsIconic (@IsIconic:68)
GetUserColorPreference (@GetUserColorPreference:1396)
171B070B7 (@:389)
IsCompositionActive (@IsCompositionActive:2320)
IsCompositionActive (@IsCompositionActive:1991)
GetWindowTextW (@GetWindowTextW:298)
DisplayServerWindows::WndProc(HWND__*, unsigned int, unsigned long long, long long) (e:\Repositories\godot\platform\windows\display_server_windows.cpp:3909)
WndProc(HWND__*, unsigned int, unsigned long long, long long) (e:\Repositories\godot\platform\windows\display_server_windows.cpp:3915)
CallWindowProcW (@CallWindowProcW:232)
CallWindowProcW (@CallWindowProcW:39)
glPushClientAttrib (@glPushClientAttrib:28449)
CallWindowProcW (@CallWindowProcW:232)
DispatchMessageW (@DispatchMessageW:146)
DisplayServerWindows::process_events() (e:\Repositories\godot\platform\windows\display_server_windows.cpp:2296)
OS_Windows::run() (e:\Repositories\godot\platform\windows\os_windows.cpp:1473)
widechar_main(int, wchar_t**) (e:\Repositories\godot\platform\windows\godot_windows.cpp:180)
_main() (e:\Repositories\godot\platform\windows\godot_windows.cpp:204)
main (e:\Repositories\godot\platform\windows\godot_windows.cpp:223)
__tmainCRTStartup (@__tmainCRTStartup:108)
WinMainCRTStartup (@.l_startw:6)
BaseThreadInitThunk (@BaseThreadInitThunk:9)
RtlUserThreadStart (@RtlUserThreadStart:12)

@Rindbee
Copy link
Contributor

Rindbee commented Sep 19, 2023

This bug appears when scroll_mode is auto. Similar to #75713.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants