godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.89k stars 21.04k forks source link

"No valid library handle, can't terminate GDNative object" - Output Error #27255

Open Lucrecious opened 5 years ago

Lucrecious commented 5 years ago

Godot version: 3.1

OS/device including version: Latest OSX

Issue description: I moved from 3.1 beta 10 to 3.1 and I started seeing this in my output as an error everytime Godot refreshes (unfocus Godot and then focus it again).

 modules/gdnative/gdnative.cpp:393 - No valid library handle, can't terminate GDNative object

I get these errors whenever I run the debug project:

** Debug Process Started **
 modules/gdnative/gdnative.cpp:488 - No valid library handle, can't get symbol from GDNative object
 modules/gdnative/gdnative.cpp:393 - No valid library handle, can't terminate GDNative object

I've tried removing all my GDNative objects, and I still get those errors in output.

The game runs completely fine, no issues it seems, no crashes. It might be some type of overzealous error output?

Unfortunately, I haven't been able to find a minimal project to reproduce this.

Any ideas?

Chaosus commented 5 years ago

@hpvb @karroffel Detected it too. Any ideas why its happens ?

karroffel commented 5 years ago

This should be fixed by #27320

Chaosus commented 5 years ago

Ah, true its fixed in master.. was checked it in stable

SnailBones commented 5 years ago

I'm getting this issue in 3.1.1.

Trayani commented 5 years ago

Same here. It appears to happen when there are more than one C++ Classes being registered.

Trayani commented 5 years ago

Same here. It appears to happen when there are more than one C++ Classes being registered.

Oh well, it turns out my problem was a different one. I got the same errors, but native scripts did not work at all. It was caused by static members which apparently do not sit well with a dynamic library. My bad.

GammaGames commented 5 years ago

I get it on linux whenever I do a shortcut that involves the super key

atari83 commented 4 years ago

I've got same issue with Godot3.2 on FreeBSD12.1 , I tried everything but cannot solve the issue. Can anybody help.

https://github.com/godotengine/godot/issues/36114

atari83 commented 4 years ago

I've got same issue with Godot3.2 on FreeBSD12.1 , I tried everything but cannot solve the issue. Can anybody help.

36114

It was a stupid mistake :) Working fine now!

khinbaptista commented 4 years ago

@atari83 just out of curiosity (I may or may not be having the same issue), what was the stupid mistake?

atari83 commented 4 years ago

@atari83 just out of curiosity (I may or may not be having the same issue), what was the stupid mistake?

Well, I had a wrong class definition ^^! It was anything to do with godot-cpp or my build-tools (clang, llvm) ... my mistake was to focus on these two scope instead of studying my own code. [but you see nobody ... automatic message purge]

khinbaptista commented 4 years ago

Thank you for replying. The problem for me is that I declared a destructor in the header (which I didn't need) and forgot to define it in the source.

aganm commented 4 years ago

I have this issue in 3.2.1.

haennes commented 3 years ago

Hi, guys had this issue in 3.2.3 and wanted to share my solution.: I declared variables at the beginning of my cpp file My IDE (VS Code) doesn't show an error, and it compiles fine. But Godot (as I assume) doesn't support declaring variables at this position, the solution is to declare them in a header file. This way it compiles fine, and it works. (PS: Sorry for my bad English as it isn't my native language )