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

Godot crashes after starting to paint mesh then pressing Escape and selecting anything in scene #449

Closed
Radivarig opened this issue Aug 9, 2024 · 5 comments
Assignees
Labels
not a bug Not a bug waiting for godot Bug or missing feature in the engine
Milestone

Comments

@Radivarig
Copy link

Terrain3D version

8a45d61

System information

Godot Engine v4.3.rc3.official.03afb92ef - Windows 11 Home - Vulkan 1.3.278 - Forward+ - NVIDIA GeForce RTX 2070 with Max-Q Design

Is the issue reproducable in the demo?

Yes

Issue description

Tested on:

  • Terrain3D
  • Godot
    • 4.3-rc2
    • 4.3-rc3

To reproduce:

  • Create a terrain and select it
  • Go into the Terrain3D tab > Meshes
  • With the red circle decal showing in the viewport press Escape
    • This will throw few errors because during the ui.gd:264 await get_tree().create_timer(.05).timeout the editor.gd:118 _clear function is called which makes the plugin.terrain become null (for which the check was done before the await)

After this trying to select anything in the scene with the blue selection rectangle will crash Godot on mouse release.

However, if the terrain node is selected and then deseleted in the hierarchy, there is no crash.

By searching for get_deepest_editable_node I found this issue but the fix for that was merged into Godot in 4.3-rc2 commits

Fix crash when drawing a selection box on an empty scene with certain plugins
@TokisanGames TokisanGames committed on Jun 20 1780f2840765358b52d8f9bd28a488fd3ef89842

Logs

SCRIPT ERROR: Invalid call. Nonexistent function 'get_camera' in base 'Nil'.
    at: update_decal (res://addons/terrain_3d/src/ui.gd:269)
SCRIPT ERROR: Invalid call. Nonexistent function 'get_camera' in base 'Nil'.
    at: update_decal (res://addons/terrain_3d/src/ui.gd:269)
SCRIPT ERROR: Invalid call. Nonexistent function 'get_camera' in base 'Nil'.
    at: update_decal (res://addons/terrain_3d/src/ui.gd:269)
ERROR: Condition "!is_ancestor_of(p_start_node)" is true. Returning: p_start_node
    at: get_deepest_editable_node (scene/main/node.cpp:2525)
WARNING: Terrain3D#3844:_notification: NOTIFICATION_CRASH
    at: push_warning (core/variant/variant_utility.cpp:1112)

================================================================
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] error(-1): no debug info in PE/COFF executable
...
[26] error(-1): no debug info in PE/COFF executable
-- END OF BACKTRACE --
================================================================
@TokisanGames
Copy link
Owner

TokisanGames commented Aug 9, 2024

Thanks for the detailed report. As you noted that other bug was fixed. Good to know you tested with that fix merged. #395

Does the crash occur in the demo in 4.2.2?

The script errors wouldn't cause the crash. The crash is caused by calling a null object in C++ somewhere.

Also I didn't think get_camera was called in UI. The same functionality on that line is duplicated in editor.cpp. So there's at least a few issues going on here.

https://github.com/TokisanGames/Terrain3D/blob/main/project/addons/terrain_3d/src/ui.gd#L268-L273

@TokisanGames TokisanGames self-assigned this Aug 9, 2024
@TokisanGames TokisanGames added the bug Something isn't working label Aug 9, 2024
@TokisanGames TokisanGames moved this to 0.9.3 in Terrain3D Roadmap Aug 9, 2024
@TokisanGames TokisanGames added this to the Beta 0.9.x milestone Aug 9, 2024
@Radivarig
Copy link
Author

On 4.2.2 there is no crash, although the same error appears when pressing Escape

ERROR: Condition "!is_ancestor_of(p_start_node)" is true. Returning: p_start_node
   at: get_deepest_editable_node (scene/main/node.cpp:2350)

@TokisanGames
Copy link
Owner

Upstream bug report
godotengine/godot#95356

@TokisanGames TokisanGames added waiting for godot Bug or missing feature in the engine not a bug Not a bug and removed bug Something isn't working labels Aug 12, 2024
@TokisanGames
Copy link
Owner

Upstream crash and error message fix godotengine/godot#95420

@TokisanGames TokisanGames moved this from 0.9.3 to Future Ideas in Terrain3D Roadmap Aug 12, 2024
@TokisanGames
Copy link
Owner

Fixed upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Not a bug waiting for godot Bug or missing feature in the engine
Projects
None yet
Development

No branches or pull requests

2 participants