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

Crash issue: No object with key 'xxx' in 'class_xxx' #8000

Closed
woohyuknrg opened this issue Oct 24, 2022 · 11 comments
Closed

Crash issue: No object with key 'xxx' in 'class_xxx' #8000

woohyuknrg opened this issue Oct 24, 2022 · 11 comments
Labels
Needs-Attention Reporter has responded. Review comment. O-Community T-Bug

Comments

@woohyuknrg
Copy link

woohyuknrg commented Oct 24, 2022

How frequently does the bug occur?

Sometimes

Description

Our app crash 3 times in succession on the same device.
1st crash, call realm.refresh() throws: RLMException · No object with key '1310798' in 'class_PosModule'
2nd and 3rd crash: realm::KeyNotFound · No object with key '0' in 'class_Holiday'

Stacktrace & log output

freeDisk
17.3 GB

freeMemory
112.3 MB

jailbroken
false

locale
en_US

manufacturer
Apple

model
iPad 6 (iPad7,5)

modelNumber
J71bAP

orientation
landscapeleft

osName
iOS

osVersion
15.3.1

runtimeVersions
{
  "clangVersion": "13.1.6 (clang-1316.0.21.2.5)",
  "osBuild": "19D52"
}

thermalState
nominal

totalMemory
2.1 GB

wordSize
64

1st crash: RLMException · No object with key '1310798' in 'class_PosModule'
2	Realm	
RLMRealm.mm:965:9
-[RLMRealm refresh]

3	RealmSwift	
Realm.swift:903:25
Realm.refresh()

4	OurAppName	
DatabaseManager.swift:50:35
DatabaseManager.realm1()


2nd and 3rd crash: realm::KeyNotFound · No object with key '0' in 'class_Holiday'
0	unknown file	unknown method

Can you reproduce the bug?

Not yet

Reproduction Steps

No response

Version

10.30.0

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

iOS 15.3.1

Build environment

Xcode version: 13.4
Dependency manager and version: cocoapods-1.11.3

@ejm01
Copy link
Contributor

ejm01 commented Oct 24, 2022

@woohyuknrg Are you able to provide a full stack trace for any of the 3 crashes?

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Oct 24, 2022
@woohyuknrg
Copy link
Author

1st crash:
RLMException · No object with key '1310798' in 'class_PosModule'
0 CoreFoundation
__exceptionPreprocess
1 libobjc.A.dylib
objc_exception_throw
2 Realm
RLMRealm.mm:965:9
-[RLMRealm refresh]
3 RealmSwift
Realm.swift:903:25
Realm.refresh()
4 YMPosiOS
DatabaseManager.swift:50:35
DatabaseManager.realm1()
5 YMPosiOS
MiddlewareViewController.swift:141:42
specialized MiddlewareViewController.toEmployeeLogin(
:)
6 YMPosiOS
MiddlewareViewController.swift
MiddlewareViewController.toEmployeeLogin(
:)
7 YMPosiOS
YMPosiOS
closure #1 in closure #3 in TablePanelAlertViewController.setupViews()
8 YMPosiOS

thunk for @escaping @callee_guaranteed () -> ()
9 UIKitCore
-[UIPresentationController transitionDidFinish:]
10 UIKitCore
___56-[UIPresentationController runTransitionForCurrentState]_block_invoke.437
11 UIKitCore
-[_UIViewControllerTransitionContext completeTransition:]
12 YMPosiOS

thunk for @escaping @callee_guaranteed (@unowned Bool) -> ()
13 UIKitCore
-[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:]
14 UIKitCore
-[UIViewAnimationState sendDelegateAnimationDidStop:finished:]
15 UIKitCore
-[UIViewAnimationState animationDidStop:finished:]
16 UIKitCore
-[UIViewAnimationState animationDidStop:finished:]
17 QuartzCore
CA::Layer::run_animation_callbacks(void*)
18 libdispatch.dylib
__dispatch_client_callout
19 libdispatch.dylib
__dispatch_main_queue_callback_4CF$VARIANT$mp
20 CoreFoundation
_CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
21 CoreFoundation
___CFRunLoopRun
22 CoreFoundation
_CFRunLoopRunSpecific
23 GraphicsServices
_GSEventRunModal
24 UIKitCore
-[UIApplication _run]
25 UIKitCore
_UIApplicationMain
26 YMPosiOS
AppDelegate.swift:33:16
main
27 dyld
start

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Oct 25, 2022
@woohyuknrg
Copy link
Author

2 other crashes:

Missing stacktrace:
This event contains no stacktrace
View Details
realm::KeyNotFound · No object with key '0' in 'class_Holiday'
0 unknown file unknown method

@woohyuknrg
Copy link
Author

woohyuknrg commented Oct 25, 2022

@ericjordanmossman We get realm file from user's device,here's the video link open with Realm Studio: https://share.getcloudapp.com/5zuPREyr

You can notice that when I scroll to the last records of 'OrderPayment', it shows "No object with key '1441824' in 'class_GuestPayment'", similar to App crash report.

Then I check GuestPayment, the last a few records' identifier property value are strange. I set identifier = UUID().uuidString.replacingOccurrences(of: "-", with: ""), but last records' identifier aren't the value I expect.

I think something broken when store data to realm. This impact our app seriously. Hope to fix this issue soon. Thank you very much!

@leemaguire
Copy link
Contributor

@finnschiermer @jedelbo can you have any input on the potential cause of this issue?

@sync-by-unito sync-by-unito bot added Waiting-For-Reporter Waiting for more information from the reporter before we can proceed and removed Needs-Attention Reporter has responded. Review comment. labels Nov 4, 2022
@woohyuknrg
Copy link
Author

Maybe something related to device low memory?

@woohyuknrg woohyuknrg reopened this Nov 5, 2022
@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Nov 5, 2022
@jedelbo
Copy link

jedelbo commented Nov 9, 2022

@woohyuknrg Would it be possible for you to share the erroneous file with us? You can send it to realm-help@mongodb.com.

@woohyuknrg
Copy link
Author

@jedelbo I have sent the file to your email

@jedelbo
Copy link

jedelbo commented Nov 21, 2022

The file is clearly corrupted. This could be fixed by realm/realm-core#5993. Be aware that the fix will not fix already corrupted files, but hopefully prevent creating corrupted files in the future.

@jedelbo jedelbo closed this as completed Nov 21, 2022
@woohyuknrg
Copy link
Author

When will the fixed version be released?

@jedelbo
Copy link

jedelbo commented Dec 5, 2022

The fix is included in v10.33.0 that was released last week.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs-Attention Reporter has responded. Review comment. O-Community T-Bug
Projects
None yet
Development

No branches or pull requests

4 participants