Hello Community
I have a question regarding the usage of SQLite with Unreal Engine 5.0.3 c++ for deployment on Microsoft HoloLens 2 as Universal Windows Platform (UWP) application.
Initial situation
I have an own written library integrated in my Unreal Project as Module, which is dependent on SQLite (https://www.sqlite.org/), which allow me besides some business logics to read and write data to and from an SQLite database. In my own written library, I’m using the SQLite functionality through including the <sqlite/sqlite3.h> Header. To resolve the dependency, I’m using the official SQLite Plugin from Epic Games, Inc…
Further, I have extensive own written Unit-Tests, to test the functionality of my own written library, which are succeeding when I run the tests through the “Session Frontend” in the Unreal-Editor on my Local Windows machine. The database can be created, written, readen without any problem, as expected.
Problem
The application can be builded and tested on my local machine, without problems. The application can be build for Microsoft Hololens 2, deployed and run.
However, when running the application and the library on Microsoft Hololens 2 and the application wants to simply create a table in my database, I am receiving an “disk I/O error” with extended error code 5642: SQLITE_IOERR_SEEK. If I’m looking to the file directory (LocalState directory in project specific Appdata), I see the created database with 0kb data volume.
Specifications
- Unreal Engine 5.0.3
- SQLite Plugin of Epic Games, Inc.
- Windows SDK Version 10.0.18362.0
- C++17
- Microsoft HoloLens 2: Windows Holographic for Business with Build 22621.1266 and Development functionality enabled
- Host Machine with Windows 11
If anyone can help me, I would be really delighted, as I’m stuck on this Bug since a few days. If further informations are usefull, please don’t hesitate to ask!
Meanwhile tried approaches to solve or evaluate the problem:
- Write a simple text file to the same directory with some content to check if I can write to the specified directory. → Succeded
- Integrate the “SQLite for Universal Windows Platform” package (SQLite for Universal Windows Platform - Visual Studio Marketplace) as Third-Party library to use the sqlite3.lib binaries for UWP. → Failed: SQLITE_IOERR_SEEK
- Use an external storage device (SSD) connected to the Microsoft Hololens2 to write the database. → Failed: SQLITE_IOERR_SEEK
- Using the Unreal SQLite FSQLiteDatabase class and functionalities as described in https://www.youtube.com/watch?v=8Nsqz_AMOCI. → Failed: SQLITE_IOERR_SEEK
- Enable as many UWP capabilities as possible. → Failed: SQLITE_IOERR_SEEK
+CapabilityList=internetClientServer
+CapabilityList=privateNetworkClientServer
+CapabilityList=internetClient
+CapabilityList=AllJoyn
+CapabilityList=codeGeneration
+DeviceCapabilityList=microphone
+DeviceCapabilityList=webcam
+DeviceCapabilityList=gazeInput
+DeviceCapabilityList=wiFiControl
+DeviceCapabilityList=proximity
+DeviceCapabilityList=location
+DeviceCapabilityList=Bluetooth
+UapCapabilityList=musicLibrary
+UapCapabilityList=picturesLibrary
+UapCapabilityList=videosLibrary
+UapCapabilityList=blockedChatMessages
+UapCapabilityList=chat
+UapCapabilityList=enterpriseAuthentication
+UapCapabilityList=objects3D
+UapCapabilityList=phoneCall
+UapCapabilityList=removableStorage
+UapCapabilityList=sharedUserCertificates
+UapCapabilityList=userAccountInformation
+UapCapabilityList=voipCall
+Uap2CapabilityList=spatialPerception
+UapCapabilityList=appointments
+Uap3CapabilityList=backgroundMediaPlayback
+UapCapabilityList=contacts
+Uap6CapabilityList=graphicsCapture
+IotCapabilityList=lowLevelDevices
+Uap6CapabilityList=offlineMapsManagement
+Uap2CapabilityList=phoneCallHistoryPublic
+Uap3CapabilityList=remoteSystem
+IotCapabilityList=systemManagement
+Uap4CapabilityList=userDataTasks
+Uap3CapabilityList=userNotificationListener
+DeviceCapabilityList=lowLevel
+DeviceCapabilityList=pointOfService
+RescapCapabilityList=developmentModeNetwork
Considered Forums/Repositories for help:
- Is SQLite compatible with HoloLens? — Mixed Reality Developer Forum
- GitHub - robertohuertasm/SQLite4Unity3d: SQLite made easy for Unity3d
- sqlite3 for Windows 10 Universal apps · Issue #44 · ericsink/SQLitePCL.raw · GitHub
- python - How to ensure a safe file sync with sqlite and NFS - Stack Overflow
- python - Locking sqlite file on NFS filesystem possible? - Stack Overflow
- Use a SQLite database in a UWP app - UWP applications | Microsoft Learn
- GitHub - ionutdanila/SQLite.UWP: SQLite Library (x86, x64, ARM and ARM64) for UWP (Universal Windows Platform)
- Crashing/error on opening SQLite database in UWP/C# - Stack Overflow