Skip to content

Database file not released after modifying structure #1691

@chrisjlocke

Description

@chrisjlocke

Details for the issue

This might be a Windows thing, so ideally, if someone can confirm on another OS? I presume as MacOS is based on Linux, it won't affect that or the specific Linux builds - @justinclift recently taught me about file locks on Linux ... or the lack thereof... 😉

If a database structure is modified (and even if it is then cancelled) and the database closed in DB4S, the file cannot be renamed/moved, as DB4S still has a lock open on it. Even if another database is opened (and subsequently closed) the original database is still held open.

image

Mainly logging in case its an indication of a file handling issue which could grow over time as DB4S is being used.

What did you do?

Open database. Go to 'Database Structure' tab. Modify a table. Add a new field. Cancel out of all dialogs. Close database. Try and rename file.

What did you expect to see?

The file renamed.

What did you see instead?

An error that DB4S still had the file open.

Useful extra information

Here is a screencast.
https://screencast-o-matic.com/watch/cFltQprNT6

0:10 - The file is open in DB4S, and the renaming fails as expected.
0:17 - The file is closed in DB4S and the renaming succeeds as expected.
0:30 - The file is opened in DB4S and the table modified.
0:37 - A field is added, but cancelled. The database is then closed
0:50 - The file cannot be renamed
0:55 - Another database is opened in DB4S and closed. This can be renamed, but the original file is still locked and cannot be renamed.
1:16 - DB4S is closed, and the original file can now be renamed.

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( version: 10_ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

What is your DB4S version?

  • Nightly from 24 Dec 2018
  • 3.11.0-alpha1 or 3.11.0-beta*
  • 3.10.1
  • Other: ___

Did you also

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions