godot-sqlite: GD-SQLite no longer working in Linux versions

Environment:

  • OS: Ubuntu 18 and 20 and Deb
  • Godot version:
  • godot-sqlite version:

Issue description: Every time script tries to create an new DB instance it causes a segmentation fault. Works fine in windows

Steps to reproduce: Verified on 3 different Linux versions.

Minimal reproduction project:

extends Node

#Setup for the AWS server
# Comment out local and remove comment for the d.path ubuntu to use for the AWS server
# Be sure to leave the SQLite alone.

var network = NetworkedMultiplayerENet.new()
var port = 1911 #Port for Gateways clients to connect to
var max_servers = 5

# Preload the database SQLite software module
var SQLite = preload("res://addons/godot-sqlite/bin/gdsqlite.gdns")


# Players dict stored as id:name
var players = {} #This should be transfered to the second singleton that deals with the actuall games and players connections
var check_player = {}
var db
#var db_name : String = "res//db/alpha2_test_jog_db"  # Remove comment if logins dont work, seem to work
#var db_name : String = "/home/ubuntu/jogalpha3/db/alpha2_test_jog_db"
var table_name : String = "users"


func _ready():
	StartAuthenticationServer() # GatewayServer connects to this


# Loading the Creating the database for the users
	db = SQLite.new()
	db.path = "res://db/alpha2_test_jog_db" # Use this for LOCAL TESTING with editor

Additional context Not sure if it’s the newer 2.4 SQLite wrapper that is the issue. Older versions no longer found on the Asset Lib.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 21 (8 by maintainers)

Most upvoted comments

Okay sorry for the late reply, I just did a test run with my authentication server and it appears to work now when I run it and have the DB opening. Before I would get the error. Great job since I know jack crap about linux and DB’s beyond the basics for getting my game up and running. Much appreciated!!!

On Wed, Jul 14, 2021 at 8:32 AM Lee Ramer @.***> wrote:

Will do, glad to see I wasn’t the only one having the issue.

On Wed, Jul 14, 2021 at 5:21 AM Piet Bronders @.***> wrote:

@vainn2000 https://github.com/vainn2000 could you check if adding the missing Server entry in the gdnlib file (as seen in #50 https://github.com/2shady4u/godot-sqlite/issues/50 ) fixes the problem for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2shady4u/godot-sqlite/issues/52#issuecomment-879737562, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWUJJ7GG4OHBV4BX445IN3TXVJJTANCNFSM47XHWXGQ .

I found the problem. It’s the godot server binary. I just tried both regular export and by-hand export for both server and regular godot binary, and with or without debug it’s the server binary that causes it. This happens across the demo project and mine.

Here is output for the demo project running through the server binary:

$ ./demo.x64
Godot Engine v3.3.2.stable.official - https://godotengine.org
 
CORE API HASH: 0
EDITOR API HASH: 0
Loading resource: res://default_env.tres
Loading resource: res://Main.tscn
Loading resource: res://database.gdc
Loading resource: res://addons/godot-sqlite/bin/gdsqlite.gdns
Loading resource: res://addons/godot-sqlite/bin/gdsqlite.gdnlib
ERROR: init_library: Condition "lib_path.length() == 0" is true.
   At: modules/gdnative/nativescript/nativescript.cpp:1459.
Loading resource: res://icon.png
Loading resource: res://Main.gdc
Segmentation fault (core dumped)

Regular godot binary gives the output you would expect.

Nope, it wasn’t, that’s it. After some research I added the server line back in, as per #50, recompiled (just using “Export Project” with Linux preset, using the server binary as the custom preset) and it worked fine.

Thanks! Hopefully that means it’s an easy fix!