Skip to content
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

Engine crashes without leaving a log #47379

Closed
avnerh1 opened this issue Mar 26, 2021 · 13 comments · Fixed by #60782
Closed

Engine crashes without leaving a log #47379

avnerh1 opened this issue Mar 26, 2021 · 13 comments · Fixed by #60782

Comments

@avnerh1
Copy link

avnerh1 commented Mar 26, 2021

Godot version:
3.2.3.stable.mono.official

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

Issue description:
Godot crashes without leaving a log file, which makes it almost impossible to trace the root cause.

Steps to reproduce:

  1. Work until Godot crashes
  2. Look under %AppData%\Roaming\Godot\mono\mono_logs and %AppData%\Roaming\Godot\app_userdata\EscapeLab\logs to find out there's nothing recent added to the logs
  3. Restart Godot from a cmd console with the "--verbose" flag, just to see nothing was printed when a crash happens
@ka23ppa3
Copy link

ka23ppa3 commented May 27, 2021

Godot version:
3.3.1.stable.arch_linux

OS/device including version:
arch x64 5.12.6, AMD Ryzen(Renoir), Vega 7 Graphics

Issue description:
Godot crashes without leaving a log file, which makes it almost impossible to trace the root cause.
Im using python plugin for godot, but not sure if this the issue

Steps to reproduce:

  1. Work until Godot crashes, basically in first half-hour or hour randomly.
    You can try to do it with python plugin for godot from assetlib if have no luck

@Calinou
Copy link
Member

Calinou commented May 27, 2021

Godot crashes without leaving a log file, which makes it almost impossible to trace the root cause.

The engine flushes on every printed line in debug builds (which includes editor builds), and file logging is enabled by default on desktop platforms. I don't know why no logs would be written to user://logs in this situation. (Use Project > Open Project Data Folder to check.)

@ka23ppa3
Copy link

Thanks for fast reply. As I know from here: https://godotengine.org/qa/98840/godot-engine-crashes-is-there-a-log-file

We both tried to find logs at this location but there is only logs of our project and nothing specific to godot-engine. Those logs almost empty and contains absolutely nothing useful to determine issue, even godot.log file.

@ka23ppa3
Copy link

All my logs looks like:

Godot Engine v3.3.1.stable.arch_linux - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD RENOIR (DRM 3.40.0, 5.12.6-arch1-1, LLVM 11.1.0)
OpenGL ES Batching: ON
 
Pythonscript 0.50.0 (CPython 3.8.5.final.0)

And thats all.

Also: crash can happen randomly even if you are doing nothing in Editor and working in other application... I spotted it firstly yesterday and today again.

@Calinou
Copy link
Member

Calinou commented May 27, 2021

To be fair, Godot itself doesn't log that many things by default. You can start the editor with the --verbose command line argument (make sure to run the editor directly by specifying the path to the project.godot file as well).

Due to how it's implemented, the crash backtrace will never be written to log files; it's only printed to the terminal output. I recommend you start Godot from a terminal to be able to see the crash backtrace when it crashes (otherwise, there's no way to see it on Linux).

That said, for crash backtraces to contain useful information, you need to compile an editor build that has debug symbols included since official builds don't include debug symbols for file size reasons.

@ka23ppa3
Copy link

ka23ppa3 commented May 27, 2021

Is it good enough to what you just said(?)

godot --editor --verbose --path {path to project}

I will try to catch backtrace and next, if there is will be any backtrace, I will compile debug-editor as you said.

@Calinou
Copy link
Member

Calinou commented May 27, 2021

Is it good enough to what you just said(?)

godot --editor --verbose --path {path to project}

Yes, that should work. Note that the crash backtrace is printed to the terminal even if --verbose is not passed.

@ka23ppa3
Copy link

ka23ppa3 commented May 29, 2021

Okay, I catch crash using console as mentioned above.

handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x3cda0) [0x7f0ec3ca9da0] (??:0)
[2] godot() [0x2f837a7] (??:0)
[3] godot() [0x2f83a6b] (??:0)
[4] godot() [0xc39a02] (??:0)
[5] godot() [0xc35a72] (??:0)
[6] godot() [0x314e194] (??:0)
[7] godot() [0x3151354] (??:0)
[8] godot() [0x1a95044] (??:0)
[9] godot() [0x1a7604b] (??:0)
[10] godot() [0x2f067f4] (??:0)
[11] godot() [0x1efc7db] (??:0)
[12] godot() [0x1efc7fc] (??:0)
[13] godot() [0x1efc7fc] (??:0)
[14] godot() [0x1efc7fc] (??:0)
[15] godot() [0x1efc7fc] (??:0)
[16] godot() [0x1efc7fc] (??:0)
[17] godot() [0x1efc7fc] (??:0)
[18] godot() [0x1efc7fc] (??:0)
[19] godot() [0x1efc7fc] (??:0)
[20] godot() [0x1efc7fc] (??:0)
[21] godot() [0x1efc7fc] (??:0)
[22] godot() [0x1efc7fc] (??:0)
[23] godot() [0x1efc7fc] (??:0)
[24] godot() [0x1efc7fc] (??:0)
[25] godot() [0x1efc7fc] (??:0)
[26] godot() [0x2f067f4] (??:0)
[27] godot() [0x77e7b8] (??:0)
[28] godot() [0x780300] (??:0)
[29] godot() [0x769f6e] (??:0)
[30] /usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f0ec3c94b25] (??:0)
[31] godot() [0x76f61e] (??:0)
-- END OF BACKTRACE --
Aborted (core dumped)

@ka23ppa3
Copy link

I think its good to have option to install godot-debug version from repository, because engine crashes is very common thing which can encounter any developer and by default its better to use debug-version. Also can someone make sure to include crash stacktrace to log-files?

Going to compile debug version...

@Calinou
Copy link
Member

Calinou commented May 29, 2021

I think its good to have option to install godot-debug version from repository, because engine crashes is very common thing which can encounter any developer and by default its better to use debug-version.

See godotengine/godot-proposals#1342. Linux distribution repositories are managed by third parties, so it's up to them to provide a way to install debugging symbols for packages.

Also can someone make sure to include crash stacktrace to log-files?

Unfortunately, it's easier said than done. When the engine crashes, it generally no longer has access to other filesystem handling methods that would allow it to append to the log file at the right location before the process closes. If anyone is interested in looking into this, crash handlers are OS-specific: Linux/*BSD, Windows, macOS.

PS: Use triple backticks followed by a newline to format multiline code blocks, instead of a single backtick. I edited your post accordingly 🙂

@ka23ppa3
Copy link

ka23ppa3 commented May 29, 2021

Thanks for the reply. Im really much less experienced than you but is it can be a solution to launch engine from separated crash-handler which will get all output from engine process? So when we launching godot we actually launch crash-handler first which then launch engine.

@Calinou
Copy link
Member

Calinou commented May 29, 2021

Thanks for the reply. Im really much less experienced than you but is it can be a solution to launch engine from separated crash-handler which will get all output from engine process? So when we launching godot we actually launch crash-handler first which then launch engine.

This can be achieved with a third-party tool, but we can't bundle Godot with something like that for portability reasons (also because we'd have to maintain such a tool).

@G1ov4
Copy link

G1ov4 commented Aug 4, 2021

This also happens on windows, furthermore, it disconnects and reconnects my monitors and bugs some opened programs (i.e. Firefox 90.0.2: clicking on the "x" to close the program or on any tab doesn't update the window graphically but still executes the input)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants