0 votes

Im using get_tree().quit()to close the game in-game but it is giving errors on my console(not the output box. The literal non-gui console). heres the error

OpenGL ES 3.0 Renderer: GeForce MX130/PCIe/SSE2
ERROR: ~List: Condition ' _first != __null ' is true.
   At: ./core/self_list.h:111
ERROR: ~List

I want to exit my game error free so what do I do?

asked Jul 21 in Engine by Xian (99 points)

I don't know your situation, but those may be errors from the engine itself, and not from your game. If I recall, I have encountered errors in the past when one of my Godot applications exited.

It was an awful situation and i was glad i recalled my c programming classes about this xD. It was a 'used data, not released error'(I don't know the exact term), basically yeah it isn't a bug by the engine but was because I instantiated something, gave it a value, but that data was never released after the game(or program) exited. So it made my pc set a portion of its hard drive storage memory to be permanently "used" despite not actually being in used. I'm explaining because this is a serious bug, my teacher told that it is because of this specific kind of bug, your pc storage grows smaller each time you run an application with this kind of bug. Its one of those permanently damaging kinds that happen can only be fixed by an expert :( Spread awareness #noToBuggedApps(I dont actually know how to make a hashtag here :P)

1 Answer

0 votes

I was reading a post about
https://godotengine.org/qa/7084/causing-error-selflist-class-gdfunction-condition-_first
and
https://github.com/godotengine/godot/issues/8985

And both of these made me remember my programming class about freeing the data that has been called after it was used. It went like this. Whenever you call something new you must always release the data that was called after using it.

So basically, I have several functions that call or load a new script to my scene. So i just added

NameOfNewlyCalledObject.free()
get_tree().quit()

And my console never showed the error ever again :)

answered Jul 23 by Xian (99 points)
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.