Godot Version
4.3
Question
Trying to open latest version, but tested with a few versions of Godot 4 and Godot 3:
Godot splash screen displays, but the editor crashes before arriving at the project manager.
No logs in %appdata folder, nothing in command prompt when launching through command prompt.
In Event Viewer, I get this error:
Faulting application name: Godot_v4.3-stable_win64.exe, version: 4.3.0.0, time stamp: 0x66bd392d
Faulting module name: d3d11.dll,
I’ve reinstalled Nvidia drivers (discrete 4060) and AMD drivers (integrated radeon 890m)
I’ve reinstalled direct X, and tried forcing openGL 2 in command prompt.
Nothing works so far.
Anybody seen this before or have any ideas?
Thanks much!
That sounds like one of those infuriating problems that is incredibly hard to solve. I can assure you Godot works fine on windows 11.
As for your issue, and I am only guessing, have you tried deleting all the caches especially shader caches.
Finally there is a —safe-mode implemented in the command line I think, although I have never used it. Might be worth a try. I could not find it in the docs, but it is raised here:
opened 01:03AM - 21 Apr 21 UTC
topic:editor
topic:plugin
<!--
Please fill in *all* the questions below and don't remove any of them.
Pr… oposals not following the template below will be closed immediately.
-->
### Describe the project you are working on
plugins
### Describe the problem or limitation you are having in your project
Then creating plugins sometimes I have a plugin that crashes the editor on startup, so I need to disable it, and the only way I can do this is to open the `project.godot` and manually remove plugin from there. This is not convinient.
### Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would be useful to be able to open a project in "safe mode" - with all plugins disabled.
When I open it, I could find the problem, and then enable the plugin again.
### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
In Project Manager, we could have an option to open any project in "safe mode", when clicking on it the project opens with all plugins disabled.
Also `--safe-mode` command line argument could be useful.
### If this enhancement will not be used often, can it be worked around with a few lines of script?
If you have the problem above, you need to manually disable plugins in
`project.godot` which is no so handy.
### Is there a reason why this should be core and not an add-on in the asset library?
I don't think this can be solved properly using plugins because it's plugin related.
And implemented here:
godotengine:master
← rsubtil:feature-oopsie_woopsie
opened 06:14PM - 30 May 24 UTC
Implements https://github.com/godotengine/godot-proposals/issues/2628
> [!not… e]
> This description is updated whenever any significant changes are made, and should always reflect the current state of this PR
## Overview
This adds a new special "Safe Mode" that, as described, disables some engine features that can make a project fail to launch during startup. When this mode is launched, the following features are completely disabled:
- Tool scripts (GDScript and C#)
- Editor plugins
- GDExtension addons
- Scene restoring
This is displayed to the user as soon as the project is opened in this mode, through both a popup, and a notification:
![image](https://github.com/godotengine/godot/assets/6501975/15444e6b-ac53-4e31-afe0-289d41b058dd)
![image](https://github.com/godotengine/godot/assets/6501975/40020fbc-02fd-4031-b1a0-db27098d23cb)
Because some of these features may be necessary for a project to work properly, this mode may put the project in an unusable/unworkable state. Since this is a temporary mode meant to allow only for some basic troubleshooting, a few other changes were done as well to reflect this:
- All launching functionality is disabled, with the run bar modified to reflect it
![image](https://github.com/godotengine/godot/assets/6501975/b9e9f9df-0d81-43c5-9ee3-5028d34e30fa)
- The asset library is disabled, since it's pointless to use during this mode
![image](https://github.com/godotengine/godot/assets/6501975/fdd0b1e7-91b9-415e-a524-032bb2e733f5)
- Tool scripts are displayed differently to clarify that they're not being run during this mode
![image](https://github.com/godotengine/godot/assets/6501975/6e81ba6a-b853-483c-9d38-a854330ef97d)
- The plugin configuration panel has a warning to clarify plugins do not run during this mode
![image](https://github.com/godotengine/godot/assets/6501975/eac10899-a28f-4afd-86fd-989434cf4db2)
## Usage
### Automatic detection
When launching a project, Godot creates a lock file at `user://.safe_mode_lock`. This file persists during the engine initialization, and is removed when the editor starts scanning the project files, after one second.
If any crash/hang happens during initialization, this file is not removed. So, if this file exists the next time Godot attempts to open the project, then the engine knows the project failed to open last time, thus prompting the user to open it in this mode.
### CLI
This mode can be manually triggered by opening a project with the new `--safe-mode` flag:
```
$ godot -e -path <...> --safe-mode
```
```
$ godot --help
Godot Engine v4.3.beta.mono.custom_build.865a09e0c (2024-05-27 18:48:52 UTC) - https://godotengine.org
...
Run options:
...
--safe-mode E Start the editor in safe mode, which disables typical features that can cause startup crashes, such as tool scripts, editor plugins, GDExtension addons, and others.
...
```
### UI
When a project is opened, the project manager searches for any existing lock file; if that's the case, it opens a popup to suggest using this mode. It explains what this mode does and its intended usage.
![image](https://github.com/user-attachments/assets/e5b80d86-6572-4fb5-8e6d-bc3292f59aa3)
It is also possible to use this mode manually from the new options button next to the Edit button:
![image](https://github.com/user-attachments/assets/1e8ac0ec-7911-4fc4-818e-41971bfb7186)
## Test projects
To test this functionality, I've made a test suite of projects that crash the engine on initialization with typical user scenarios:
- **GDScript tool script:** - Project with a bad tool script, which is attached to a node on the main scene.
- **C# tool script:** - Same as above, but with a C# script, which requires rebuilding the project when the script is changed.
- **Editor plugin:** - Project with a bad editor plugin, which internally has bad GDScript code.
- **GDExtension addon:** - Project with an external error in the GDExtension addon.
All of these test cases fail to open on a normal Godot session and require manual intervention to be recovered. But under safe mode, every test **must** open successfully.
| | GDScript tool script | C# tool script | Editor plugin | GDExtension addon |
|---|---|---|---|---|
| Crash |[tool_gdscript_crash.zip](https://github.com/godotengine/godot/files/15503597/tool_gdscript_crash.zip) |[tool_csharp_crash.zip](https://github.com/godotengine/godot/files/15503595/tool_csharp_crash.zip) |[plugin_crash.zip](https://github.com/godotengine/godot/files/15503593/plugin_crash.zip) |[gdextension_crash.zip](https://github.com/godotengine/godot/files/15503591/gdextension_crash.zip) |
| Hang |[tool_gdscript_hang.zip](https://github.com/godotengine/godot/files/15503599/tool_gdscript_hang.zip) |[tool_csharp_hang.zip](https://github.com/godotengine/godot/files/15503596/tool_csharp_hang.zip) |[plugin_hang.zip](https://github.com/godotengine/godot/files/15503594/plugin_hang.zip) |[gdextension_hang.zip](https://github.com/godotengine/godot/files/15503592/gdextension_hang.zip) |
- **Crash:** This project has some bad code that immediately crashes the engine when opened.
- **Hang:** This project has some bad code that loops infinitely, which hangs the engine and leaves it frozen until forcibly closed.
## Future work
This is a basic implementation so far, and the usefulness of this mode should be improved with other additional features:
- ~~An automatic mechanism to detect failing scenarios and automatically prompt users to enable this mode, as described in https://github.com/godotengine/godot-proposals/issues/2628~~ (edit: implemented in this PR too)
- Being able to open/edit scenes when some dependencies are missing, since these can originate from temporarily disabled editor/GDExtension plugins.
- Adding other problematic features for safe mode that I didn't cover (e.g. importing assets)
Anyway, sorry if that is not much help.
Good luck,
Paul
Thanks for the response! I’ll give safe mode a try.
Yes I am now thinking this is not a godot issue but a driver issue on my end - thought I have no issues running Unity or other direct x games.
This is a fresh windows install too - baffling indeed.
1 Like