godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.12k stars 21.18k forks source link

When Engine crashes, some project data is not persistent #47380

Open avnerh1 opened 3 years ago

avnerh1 commented 3 years ago

Godot version: 3.2.3.stable.mono.official

OS/device including version: Win10, GeForce GTX 1050/PCIe/SSE2, GLES3

Issue description: When Godot crashes, if the project is open in another editor, then after opening the crashed editor anew, the following happens:

Steps to reproduce:

  1. Start Godot editor (referred as Window 1) and load your project
  2. Start another Godot editor (referred as Window 2) and load your project
  3. From now on, don't touch Window 2
  4. In Window 1, make changes to scenes and project settings, and set up version control
  5. Keep working until Window 1 crashes
  6. Start Window 1 again and load your project
  7. Observe: scenes and project settings are reverted to their state in Window 2 (but not gdscript file), and version control is closed

Minimal reproduction project: Any project, and two instances of Godot editor running

Calinou commented 3 years ago

While editing different projects at the same time is fine, I don't think editing the same project with multiple editor instances is a supported use case. I'd expect things to break when doing so. We could warn the user when opening the same project with multiple editor instances.

Also, 3.3 will likely behave better in this regard thanks to https://github.com/godotengine/godot/pull/31747. Can you test this with 3.3rc6?

avnerh1 commented 3 years ago

It's the only reasonable flow I could think of for testing multiplayer games while developing them, as I need two running instances of the game. I'll try 3.3rc6.

Calinou commented 3 years ago

It's the only reasonable flow I could think of for testing multiplayer games while developing them, as I need two running instances of the game.

It's recommended to start one of the instances using the command line instead. This can be either the client or server, although starting the server from the command line usually makes more sense.

You can add command-line arguments to automatically start a client or server to speed up debugging: https://github.com/Calinou/platshoot/blob/4e71e8e4f9fec56b9db4bb7b87ca3bbe8340a28e/data/scenes/menu/menu.gd#L15-L32

avnerh1 commented 3 years ago

That's a good idea. Thanks!