I have the plugins working fine when using any Visual Studio configuration that runs through the Editor. But when I run say the GameDebug configuration I get: LogSQLiteDatabase: Warning: Failed to open database ‘file path and name’: disk I/O error.
I have confirmed the path is correct. And have tried putting the file in other locations. I’ve also tried using the packaged version.
Any thoughts would be appreciated.
mDatabase = TSharedPtr<FSQLiteDatabase>(new FSQLiteDatabase());
if (!mDatabase->Open(*aLocation, ESQLiteDatabaseOpenMode::ReadWrite))
{
UE_LOG(LogDatabase, Fatal, TEXT("Failed to open the database"));
return;
}
When you encounter issues opening the database with disk I/O errors in GameDebug configuration, it could be related to SQLite’s default temporary storage settings causing performance issues or resource constraints. You might want to try setting SQLite’s temporary storage to memory, which reduces dependency on the disk and lowers the likelihood of disk I/O errors. Here’s how you can do it:
Before opening the database, use the following SQL command:
Ensure this command is executed before attempting to open the database file.
If the problem persists, check the OS’s file permissions and ensure there is sufficient disk space available.
This method has proven effective in some scenarios, particularly with read-only database operations, as it significantly improves performance and stability by reducing disk access.