-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
ScrollContainer crash: Adding TextureRect grandchildren to a ScrollContainer (via BoxContainer child) causes editor or game to crash. #75713
Comments
The following message is printed before crashing.
crash log
After increasing the default value of crash log
|
This is probably because the automatic display of the scrollbars causes the calculation result of This causes Lines 1620 to 1622 in 132000f
Line 1576 in 132000f
Probably due to using a non-default |
Might be related to #73071 if so. |
Similar to it. Some containers' functions depend on the There should be no problem with using one alone, and users should avoid using both at the same time, which can be explained in the documentation. |
@Rindbee You mention "users should avoid using both at the same time." Can you elaborate on this, I guess I'm confused on both of what? Until the bug is fixed, do you have any suggestions for implementing the behavior I was looking for (a scrollable list of icons?) I could simply set the scrollbar to always show, but it looks a bit ugly then. |
So this is actually an infinite circular dependency. The
A temporary workaround is to adjust the |
Thank you! I didn't realize that there were safe values, I just assumed that this bug would occur regardless. In the example project, I guess that's why adding the separator theme override fixes the issue (and why adding the margin container breaks it again) |
Also happens in 4.2.2. The engine crashes when resizing the scroll container or adding children to the hbox that would overflow it, unless the scrollbar is set to always show. The error is either "Failed method: CanvasItem::_redraw_callback" or "Failed method: CanvasItem::_update_minimum_size" Error-1.mp4 |
Godot version
4.0.2.stable.official.7a0977ce2
System information
Ubuntu 22.04, Nvidia RTX 2060, Forward+
Issue description
The following tree hierarchy should produce a scrollable list of icons:
Instead, the editor crashes when enough TextureRects are added to cause the ScrollBoxContainer's scrollbar to appear. If children are added programmatically, the game will crash.
This issue will occur:
This issue will not occur:
Steps to reproduce
Use the minimal reproduction project uploaded below.
The folder "examples_that_crash" contains scenes that crash. The folder "examples_that_work" contains scenes that do not crash, and work as expected.
Minimal reproduction project
ScrollContainerCrash.zip
The text was updated successfully, but these errors were encountered: