godot-go icon indicating copy to clipboard operation
godot-go copied to clipboard

Editor crashes after loading GDNative

Open jog1t opened this issue 6 years ago • 3 comments

Description

I've used example from https://github.com/ShadowApex/godot-go/tree/master/examples/gdnative/SimpleDemo but this seems to not work. Ouput from console when running game looks like:

OpenGL ES 2.0 Renderer: GeForce GTX 860M/PCIe/SSE2
ERROR: _get_socket_error: Socket error: 10054
   At: drivers/unix/net_socket_posix.cpp:190
WARNING: main.nativeScriptInit: Initializing nativescript from Go!
     At: C:/path/to/main.go:20
WARNING: main.nativeScriptInit: Registering SIMPLE class...
     At: C:/path/to/main.go:39
WARNING: main.nativeScriptInit: Registering SIMPLE method...
     At: C:/path/to/main.go:48
Cetn e ipels.
Dsryn ipels ihI:x00808.

I suppose, last two lines are from main.go. gdnative.Log.Println("Creating new SimpleClass...") and gdnative.Log.Println("Destroying SimpleClass with ID:", userData, "..."). If I change gdnative.Log.Println to gdnative.Log.Warning this logs seems to be working but editor still crashes.

Details

Go version go version go1.12 windows/amd64
Godot version v3.1.beta8.official
Godot-Go version/commit hash 1746202a2001f65ff7eb635b8cd7fc2a6ea64ca2
OS windows10 64bit

jog1t avatar Feb 27 '19 21:02 jog1t

Looks like creating simple.gdns from Godot's interface works fine.

[gd_resource type="NativeScript" load_steps=2 format=2]

[sub_resource type="GDNativeLibrary" id=1]
config_file = Object(ConfigFile,"script":null)

entry/Windows.64 = "res://path/to/simple.dll"
dependency/Windows.64 = [  ]

[resource]
class_name = "SIMPLE"
library = SubResource( 1 )
script_class_name = "SIMPLE"

But this solution does not fix weird logs. Should I create new issue for that?

jog1t avatar Feb 27 '19 22:02 jog1t

even the binding generator dies at some error. Its the previous issue to this one. So yeah, i think its broken.. I could fix it, but i don't have much free time.

vaiktorg avatar Mar 22 '19 16:03 vaiktorg

I started a new godot-go project here (https://github.com/godot-go/godot-go) because this project has gone dormant. my project properly integrates into the editor. custom nativescript properties will register and can be modified on the editor panel.

pcting avatar Sep 29 '20 22:09 pcting