Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on SQLite.new() when following the tutorial video linked in README #64

Open
IsaaacD opened this issue Jan 8, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@IsaaacD
Copy link

IsaaacD commented Jan 8, 2022

Environment:

  • OS: Windows
  • Godot version: 3.3.1.stable.mono.official + 3.4.2.stable.mono.official + 3.4.2.stable.official
  • godot-sqlite version: 3.0

Issue description:
When I try to preload and then create an instance of gdscript.gdns the debugger and game crash when callaing SQLite.new(). I'm following along with the video linked in the readme and have the similar code. There is no stack trace or error in the logs of what is going on. Here's a video showing the issue Video of overview
Steps to reproduce:
Start a project in Godot 3.3.1 and through AssetLib add "godot-sqlite", add a 2D scene and attach the following script (it fails on db = SQLite.new()) and have a debug point in the script and try to debug it:

extends Node2D
const SQLite = preload("res://addons/godot-sqlite/bin/gdsqlite.gdns")

var db # db instance
var db_name = "res://DataStore/sqaures" # db path after creating db

func _ready():
	commit_data_to_db()

func commit_data_to_db():
	db = SQLite.new()
	db.path = db_name
	db.open_db()
	var tableName = "GameInfo"
	var dict : Dictionary = Dictionary()
	var date = OS.get_datetime();		
	dict["DateTime"] = str(date.year) + "-" + str(date.month) + "-" + \
		str(date.day) + " " + str(date.hour) + ":" + str(date.minute) + ":" + str(date.second)
	dict["Score"] = 0
	dict["Difficuly"] = 0
	
	db.insert_row(tableName, dict)
	db.close_db()

Minimal reproduction project:
See previous section.

Additional context
I've tried a couple version of Godot including Mono versions (which is what I use to develop on). Any help would be appreciated! Thank you

EDIT: Tested on 3.3.2.stable.official as I saw that's the version listed in the 3.0 release

@IsaaacD IsaaacD added the bug Something isn't working label Jan 8, 2022
@IsaaacD
Copy link
Author

IsaaacD commented Jan 8, 2022

I tried the demo in this repository and it fails on the SQLite.new() as well, though there is a bit more information that shows up when loading this project. Maybe it can help

--- Debugging process started ---
Godot Engine v3.3.2.stable.official - https://godotengine.org
Using GLES2 video driver
OpenGL ES 2.0 Renderer: GeForce GTX 1050/PCIe/SSE2
OpenGL ES Batching: ON
	OPTIONS
	max_join_item_commands 16
	colored_vertex_format_threshold 0.25
	batch_buffer_size 16384
	light_scissor_area_threshold 1
	item_reordering_lookahead 4
	light_max_join_items 32
	single_rect_fallback False
	debug_flash False
	diagnose_frame False
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 48000
WASAPI: nAvgBytesPerSec = 384000
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 1962 calculated latency: 44ms
 
CORE API HASH: 14308214189771907951
EDITOR API HASH: 5656882008335453207
Loading resource: res://default_env.tres
Loaded builtin certs
Loading resource: res://Main.tscn
Loading resource: res://database.gd
Loading resource: res://addons/godot-sqlite/bin/gdsqlite.gdns
Loading resource: res://addons/godot-sqlite/bin/gdsqlite.gdnlib
Loading resource: res://icon.png
Loading resource: res://Main.gd
Socket error: 10054
--- Debugging process stopped ---

There was also this error in the console output

ERROR: Another resource is loaded from path 'res://addons/godot-sqlite/bin/gdsqlite.gdnlib' (possible cyclic resource inclusion).
   At: core/resource.cpp:82```

@IsaaacD
Copy link
Author

IsaaacD commented Jan 8, 2022

So it appears if I don't have a breakpoint it works... I had set a breakpoint on SQLite.new() and that was causing it to break. Is there an editor or something in the debugger that is missing that causes the addon to crash?

@2shady4u
Copy link
Owner

Hi @IsaaacD !
I'll need to do some filthy VS debugging to find out what is creating this crash.

Also, this issue is probably related to #61 , but I'm leaving them both open until I can figure out what is going on here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants