godotengine / godotengine/godot

Engine crash when disabling `own_world_3d` with nested viewports

Open
#102,016 14 comments 1 reaction 0 assignees View on GitHub
bug crash topic:3d
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.3.stable.mono.custom_build [77dcf97d8]
v4.2.2.stable.mono.official [15073afe3]

### System information

Windows 10

### Issue description

The engine (game and editor) crashes if you turn off `own_world_3d` for `SubViewport` with child `SubViewport`s.

### Steps to reproduce

* Create a scene with nested `SubViewport`s
* Activate `own_world_3d` for the first viewport
* The following child viewports do not update the World3D automatically, so:
* - Save and reload the project/scene
* - Or turn on and off `own_world_3d` for nested viewports.
* Disable `own_world_3d` for the first viewport

https://github.com/user-attachments/assets/4d9229ff-0362-4fc9-9d18-c57a03d8a32a

### Minimal reproduction project (MRP)

[test.zip](https://github.com/user-attachments/files/18545670/test.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.