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

'Target table row index out of range' realm2.8.0 just in release crashed !!! #5008

Closed
icoder20150719 opened this issue Jun 7, 2017 · 13 comments

Comments

@icoder20150719
Copy link

2017-06-07 21:45:49.432367+0800 Cashier[11261:4530714] *** Terminating app due to uncaught exception 'RLMException', reason: 'Target table row index out of range'
*** First throw call stack:
(0x190cfafd8 0x18f75c538 0x101eebb5c 0x101ecf910 0x101ed3f4c 0x101ed4e48 0x101ed4918 0x101eebfc4 0x101eeba7c 0x101ecf910 0x101ed3f4c 0x101ed4e48 0x101ed4918 0x101eebfc4 0x101eeba7c 0x101ecf910 0x101ed3f4c 0x101ed4e48 0x101ed4918 0x101eebfc4 0x101eeba7c 0x100228c20 0x100515dd0 0x100507704 0x1004c26f4 0x100295434 0x196e580ec 0x196e5806c 0x196e425e0 0x196e57950 0x1973ec46c 0x1973e87b8 0x190ca89a0 0x190ca6628 0x190ca6a74 0x190bd6d94 0x192640074 0x196e88130 0x1000f04e8 0x18fbe559c)
libc++abi.dylib: terminating with uncaught exception of type NSException

image

Realm framework version: 2.8.0
Xcode version: 8.3

iOS/OSX version: 10.3.1

Dependency manager + version: ?

@icoder20150719
Copy link
Author

image

@icoder20150719
Copy link
Author

Can you help me ?

@icoder20150719
Copy link
Author

image
just in release crashed !!!

@icoder20150719 icoder20150719 changed the title 'Target table row index out of range' realm2.8.0 'Target table row index out of range' realm2.8.0 just in release crashed !!! Jun 7, 2017
@austinzheng
Copy link
Contributor

Can you provide us with a reproduction case, or at least more of your code and the inputs that cause the problem to crash, including the RLMOrder definition and whatever code you are using to create and set it up before starting the write transaction?

@icoder20150719
Copy link
Author

image

@icoder20150719
Copy link
Author

image
image

@icoder20150719
Copy link
Author

and NSLog RLMOrder object print this:
image

@icoder20150719
Copy link
Author

Can you guess what went wrong?

@kishikawakatsumi
Copy link
Contributor

@icoder20150719 Sorry for the delay. Could you create a sample Xcode project along with exact steps for us to reproduce? Or please send the entire project that reproduces the bug? You could send it privately to us at help@realm.io if you don't wish to share this publicly. Without understanding your code it's difficult to make any progress. If you do we'd be happy to continue looking into the problem. Thanks!

@jpsim
Copy link
Contributor

jpsim commented Jul 5, 2017

@icoder20150719 I'm just following up on @kishikawakatsumi's request for a sample project that would allow us to debug this for you. Thanks!

@icoder20150719
Copy link
Author

@jpsim thanks a lot;
we has find the problem that is my code ;my orderModel has a property without managed by realm;
i am very sorry ;
thank you again;

@austinzheng
Copy link
Contributor

No problem! Feel free to file new issues if you run into any other problems!

@ivanicspeter92
Copy link

ivanicspeter92 commented Sep 21, 2017

I came along the same error message and crash today after upgrading from Realm 2.1.2 to 2.10.1 (via Cocoapods). The crash happens on iOS 11 and iOS 10 devices and simulators constantly, when the execution reaches the realm.add() function call in the following snippet:

  func insertOrUpdate(object: Object) {
        do {
            let realm = try Realm()
            
            try realm.write {
                realm.add(object, update: true) // crash here: Target table row index out of range
            }
        } catch let error {
            log.error(error.localizedDescription)
        }
    }

This happens only for some of my Object subclasses, which seemingly share no similarity between one another. If I comment the add() call out, my application runs smoothly without any problems by the way.
Any ideas what the cause of the problem can be?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants