Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash on XLLocalDataLoader objectAtIndexPath #21

Open
ppaulojr opened this issue Apr 1, 2015 · 8 comments
Open

Crash on XLLocalDataLoader objectAtIndexPath #21

ppaulojr opened this issue Apr 1, 2015 · 8 comments

Comments

@ppaulojr
Copy link

ppaulojr commented Apr 1, 2015

Function failing: 8 Orchid 0x0037c9d7 -[XLLocalDataLoader objectAtIndexPath:] + 215

I would guess it's a synchronization bug.

Version used: e6e450b47275ac067a6e8d7b4dd7fa1874be2ff4

/Users/pedropaulo/git/cipherhealth/iOrchid/Acceptance Tests Local/RoundInitTestCase.m:39: error: -[RoundInitTestCase testTapPatientCell] : failed: caught "NSInvalidArgumentException", "Object's persistent store is not reachable from this NSManagedObjectContext's coordinator"
(
    0   CoreFoundation                      0x01c87466 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x04046a97 objc_exception_throw + 44
    2   CoreData                            0x0180d791 _PFRetainedObjectIDCore + 1169
    3   CoreData                            0x0180d2f0 -[NSManagedObjectContext(_NSInternalAdditions) _retainedObjectWithID:] + 32
    4   CoreData                            0x017f10f3 -[NSManagedObjectContext objectWithID:] + 595
    5   CoreData                            0x0184414e _faultBatchAtIndex + 1102
    6   CoreData                            0x01844d02 -[_PFBatchFaultingArray objectAtIndex:] + 50
    7   CoreData                            0x018e941b -[NSFetchedResultsController objectAtIndexPath:] + 251
    8   Orchid                              0x0037c9d7 -[XLLocalDataLoader objectAtIndexPath:] + 215
    9   Orchid                              0x0015a5af -[InteractionTableViewController tableView:titleForHeaderInSection:] + 191
    10  Orchid                              0x00158108 -[InteractionTableViewController tableView:viewForHeaderInSection:] + 120
    11  UIKit                               0x10f894db -[UITableViewSectionElement accessibilityChildren] + 673
    12  UIKit                               0x10f8a1a1 -[UITableViewSectionElement accessibilityContainerElements] + 33
    13  UIAccessibility                     0x11134b38 -[NSObject(AXPrivCategory) accessibilityElementCount] + 34
    14  Acceptance Tests Local              0x0f63e551 -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 2577
    15  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    16  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    17  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    18  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    19  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    20  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    21  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    22  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    23  Acceptance Tests Local              0x0f63de7f -[UIView(KIFAdditions) accessibilityElementMatchingBlock:] + 831
    24  Acceptance Tests Local              0x0f63d455 -[UIView(KIFAdditions) accessibilityElementWithLabel:accessibilityValue:traits:] + 245
    25  Acceptance Tests Local              0x0f637a16 -[UIApplication(KIFAdditions) accessibilityElementWithLabel:accessibilityValue:traits:] + 598
    26  Acceptance Tests Local              0x0f63692d +[UIAccessibilityElement(KIFAdditions) accessibilityElementWithLabel:value:traits:error:] + 221
    27  Acceptance Tests Local              0x0f63633f +[UIAccessibilityElement(KIFAdditions) accessibilityElement:view:withLabel:value:traits:tappable:error:] + 239
    28  Acceptance Tests Local              0x0f62806f __83-[KIFUITestActor waitForAccessibilityElement:view:withLabel:value:traits:tappable:]_block_invoke + 175
    29  Acceptance Tests Local              0x0f623924 -[KIFTestActor tryRunningBlock:complete:timeout:error:] + 196
    30  Acceptance Tests Local              0x0f623cb6 -[KIFTestActor runBlock:complete:timeout:] + 182
    31  Acceptance Tests Local              0x0f623e22 -[KIFTestActor runBlock:complete:] + 194
    32  Acceptance Tests Local              0x0f623f7c -[KIFTestActor runBlock:] + 108
    33  Acceptance Tests Local              0x0f627f36 -[KIFUITestActor waitForAccessibilityElement:view:withLabel:value:traits:tappable:] + 374
    34  Acceptance Tests Local              0x0f627d21 -[KIFUITestActor waitForViewWithAccessibilityLabel:value:traits:tappable:] + 273
    35  Acceptance Tests Local              0x0f6279ec -[KIFUITestActor waitForTappableViewWithAccessibilityLabel:] + 124
    36  Acceptance Tests Local              0x0f61fc76 -[RoundInitTestCase testTapPatientCell] + 182
    37  CoreFoundation                      0x01b6a10d __invoking___ + 29
    38  CoreFoundation                      0x01b69fb8 -[NSInvocation invoke] + 360
    39  XCTest                              0x2010897b -[XCTestCase invokeTest] + 320
    40  XCTest                              0x20108bb9 -[XCTestCase performTest:] + 184
    41  XCTest                              0x20114162 -[XCTest run] + 314
    42  XCTest                              0x20107598 -[XCTestSuite performTest:] + 406
    43  XCTest                              0x20114162 -[XCTest run] + 314
    44  XCTest                              0x20107598 -[XCTestSuite performTest:] + 406
    45  XCTest                              0x20114162 -[XCTest run] + 314
    46  XCTest                              0x20107598 -[XCTestSuite performTest:] + 406
    47  XCTest                              0x20114162 -[XCTest run] + 314
    48  XCTest                              0x20103de2 __25-[XCTestDriver _runSuite]_block_invoke + 61
    49  XCTest                              0x20110c82 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 184
    50  XCTest                              0x20103d06 -[XCTestDriver _runSuite] + 285
    51  XCTest                              0x20104951 -[XCTestDriver _checkForTestManager] + 272
    52  XCTest                              0x20104c6b -[XCTestDriver runTestSuite:completionHandler:] + 378
    53  XCTest                              0x2011775c +[XCTestProbe runTests:] + 216
    54  Foundation                          0x023b2257 __NSFireDelayedPerform + 423
    55  CoreFoundation                      0x01be10b6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
    56  CoreFoundation                      0x01be0a3d __CFRunLoopDoTimer + 1309
    57  CoreFoundation                      0x01b9fe6a __CFRunLoopRun + 2090
    58  CoreFoundation                      0x01b9f37b CFRunLoopRunSpecific + 443
    59  CoreFoundation                      0x01b9f1ab CFRunLoopRunInMode + 123
    60  GraphicsServices                    0x058cc2c1 GSEventRunModal + 192
    61  GraphicsServices                    0x058cc0fe GSEventRun + 104
    62  UIKit                               0x02e709b6 UIApplicationMain + 1526
    63  Orchid                              0x0013a9f2 main + 178
    64  libdyld.dylib                       0x048cbac9 start + 1
    65  ???                                 0x0000000a 0x0 + 10
)
@itsaliu90
Copy link

