7

I've got a tableview backed by a fetchedresultscontroller. When I delete a row that causes the bottom row of a tableview to scroll up so the tv doesn't fill the entire screen, I get the crash below.

Here are the workarounds I've found.

  1. If I change the tableview to be grouped rather than plain - the error goes away.
  2. If I remove the section footers - the error goes away. This is not a viable workaround for me.

The error occurs after "controllerWillChangeContent" and prior to the "controllerDidChangeContent" - the code here is just copy/pasted from Apple's FRC protocol reference.

Anyone know why this occurs? Since it works fine with Grouped tableview it seems like it's likely an Apple bug - but I thought I'd ask here first before reporting it.

Assertion failure in -[UIViewAnimation initWithView:indexPath:endRect:endAlpha:startFraction:endFraction:curve:animateFromCurrentPosition:shouldDeleteAfterAnimation:editing:], /SourceCache/UIKit_Sim/UIKit-2903.23/UITableViewSupport.m:2661 2014-03-08 17:13:29.226 workbox[7527:70b] CoreData: error: Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. Cell animation stop fraction must be greater than start fraction with userInfo (null)

Sample program

Community
  • 1
  • 1
Bob Glass
  • 465
  • 3
  • 12
  • Can you post a part of your code? – Jonathan Gurebo Mar 09 '14 at 17:49
  • Here's a sample program:https://github.com/workboxsoftware/IOS-TableView-Bug – Bob Glass Mar 21 '14 at 14:45
  • Have you filed a bug report to Apple? – Norbert Jun 16 '14 at 06:27
  • 1
    I have the same issue - crashing when there's a footer and it goes away when it's removed. – Mike Jul 08 '14 at 15:25
  • Yes - I submitted this to Apple including the sample program. And yes, I know the bug goes away when the footer is removed - but that was not a viable option for me - I have totals on the footer line. I ended up making it a Grouped table which is unfortunate because the Plain style has that nice feature of keeping the heading and footer fixed - which in my case lets a user see totals while scrolling through a large section. – Bob Glass Jul 09 '14 at 17:02
  • 1
    Try to look to this [question](http://stackoverflow.com/questions/1893712/uitableview-crash-when-adding-a-section-footer-view-in-empty-section) and accepted answer, there could be really problem with section footer. – Nazir Nov 17 '15 at 08:47
  • This may help you out. http://stackoverflow.com/questions/6744680/assertion-failure-when-i-use-the-add-function – Adeel Jul 17 '16 at 05:36

1 Answers1

0

I have download your project on github, tested on a iPad Air. I have clicked on some elements and even when the app should scroll up because you have many elements, no problems/crash at all

I have tested on a xCode 7.3.2 and iPad Air 9.2. simulator

Could you please, say with wich device it's crash?

Sulfkain
  • 5,082
  • 1
  • 20
  • 38