Skip to content

Godot built from the master branch crashes when pressing enter on the project manager screen #101555

@Klemmbaustein

Description

@Klemmbaustein

Tested versions

This happens when building the engine from the master branch, and recent builds of other PRs (for example: #101552)
4.3 and 4.4-dev7 do not crash like this.

System information

Godot v4.4.beta (4ce466d) - Windows 10 (build 19045) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 32.0.15.6636) - AMD Ryzen 9 5950X 16-Core Processor (32 threads)

Issue description

The engine crashes with the following error message when pressing enter on the project manager screen if no project is selected:

ERROR: FATAL: Index p_index = 0 is out of bounds (size() = 0).
   at: CowData<struct ProjectList::Item>::get (.\core/templates/cowdata.h:219)

I've looked into this for myself, and it looks like It's crashing because it's trying to open the currently selected project, but it doesn't check if there are no selected projects.

Image
(editor/project_manager.cpp line 1052)

Image
(editor/project_manager.cpp line 615)

From my testing, adding a check to verify that project_list->get_selected_projects() returns at least one project fixes this crash and works fine. I have no idea why this is only happening in very new versions of the engine though, this code for this hasn't changed for months (EDIT: I misread dates in the git blame, it looks like #92563 caused this). Maybe something in the input code is not marking that input as handled properly, so it's treated as a shortcut incorrectly?

Steps to reproduce

Press enter on the project manager screen if no project is selected.

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Release Blocker

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions