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

AGS does not release file locks #7

Closed
limi opened this issue Apr 3, 2020 · 7 comments
Closed

AGS does not release file locks #7

limi opened this issue Apr 3, 2020 · 7 comments
Labels

Comments

@limi
Copy link

limi commented Apr 3, 2020

Steps to reproduce:

  1. Launch AGS
  2. Quit AGS
  3. Try to delete a .txt file used by the menu from the file system

The OS will now complain that the file is in use, and you need to reboot if you want to delete the file.

Obviously not a huge issue, but a bit annoying when you’re working on setting up the files and testing your setup. 😊

@limi
Copy link
Author

limi commented Apr 4, 2020

It only happens for the .txt files, by the way — the .run/.iff files can be deleted and are not locked.

@Optiroc
Copy link
Collaborator

Optiroc commented Apr 12, 2020

I tried to fix this issue about a year ago, but only took a quick stab at it really. I wasn't able to release the file locks without crashing the app unfortunately.

@MagerValp MagerValp added the bug label Apr 14, 2020
@MagerValp
Copy link
Owner

It seems like I simply forgot to Close after Open, doesn't IF fh THEN Close(fh) in the EXCEPT DO block work?

I need to get my dev environment up and running again...

@Optiroc
Copy link
Collaborator

Optiroc commented Apr 14, 2020

I’ll give it another try tonight, or thereabouts. :)

@Optiroc
Copy link
Collaborator

Optiroc commented Apr 14, 2020

Maybe I double free'd the handle with my previous fix (which is strange since I did the null-check in both places). Only freeing in th except-block seems to work as expected.

Currently I based the fix off my copy which I forgot had another feature already merged. PR:d that first. 🤗

MagerValp added a commit that referenced this issue Apr 16, 2020
Close file handle in load_text(), fixes issue #7
@MagerValp
Copy link
Owner

@limi Can you try the build @Optiroc posted in the PR?

@limi
Copy link
Author

limi commented Apr 17, 2020

Seems to work 😊

@limi limi closed this as completed Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants