Weird problem?

hopefully a staff member may be able to help me with this.

I created an app called Accounts, which upon first run, creates a database called accounts in the ApplicationData folder, and then creates the tables and columns inside it.

This was working perfectly for over a week.
Now however, for some strange reason - I have noticed a folder called Accounts (the same name as my app), which gets created in the Library folder ( my app does not create anything in that folder).

The folder contains 3 files:

  1. Accounts3.sqlite
  2. Accounts3.sqlite-shm
  3. Accounts3.sqlite-wal

I delete the folder, but as soon as I reboot, the folder gets created again. It also tells me that the files are in use when I try to delete them??
I have to reboot, and then delete the folder. Then when I reboot the next time - they magically appear again?

Does anyone know if Xojo would be creating these files?
I presume it must be, because the folder has exactly the same name as my app.

Maybe something has become corrupted?
Are there any Xojo cache files which I could clear, in order to try to resolve this issue???

Thank in advance.

Have you looked inside the SQLite file to see if it has your data in it?
If it doesn’t, I’d say it’s unrelated.

It has gobbledygook inside! It must be related, if it has exactly the same name as my app. That would be an extreme coincidence!

It’s from your app.

My app has no code which writes to the library folder, PLUS, I have no idea how it gets created by default upon boot??

Check what you are setting here: db.DatabaseFile = TheDBFilePathPlusName

My code only writes to the ApplicationData folder. Never to the library folder.

Also, that could not possibly cause the folder to be created upon boot.

ApplicationData on a Mac resides in the Library. So you need deeper research on this as I requested. :wink:

Are your closing your app and Xojo, then deleting those files before the boot?

Rick, I understand that the ApplicationData is in the Library folder, but my code sets the path to the correct location. Also, my code has been working perfectly for 2 weeks. Only now has the folder containing the 3 files suddenly appeared.

Also, when I turn my iMac on, the folder gets created. I do absolutely nothing except try to delete the folder, but get told they are in use. I then have to reboot again, before I can successfully delete it.

I do not even open Xojo. I simply boot the computer, and the folder gets recreated.

What changed in this period? OS update? Xojo update?

Those 3 files are created when you have a Accounts3.sqlite DB open.

Neither. That is why I believe something is corrupted. In order to try and fix the problem, I have tried deleting Xojo 2013 r 3.1 and downloaded the latest version - but nothing changes.

I cannot understand how a deleted folder can continually be recreated upon boot???

What is an Accounts3.sqlite database???

My code creates a database file called Accounts in a folder called Accounts Data. Absolutely nothing in my app refers to Accounts3. ???

Open the terminal, go to the place the Accounts3.sqlite file is and type:

lsof ./Accounts3.sqlite

Let’s try to see the owner process.

What do I type in the Terminal window, to get to the Library folder - (I have never used the Terminal.)

cd ˜/Library

No such file or directory???

cd ~/Library