-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
What happened?
We've been seeing hard crashes of the Unity Editor that fail to produce crash reports. We have flexible sync turned on and it seems possibly related to writing to the database. We keep thinking we have the crash fixed, initially by ensuring certain operation move onto the main thread, but then I make a small adjustment to the code, and the crash comes back. At that point, rolling the code back does not resolve the issue. One time I observed that restarting my computer resolved the crash with the same version of code.
Repro steps
I'm really struggling to identify clear steps. At this point the possible related elements are
- Flexible Sync
- WriteAsync
- I was trying to increment a RealmInteger, though removing this didn't solve the problem
Version
.Net Standard 2.0
What SDK flavour are you using?
MongoDB Atlas (i.e. Sync, auth, functions)
What type of application is this?
Unity
Client OS and version
Windows 11 Pro Build 22000.1098
Code snippets
await realmProp.Value.WriteAsync(
() =>
{
syncedPointRecord = realmProp.Value.Add((SyncedPointRecord) pointRecord, true);
});
Stacktrace of the exception/crash you're getting
If it does have to do with writing, this is the chunk of code that would be in the mix # await realmProp.Value.WriteAsync( () => { syncedPointRecord = realmProp.Value.Add((SyncedPointRecord) pointRecord, true); });
Relevant log output
The last logs we see in Editor.log looks like this [Log] [] 2022-11-10 22:43:46.213 Debug: Connection[1]: Session[1]: Received: DOWNLOAD(download_server_version=38, download_client_version=22, latest_server_version=38, latest_server_version_salt=0, upload_client_version=38, upload_server_version=37, downloadable_bytes=0, last_in_batch=true, query_version=4, num_changesets=1, ...) [] UnityEngine.StackTraceUtility:ExtractStackTrace () UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) Company.Core.CompanyLogger:Log_Internal (UnityEngine.LogType,string,object,UnityEngine.Object) (at Assets/Company/Core/CompanyLogger.cs:139) Company.Core.CompanyLogger:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) (at Assets/Company/Core/CompanyLogger.cs:215) UnityEngine.Logger:Log (UnityEngine.LogType,object) UnityEngine.Debug:Log (object) UnityUtils.UnityLogger:LogImpl (Realms.Logging.LogLevel,string) Realms.Logging.Logger:Log (Realms.Logging.LogLevel,string) Realms.Sync.AppHandle:HandleLogMessage (intptr,Realms.Native.PrimitiveValue,Realms.Logging.LogLevel)
```
- depends on
-
RCORE-1344 Assertion failure when closing a Realm immediately after opening it
- Backlog
-
RCORE-1345 Read access violation in `SessionWrapper::on_new_flx_subscription_set`
- Closed