-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export project crashes only when exporting without "Export with debug" option #28922
Comments
This is an error from console
This is line AreaBulletSpawner.gd:37
|
Oh I see, just one question @qarmin |
I used Ubuntu and compiled by mine debug and release templates so probably one of this is an answer. |
The macOS editor binary should have reported this issue in the editor debugger (and in the console if you run the editor from a console). If it's not in the editor debugger, that's a bug. |
yeah, no errors were shown when running through the editor, nor when running the game through the terminal. Deleting that line prevented the game from crashing on an export without "Export with debug", but another issue arises: the areas are not being freed when the spawner exits the tree so collisions are being detected with invisible objects (happens on both debug and release exports). The calls to |
I have updated the project to better reflect what's happening: The main changes are that there is now an icon representing Exporting it without changing anything will yield a working executable, but pressing 0 while there are bullets on the screen will cause the following behavior:
If, however, lines 33, 34 and 35 are uncommented from
So it seems like communication with Note: another issue that I saw here related to |
@ericdsw Can you still reproduce it with a recent version of Godot? I've tried with a release export on Linux using 3.2.2 RC 1, and it's not crashing for me. |
@akien-mga hi akien, gonna try it as soon as I can. Will keep you updated. |
I've experienced a similar issue, however in my case there is a scene which I am autoloading which doesn't function properly when exported without debugging enabled. It's making it impossible to release games commercially |
Can also confirm that the issue still exists. Pretty major problem, especially since it just killed my game jam submission. This happens to me with HTML and with the Windows version. Not sure if autoloading is the problem, since it's during the game long after the autoloading relevant code has been executed. Works fine in the editor of course, and when exporting with debug on. |
In 3.2.2, this could be due to the dangling variant fix being only applied in debug mode (for performance reasons). In 4.0, a different way is used to solve this problem and will also work in release mode.
While not ideal, it's still possible to release a debug build of your game. Many commercial games have actually done this, either by mistake or intentionally 🙂 |
In case this helps anyone: Exporting for MacOS crashes on 3.2.2.stable.official unless I use "Export all resources in the project" mode under the resources tab. |
That's good to know! However, I am wondering how I could debug this in the current 3.2.2. version, since I don't have a console in the release build? There's also no relevant warning when I execute the game in debug mode, which is even more confusing to me. |
You can enable file logging in the Project Settings then export the project again. Run the game, wait for it to crash then open the project's user data folder ( |
Sadly even with file logging enabled, I don't get any warnings or error messages in the log file whatsoever. Seems to be a deeper problem. Thank you for your help, though! |
@akien-mga Is it possible to compile release export templates that include debugging symbols with MSVC? This would be helpful to diagnose crashes like this one. |
@Calinou Yes, with |
I am having the same issue with the android build. Works great to deploy via usb with remote/debug enabled, but when that one singular option is disabled the application has problems. The application loads the main page but errors on the second. I'm new to android so i'm not sure how to view the logs without having remote/debug enabled. The APK exported also seem to hang in the same spot when manually deploying/installing on the phone. Im using GLES2 (migrated from GLES3 to work for android and changed ETC settings etc.). I have tried all sorts of export options. Thanks! |
I am also having this issue on windows. My game crashes when spamming inputs for the most part however in debug mode this is not an issue. |
Solved: Short answer: I enabled Android Network Permissions ('Access Network State' and 'Internet') in the Project -> Export settings. Since my application uses networking this is obvious in hindsight. But it does not explain the fact that when using Remote/Debug enabled Android Export permissions are modified (possibly just networking 'Access Network State') by Godot, otherwise it would crash on my networking call as it does when not using remote/debug. This specific issue is probably not a Godot bug because it is most likely mandatory to have networking ('Access Network State') enabled to Remote/Debug on Android, the confusion is that the user does not realize Godot is changing their Export setting when using Remote/Debug. Long Answer: Deploying manually and without the remote/debug enabled, had been a problem since I started using Android a month ago, I brushed it off at first because I knew there was a solution. My application started in all cases since my code that uses networking is invoked after the main page. The root of my ignorance was not knowing how to see my log files from the errors being thrown without debug on the android phone (FYI: find your adb.exe and use the command 'adb logcat' to see your android logs). Once I had my logs this is the error I was getting:
With this error message I was able to solve my issue (see Short Answer above). But for others it might be helpful to know that Godot probably changes the Android Export setting without you knowing when using Remote/Debug. Hope this helps someone! Thanks, |
Can someone correct me if I am wrong. Doesn't the 'Deploy with Remote/Debug' only get used when you are deploying remotely? By Remotely I mean remotely to your Phone or remotely to a Server? As far as I know this option does not need to be used when debugging local windows applications. Your debug breakpoints should trigger without using Remote/Debug enabled. -Shaun |
It sounds like you need your error message from your crashing release build exported exe (stderr). Godot allows you to enable logging and stdout and stderr in the project settings. Run the 'start' command below in the command prompt to start your game and redirect the log output (stdout and stderr if enabled in your project settings when you built your exported exe). There might be easier ways to view stdout/stderr, but this worked for me in Windows:
And open your txt file to view the stdout/stderr. I hope this helps, |
This indeed shows dome debug information! Sadly, still no error message whatsoever, at least for me. |
Same for me KaDokta no crash information. The interesting thing is if I export it with the debug option selected nothing crashes I dont understand why debug vs no debug would make a difference in this instance unless the godot engine that the standalone exe is wrapped with is different than the one used to build the game. |
Debug export templates are compiled as console applications, whereas release export templates are compiled as GUI applications (which don't spawn a command window). |
I'm having the same annoying issue with godot 3.2.1 : App crashes when i uncheck "Export with debug" to have my app as a released version. It happens on both iOS, Android and even PC. When testing on iOS, the crash on Xcode reported something about a variant or/and an object assignement, might be an internal bug. But really frustrating now that I finished my game, I can't even publish it after this long work. Would be a pain in the ass to refactor all to newer godot version
Well it may be possible on Windows but on Android/iOS stores won't approuve a debug app. Please make this fix for release :) |
Unfortunately, this bug can't be fixed in release builds until 4.0 at least. You need to decompose your project into smaller parts, isolate the source of the dangling Variant, and fix it. |
Ok i found the problem quiet easily by decomposing the project. It was coming from a child node of an instanciated scene |
With 3.4.beta.custom_build. 40b5731
|
I'm going to close this issue as I can't reproduce the original problem reported, which was specific to physics. Since the issue title was mistakenly kept too generic, lots of reports here are not related to the original bug and related instead to various other issues which can happen only in release builds if errors haven't been found or fixed when using debug builds. Several of these issues have been fixed over subsequent releases, including a major fix coming in 3.4 (available in 3.4 beta 5). So to anyone with an issue here, I would suggest to test the latest 3.4 build to confirm if their issue is fixed, and if not, open a new bug report with a minimal reproduction project so that we can assess what the current state is for each specific issue. |
I literally searched weeks for the bug and I FOUND it! create_tween().set_loops() I had tween on items for idle animation. When the item is queued free, then the tween will infinitely run and cause the game to free ON exported version. In the editor for some reason does not cause infinite loop. This was the only reason that caused the game to crash after export, hopeful this is also your root cause! |
Godot version:
3.1.stable.official
OS/device including version:
macOS Mojave 10.14.4
Issue description:
I made this project to test out how spawning a lot of bullets would impact performance, so it is practically a port from the 2.1 version's "shower of bullets" demo to 3.1. The expected behavior is that after 1 second multiple bullet waves will spawn from the center of the screen, the node "DetectableArea" will increate it's counter when it detects a collision with any bullet, all bullets will be deleted when they reach the screen's boundaries, and after 10 seconds the bullets will stop spawning.
The project runs just fine in most cases:
However, when I try to export it without the "Export with debug" flag, it creates an executable that crashes as soon as it's opened without any warnings or clear signs., making this issue very difficult to pinpoint.
Since I don't have access to the development tools when it crashes, I'm not sure if the issue arises from something broken in the engine itself (maybe the Physics2DServer API?), or a bad implementation from my part (which I still think would be weird since both debug and release versions should produce the same errors).
Steps to reproduce:
Minimal reproduction project:
BulletSpawnerTest.zip
The text was updated successfully, but these errors were encountered: