0 votes

Hello everyone.

Summary
I'm trying to export my project(s) to Windows, but Godot only produces an empty (0kb) .exe file (as well as a .pck file). I use the right version of the export templates. The problem appears with all of my projects, including the official Godot tutorial projects (e.g. Dodge the Creeps).

Version information
I am using:

  • Windows 10
  • Godot version 3.2.3
  • Godot export templates version 3.2.3

Overview/Description
I'm new to Godot, so after working on my own project for a while I decided to try to export a project for the first time. (This entire bug report applies both to my personal project and to my version of the tutorial game Dodge the Creeps.)

I downloaded and installed (from file) the appropriate export templates (version 3.2.3). Subsequently, in my project, I got to Project > Export... > select Windows Desktop, don't change any of the default settings > Export Project > choose destination folder and file name.

Expected results
An .exe file in the destination folder that can be run and will play the game.

Actual results
In the destination folder, an .exe file appears that is 0kb large and cannot be run. There is also a .pck file that is has a nonzero size. (I understand the .pck is not the problem.)

Steps to Reproduce

  1. Download my project folder for Dodge the Creeps and import it into Godot.
  2. If necessary, configure the project (screen size, name, main scene) and install the latest export templates (version 3.2.3) from the Godot website.
  3. Go to Project > Export... > select Windows Desktop Runnable > Export Project > Choose destination folder and file name.
  4. Go to the destination folder. You will find an .exe file of 0kb large and a .pck file of 2107kb large. The .exe obviously cannot be run.

Further information
The console gives no information whasoever. Just that it opened the project for editing:

Godot Engine v3.2.3.stable.official - https://godotengine.org OpenGL ES 3.0 Renderer: Intel(R) HD Graphics 515

Editing project: C:/Users/UserName/Documents/5) Creatief/Godot game development/Dodge the Creeps/Project folder (C:::Users::UserName::Documents::5) Creatief::Godot game development::Dodge the Creeps::Project folder) Godot Engine v3.2.3.stable.official - https://godotengine.org OpenGL ES 3.0 Renderer: Intel(R) HD Graphics 515

The same error happens in all of my projects, including:

  • My own project
  • The tutorial project Dodge the Creeps
  • A newly created reduced test case that only consisted of a ColorRect

At first, I also got the following error. However, upon later attempts to reproduce it, it stopped appearing (at least not consistently). Others with the same problem, however, have reported a similar error in the console (see below for other cases):

ERROR: store_buffer: Condition "fwrite(p_src, 1, p_length, f) != (size_t)p_length" is true. 
At: drivers/windows/file_access_windows.cpp:312

In another attempt to fix this, I deleted the Godot executable and the AppData folder. Then I re-downloaded Godot and reconfigured it (resulting in a new AppData folder) but to no avail.

Other cases
I could find only two other cases of people encountering this problem:
Exporting a tutorial project makes an empty .exe file (Mar 14 2018)
Godot error message whle exporting (Jan 11 2020

The above people report the same 'store_buffer' error and a 0kb executable. The 2018 post resolved the problem as follows, but he does not specify *which* directory (and why):

I made this work by deleting an AppData\Godot directory!!!
commented Mar 15, 2018 by Ilya Fedorinov

The second post found out that it was caused by mismatched versions. But that does not apply to my case, AFAIK:

EDIT: after more research, the error means that my template and Godot dont have the same version! What do I do? Im using godot 3.1.1
commented Jan 12 by Anastasia

My guess
I really don't know, to be honest. But I doubt it has anything to do with my projects. It probably is a problem with the export templates. At first, I thought maybe my PC has run out of storage space, but that's not the case either (well, 3GB left - not much, but should be enough).

Any advice is very welcome! Thanks in advance.

in Engine by (16 points)

Try reinstalling the export templates from the editor. Go to Editor->Manage Export Templates, from there you can reinstall.
If this doesn't work you should go where Godot executable is located and in the same folder create an empty file named "sc" without the "". What that file does is it's forcing Godot to save it's preferences in the same directory like it is a portable application.

It worked!

How odd, though. I had removed the Godot program and the Local/AppData folder for Godot before, then reinstalled everything, but that did not help back then. But now, following you advice, I uninstalled the export templates (through the Godot program) and installed them anew, and this time the export functionality works as intended! Hurrah!

I'm not sure why it didn't work at first and does work now, but I'm very happy it worked out. Thanks a lot @ra45!

Glad I could help

Ye thanks a lot, I was having this problem, too with Godot.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.