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

Problem with this line get_tree().change_scene_to_file("res://Path") in Godot 4.2 #84681

Open
tlloancy opened this issue Nov 9, 2023 · 6 comments

Comments

@tlloancy
Copy link

tlloancy commented Nov 9, 2023

Godot version

4.2 beta 5

System information

windows 10

Issue description

on this line get_tree().change_scene_to_file("res://Client/Client.tscn") i get this error

E 0:00:01:0809   Main.gd:5 @ _ready(): Parent node is busy adding/removing children, `remove_child()` can't be called at this time. Consider using `remove_child.call_deferred(child)` instead.
  <Erreur C++>   Condition "data.blocked > 0" is true.
  <Source C++>   scene/main/node.cpp:1436 @ remove_child()
  <Pile des appels>Main.gd:5 @ _ready()

Also on 4.1 when i go back to this scene i made :

queue_free()
get_tree().change_scene_to_file("res://Client/Client.tscn")

this doesn't work anymore, this loads nothing
[edit] no crash logs, just empty window left

Steps to reproduce

launch godot 4.2 beta with an app than contains this line get_tree().change_scene_to_file("res://Client/Client.tscn")

Minimal reproduction project

N/A

@tlloancy
Copy link
Author

Is there a new way to change the scene ?

@tlloancy
Copy link
Author

still nothing with 4.2 rc 1

@SuitedRioter
Copy link

I also have the same problem。

@tlloancy
Copy link
Author

tlloancy commented Mar 21, 2024

Hi ! Anything new ?

Get this errors when quit with Ctrl -c ERROR: BUG: Unreferenced static string to 0: Physics2DConstraintSolveIslands at: unref (core/string/string_name.cpp:127) ERROR: BUG: Unreferenced static string to 0: Physics2DConstraintSetup at: unref (core/string/string_name.cpp:127) ERROR: BUG: Unreferenced static string to 0: @export at: unref (core/string/string_name.cpp:129) ERROR: BUG: Unreferenced static string to 0: @export_multiline at: unref (core/string/string_name.cpp:129) ERROR: BUG: Unreferenced static string to 0: @export_range at: unref (core/string/string_name.cpp:129) ERROR: BUG: Unreferenced static string to 0: @warning_ignore at: unref (core/string/string_name.cpp:129) ERROR: BUG: Unreferenced static string to 0: @icon at: unref (core/string/string_name.cpp:129) ERROR: BUG: Unreferenced static string to 0: Variant at: unref (core/string/string_name.cpp:127) ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE at: ~PagedAllocator (./core/templates/paged_allocator.h:170)

@TheArchitect4855
Copy link

TheArchitect4855 commented Apr 4, 2024

Hi all.

Just came to say this is happening to me in 4.2 stable 😛

I'm not sure if it's causing an actual problem (scenes are still loading, I think), but I'm investigating other issues and I'm not sure if it's related.

#85643 seems to be related, as well.

@tlloancy
Copy link
Author

at the moment i am using some workarounds get_tree().reload_current_scene() but not sure this is enough for all cases actually

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

4 participants