Go to file
Max Hilbrunner be6712fb3d
Fix Windows platform file access
This restores Windows platform file handling back to open files non-exlusively by default, as was the case before October 2018. (See b902a2f2a7)
Back then, while fixing warnings for MSVC, the function used for opening files was changed from _wfopen() to _wfopen_s() as suggsted by the warning C4996. ("This function may be unsafe, consider using _wfopen_s instead.")

This new function
1. did parameter validation and thus avoided some possible security issues due to nil pointers or wrongly terminated strings
2. it also changed the default file sharing for opened files from _SH_DENYNO (which was the implicit default for the previous _wfopen()) to _SH_SECURE.

_SH_DENYNO means every opened file could be opened by other calls (like is the default on other operating systems).
_SH_SECURE means if the file is opened with READ access, others can still read the same file, but if it is opened with WRITE access, others can't open it at all, not even to read.

This led to rarely occuring bugs on Windows, i.e. due to random access by Antivirus processes, or Godot/Windows not closing a file handle fast enough while trying to open it again elsewhere (i.e. project.godot, instead showing the Project manager, or saving shaders/debugging the game).

What this PR does it change the file access to a third method, _wfsopen(). This is still secure, doing parameter validation and thus avoids the warning, but it allows us to actually SET the file sharing parameter. And we set it to _SH_DENYNO, as it was implicitely before the change. (And as it currently is on all non-Windows platforms, where file sharing restrictions don't exist by default.)

Warning C4996 should really have been pointing this out. It should've been _wfsopen() all along. Let's hope this banishes those annoying, rare errors for all eternity.

Fixes #28036.

(cherry picked from commit b48cbb5da9)
2021-08-13 10:37:26 +02:00
.github Don't install Android NDK in CI 2021-06-07 22:52:35 +02:00
core [Net] Fix IP address resolution incorrectly locking the main thread. 2021-08-03 15:39:48 +02:00
doc Fix Unicode URL link tags to render correctly. 2021-08-13 10:36:58 +02:00
drivers Fix Windows platform file access 2021-08-13 10:37:26 +02:00
editor Make property description in the animation editor actually show it 2021-08-13 10:36:58 +02:00
main Sync controller mappings DB with SDL2 community repo 2021-07-20 13:37:57 +02:00
misc Add script to make source tarball with .git/HEAD 2021-08-03 09:29:10 +02:00
modules Fix LSP parsing get_node only from the scene root 2021-08-13 10:36:57 +02:00
platform [iOS] Use platform generated api to initialize iOS plugins 2021-08-13 10:36:58 +02:00
scene TileMap Fix trying to get data for tile not existing in attached TileSet 2021-08-13 10:36:57 +02:00
servers Fix Godot's cubic resampling algorithm 2021-08-13 10:27:52 +02:00
thirdparty mbedtls: Update to upstream version 2.16.11 2021-07-20 13:05:55 +02:00
.clang-format clang-format: Add JavaImportGroups for Java code 2020-05-07 13:36:27 +02:00
.editorconfig Use space indentation for all YAML files in .editorconfig 2021-02-22 10:15:50 +01:00
.gitattributes Git: Explicitly list binary files as such to avoid EOL change 2019-05-25 10:43:48 +02:00
.gitignore gitignore: Ignore Kate swap files 2021-02-02 13:02:45 +01:00
.mailmap Update AUTHORS and DONORS list 2021-05-14 13:19:16 +02:00
AUTHORS.md Update AUTHORS and DONORS list 2021-07-13 13:17:08 +02:00
CHANGELOG.md Update changelog for 3.3.2-stable 2021-05-24 13:39:13 +02:00
compat.py SCons: Fix python2 compatibility after #37198 and #37248 2020-06-11 20:15:48 +02:00
CONTRIBUTING.md Link to Godot Contributors Chat instead of IRC 2021-03-07 22:51:06 +01:00
COPYRIGHT.txt Switch to embree-aarch64 2021-05-05 15:11:13 +02:00
DONORS.md Update AUTHORS and DONORS list 2021-07-13 13:17:08 +02:00
gles_builders.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
icon.png Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
icon.svg Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
LICENSE.txt Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
logo.png Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
logo.svg Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-29 13:54:08 +01:00
LOGO_LICENSE.md Relicense Godot logo from CC-BY-3.0 to CC-BY-4.0 2020-12-09 11:22:04 +01:00
methods.py SCons: Add method to detect Emscripten and use it for warnings config 2021-08-13 10:27:08 +02:00
platform_methods.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
README.md Link to Godot Contributors Chat instead of IRC 2021-03-07 22:51:06 +01:00
SConstruct automatically detect BSDs as platform=linuxbsd 2021-08-13 10:36:58 +02:00
version.py Bump version to 3.3.3-rc 2021-05-24 18:25:08 +02:00

Godot Engine

Godot Engine logo

2D and 3D cross-platform game engine

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms (HTML5) and consoles.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Screenshot of a 3D scene in Godot Engine

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the homepage.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community and contributing

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

To get in touch with the engine developers, the best way is to join the Godot Contributors Chat.

To get started contributing to the project, see the contributing guide.

Documentation and demos

The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from the Godot editor.

The official demos are maintained in their own GitHub repository as well.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.

Actions Build Status Code Triagers Badge Translate on Weblate Total alerts on LGTM TODOs