-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Crashes when accessing the RLMArray<RLMEmbeddedObject> element #7490
Comments
Hi @YJianMu could you show us what your Realm Object classes look like so we can help you further? |
@objc @objc dynamic var id: String = "" @objc dynamic var type: XXRecordType = "" @objc dynamic var localId: String = "" @objc dynamic var startedAt: Int = 0 @objc dynamic var endedAt: Int = 0 @objc dynamic var recordedAt: Int = 0 @objc dynamic var status: XXRecordStatus = "" @objc dynamic var sysMetadata: XXRecordSysMetadataRLMObj? @objc dynamic var recMetadata: XXRecordRecMetadataRLMObj? override class func primaryKey() -> String? { @objc @objc dynamic var brand: String = "iPhone" @objc dynamic var endReason: XXRecordEndReasonName = "" @objc dynamic var model: String = XXDevice.deviceModel() @objc dynamic var osVersion: String = XXDevice.systemVersion() @objc dynamic var sysEventList: RLMArray = RLMArray(objectClassName: XXRecordSysEventRLMObj.className()) @objc dynamic var sysStatusList: RLMArray = RLMArray(objectClassName: XXRecordSysStatusRLMObj.className()) @objc @objc dynamic var eventName: XXRecordSysEventName = XXRecordSysEventNameForeground @objc dynamic var eventParam: String? @objc dynamic var recordAt: Int64 = 0 @objc @objc dynamic var batteryCapacity: Double = 0 @objc dynamic var isCharging: Bool = false @objc dynamic var isLowMem: Bool = false @objc dynamic var recordAt: Int64 = 0 //Crashes when accessing the XXRecordRLMObj.sysMetadata.sysEventList element |
@jsflax Is there any news? I'm having the same thing |
How frequently does the bug occur?
All the time
Description
// RLMSupport.swift
public struct RLMCollectionIterator: IteratorProtocol {
private var iteratorBase: NSFastEnumerationIterator
// RLMEmbeddedObject forcibly convertsRLMObject crash
return iteratorBase.next() as! RLMObject?
}
}
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.17.0
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
ios
Build environment
Xcode version: ...
Dependency manager and version: ...
The text was updated successfully, but these errors were encountered: