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

Baking Error: sqlite3.OperationalError: attempt to write a readonly database #617

Open
Toxi2202v2 opened this issue Jun 19, 2023 · 5 comments

Comments

@Toxi2202v2
Copy link

System Information

Blender 3.5 (e1ccd9d4a1d3):
FlipFluid 1.6.5:
Windows 10
Ryzen 5 5600X:
GTX 1660Super:
16GB 3200Mhz:

Describe the bug

So i got a issue with an project after i was trying to bake it it will give me a error massage while in exporting animated data phase i tried to get help through the internet but sadly none of it worked i reinstalted blender to make sure this isnt a result of blender and it was not the fault of blender i toke an older project with the same Vehicle in my first project it just not done in the blend file i will send the issue is still the same.
when am trying to bake the file it will give me a error massage while exporting the animated data i tried multiple times it sometimes gives the error massage in the first 20% then other times it gave it around the 60% mark and also at the 90% mark it seems to be random to make sure i reproduced the error 3 times and all the error massages are in a notepad in the zip file plus the blend file

To Reproduce

Simply press bake on flip fluid panel and wait for the error massage if it should work randomly try rebaking it while i was trying to reproduce it 3 times to make sure it will work consistanlty in the 3rd attempt it made it through the exporting animated data phase i rebaked it and it happend again so if in anycase the exporting phase works rebake it

Expected Behaviour

Expected Behaviour should be that the blend file will going through the exporting animated data phase without any issues multiple times

Actual Behaviour

After I pressed the bake button it starts the exporting animated date as normal as it keeps loading it will randomly at one point give me a error massage after saving closing the blend file and reopening and rebaking it happend again

Screenshots

If applicable, add screenshots to help explain your problem.
Bild_2023-06-19_183533707
T-72bug.zip

@rlguy
Copy link
Owner

rlguy commented Jun 19, 2023

Hi, thanks for the report and files!

I was not able to reproduce the issue on our systems, but we did had another similar report of a database error in the past, although a different error message (issue #530). Unfortunately this issue went unsolved and we did not gain feedback for solving the issue.

Would you be able try these troubleshooting steps which may help us better understand what may be the cause of this issue:

  • Try restarting your system (unless this has already been tested).
  • Manually delete the cache directory (C:\Users\User\Desktop\d\T-72bugReport) and try again. Does the export seem to continue without issues?
  • Set the cache directory to another location on your system. The current location is within the user Desktop. Test another location such as within the user Documents directory just in case there are any permission errors within the Desktop. Does the export seem to continue without issues?
  • If the above did not work, would you be able to test the issue resetting Blender's userdata? This will eliminate issues related to corrupt userdata. The userdata can be reset renaming the Blender userdata folder from:

Let us know if you have any questions or if you find any more information about the issue.

@Toxi2202v2
Copy link
Author

Setting the cache directory to roaming seems to semi fix it it happends less know all dough it still happends but somewhat rarely now

@rlguy
Copy link
Owner

rlguy commented Jun 20, 2023

Thanks for the update. Ideally, this should not happen at all.

Something else to try could be to test exporting after disabling any antivirus software if that is relevant. It could be possible that an antivirus program is temporarily marking the database file as 'read-only' and triggering the error. This is something we had encountered in a similar issue in the past with another artist and the solution was to add a folder to the antivirus whitelist.

Let us know if you have any questions or if you find any more information about the issue.

@rlguy rlguy added the bug label Jul 17, 2023
@rlguy rlguy changed the title sqlite3.OperationalError: attempt to write a readonly database Baking Error: sqlite3.OperationalError: attempt to write a readonly database Jul 17, 2023
@gogobd
Copy link

gogobd commented Nov 2, 2023

I'm not aware of any antivirus software going through that folder; there's a windows machine connected to the share though, with standard windows defender on.

@rlguy
Copy link
Owner

rlguy commented Nov 2, 2023

Thanks for the info! The shared location could be a possible explanation for this type of error and possibly also issue #530. The simulation cache should not be located on a shared location during baking (cache directory notes). The simulator requires modifying files in the cache and sometimes shared locations can end up locking files and preventing the addon from making file changes.

It is okay to move the cache to a shared location after baking. Rendering the cache require only reading the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants