GameAnalytics / GA-SDK-GODOT

Official GameAnalytics Godot SDK repository
MIT License
42 stars 7 forks source link

ERROR: Dictionary::_unref on closing Godot #8

Closed DmitriySalnikov closed 3 years ago

DmitriySalnikov commented 3 years ago

Windows 10 64bit 26986be43d1a80b98e6ba945f1a65238824be697 https://github.com/godotengine/godot/commit/adf2dabbde23fdd89803871e26dd1d33ca20bf77 and every other 3.2.4 commits, may be all 3.2 versions idk

image

That happens on unregistering GDScript module only with integrated GA SDK image

the1schwartz commented 3 years ago

Ok I will have a look at what is going wrong. So it is happening when you close the Godot editor and having the gameanalytics module enabed, right?

DmitriySalnikov commented 3 years ago

Yes, it is. You can just open and close project manager with enabled GA. ZmsQsvRP8C

Maybe the problem is in Godot itself but I only see this problem with GA enabled

the1schwartz commented 3 years ago

Ok thanks I will have a look to try to figure out what needs to be changed to fix this

the1schwartz commented 3 years ago

Is it happening with previous version of the GameAnalytics SDK module?

the1schwartz commented 3 years ago

Also I am wondering how the GA module could affect unregistering GDScript module?

the1schwartz commented 3 years ago

Should we report it on Godot github issues?

DmitriySalnikov commented 3 years ago

Is it happening with previous version of the GameAnalytics SDK module?

same in 1.2.0, 1.1.0, 1.0.4, 1.0.2


After some commits, Godot 3.2 branch now displays this new error

Godot Engine v3.2.4.beta.custom_build.06389f705 - https://godotengine.org
OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2
OpenGL ES Batching: ON

ERROR: Engine::Singleton::Singleton: A class intended to be used as a singleton must *not* inherit from Reference.
   At: core\engine.cpp:245
ERROR: Dictionary::_unref: Condition "!_p" is true.
   At: core\dictionary.cpp:185

so the error is here https://github.com/GameAnalytics/GA-SDK-GODOT/blob/26986be43d1a80b98e6ba945f1a65238824be697/gameanalytics/GameAnalytics.h#L6-L8

DmitriySalnikov commented 3 years ago

After replacing Reference with Object, the problem disappeared.

the1schwartz commented 3 years ago

Ok thanks I will add that fix to the next version

the1schwartz commented 3 years ago

This has been fixed now in the latest version (v1.2.2)