Fixes, minor UI improvements, and the pitfalls of multithreading


While this update contains few user-facing changes, a lot has changed in the background.

As it turns out, the godot multi-threading implementation is a bit more problematic than it appears on the surface.
The lack of a proper debugger for threaded code does not help.
With the last couple of updates I moved a lot of the project to a multi-threaded structure. This greatly reduced load times all across the application as a grid based database is really a prime candidate for parallel processing.

Unfortunately this brought some new issues that turned out to be near impossible to debug. The program could randomly crash on startup. The crash was rare enough that I chalked it up to random minor issues I had not caught. Then I discovered that it would always, without fail, crash on exit.
What followed was a mind-melting journey of trying and failing to find the source of the problem, until I came across a thread on the godot forum that shed some light on the issue.
In short: some elements in godot are safe to multi-thread and some are not. This is not really documented and near impossible to track down since it still works - most of the time.

I had to largely rewrite how all file loading works and sadly lost some performance in the process, but at least this new version should not crash anymore.
One last branch flew into the gears as I was about to release - I found yet another crash on exit.
The windows version contains an experimental workaround for this, which deactivates the preload functionality and asynchronous loading in the media viewer.
I hope to find a proper solution for this soon, as the performance of opening media files and switching between them has a major impact on the user experience.

Files

GDImageDB_linux_9.zip 32 MB
12 days ago
GDImageDB_windows_9.zip 34 MB
12 days ago

Get GDImageDB

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.