Hey @mtnbarreto, we might be seeing this in iOS Orchid, can you take a look and respond please? CC: @ppaulojr.

@mtnbarreto
Copy link
Member

Hey @yuningalexliu, @ppaulojr ,
@HelOlhausen

It seems to me based on the error Object's persistent store is not reachable from this NSManagedObjectContext's coordinator that we are deleting the persistent store while the context is being used.

Sometimes when we use a private context on a background thread that takes some time to perform a sync ( insert, update, delete) and at the same time we flush the database we get this error.

Could you please check that these kif tests are not deleting the persistent store?

We have been using XLData for the last 5 month now. I strongly recommend us to migrate XLDataLoader code to XLData. XLData is fully tested and solid enough for production apps. The only problem is it requires iOS8 and up due to it uses UISearchController class which is only available on iOS 8 and up.

@itsaliu90
Copy link

Thanks @mtnbarreto for responding! I think we can consider migrating to XLData once iOS9 comes out, right now we still want to support iOS7 until then due to our market :/... (we still have about 10% of our customers on iOS7)

@ppaulojr
Copy link
Author

I was writing the same @yuningalexliu wrote. Unfortunately we still cannot use XLData

@ppaulojr
Copy link
Author

ppaulojr commented Sep 2, 2015

@mtnbarreto I understand that this Library is being deprecated in favor of XLData. We plan to use XLData not in the upcoming version because we do need to support iOS7 but two versions from now. In the meantime what I'd like to ask is:

  1. Is XLDataLoader definitely deprecated?
  2. If we find a solution for Crash on XLLocalDataLoader objectAtIndexPath #21 would you consider merging into your codebase?
  3. Is there a guide to make the transition from XLDataLoader to XLData

cc: @yuningalexliu @HelOlhausen

@mtnbarreto
Copy link
Member

Hey @ppaulojr

  1. No. We have been migrating from XLDataLoader to XLData and we still have a couple of projects that require iOS7 support and they couldn't be migrated. We don't have plans to add any other functionality or improvements. If we realise there is a bug we are willing to fix it. I really appreciate if you point the issue out and share with us a project in order to easily reproduce it.

I'm not encouraging anyone to use it instead of XLData for new projects (that's why I labeled it as Deprecated).

  1. Sure.

  2. At the moment the only reference we have is the XLData readme. I know it's not a migration guide but is a good starting point.

XLData provides more functionalities than XLDataLoader, such as memory data sets so you should put your focus on Local and Remote Core Data Data sets. Basically we threw away XLLocalDataLoader and made some usability and stability improvements. The basic idea is still the same. The new concept that XLData introduces is the memory data sets, that are very helpful for creating either a "static" tableView/collection view (like a sliding menu) or a dynamic remote populated table view that keeps the data in memory and does not use core data.

I would love to help as needed, If you want to know more about how to migrate to XLData we can schedule a meeting and go through the necessary steps.

Honestly, my first guess is that this issue is not directly related with XLDataLoader. Core Data issues are hard to solve and sometimes to reproduce. As I mentioned before, I'm happy to help if you can isolate the issue.

@ppaulojr
Copy link
Author

Just for documentation our crashes on XLDataLoader began when we changed from: e6e450b to: dd36983

We'll revert to e6e450b and if our crashes disappear we'll have strong evidence that the problem is contained in this diff: e6e450b...dd36983

@ppaulojr
Copy link
Author

We had two crashes using e6e450b until today (one of those was the one used to open #21) and we had roughly 1000 crashes using dd36983

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants