Skip to content

[Bug]: DB4S crashes and the project file contents lost #3662

@i-s-o

Description

@i-s-o

What did you do?

  1. I created a new database, added a table.
  2. Saved the project.
  3. Attached another DB, reviewed the contents of a table in Browse Data tab.
  4. Added a new tab under Execute SQL, and ran a query.
  5. Detached the other DB which was attached in step 3.
  6. Saved the project again.

Test DBs and the project file:
bug-project-contents-lost.zip

Screen recording:
https://github.com/sqlitebrowser/sqlitebrowser/assets/1661549/3609c476-fe51-4fb3-8819-dc6089554dda

What did you expect to see?

Project file saved properly, including all Execute SQL tabs.

What did you see instead?

  • DB4S crashed.
  • The project file is now 0-length.

Observations:

  1. This bug seems to be the result of the Browse Data tab last showing a table from the now detached database.
  2. A related (I think) bug is when the project was last saved when there was an attached DB, but it can't be found when you open the project.
  3. Yet another related bug, this time without an attached DB, is when you delete a table from the main DB: if that table was open in the Browse Data tab, trying to save the project will crash DB4S, and unsaved work will be lost.

DB4S Version

3.13.99 (nightly)

What OS are you seeing the problem on?

Windows

OS version

Windows 11

Relevant log output

No response

Prevention against duplicate issues

  • I have searched for similar issues

Metadata

Metadata

Assignees

Labels

bugConfirmed bugs or reports that are very likely to be bugs.crash

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions