UA-17470720-3

Jump to content


Photo
- - - - -

Table View Crash On Last Record Delete


  • Please log in to reply
3 replies to this topic

#1 designwerks

designwerks

    Advanced Member

  • STV 5.0 Std
  • PipPipPipPipPip
  • 139 posts
  • LocationKingsville, Ontario, Canada
Reputation: 23
Excellent

Posted 21 March 2018 - 04:28 PM

Folks,

 

Not sure if you can help me... Meaning to ask about this for a while now... Many of my apps are crashing when the user tries to delete the last entry.  Adding rows and editing existing rows of information work as expected... Can delete rows on swipe as designed...

 

However, on the last item (cell) in the table the app crashes... I really did not change any code, meaning I am letting SensibleTableView do all the work adding rows and deleting rows (I think)... since I did not add code to create or delete the row, I am not sure what to check...

 

I have created a short video with the crash table result at end of video... It's posted on Vimeo... If any of you have a minute to review and provide feedback, much appreciated...

 

https://vimeo.com/261225643

 

Thanks,

 

John



#2 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 23 March 2018 - 01:25 AM

does the view have any functions for setting the setHeight forRowAtIndexPath ?? anything with withRowAnimation.. what does numberOfRowsInSection return? indexPathsForVisibleRows functions ? using beginUpdates wrongly??

not sure if its something in your code as i can't debug it:)  and if its not happening in any other tableview controller then it could do with some constraint for cells

best to set BP in areas of code to try to catch with method is doing something once the cell row is gone but still trying to alter it


Edited by ozie, 23 March 2018 - 01:34 AM.

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#3 designwerks

designwerks

    Advanced Member

  • STV 5.0 Std
  • PipPipPipPipPip
  • 139 posts
  • LocationKingsville, Ontario, Canada
Reputation: 23
Excellent

Posted 27 March 2018 - 02:37 PM

Ozie,

 

If I sent you my project file, would you have a few minutes to review.  I've tried to narrow down the potential problem areas (based on your suggestions), but no luck on my end. The crash is driving my crazy...

 

John


Edited by designwerks, 27 March 2018 - 02:39 PM.


#4 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 13 April 2018 - 07:13 AM

Hi designwerks,

 

 

It's a bit difficult to see what's happening from the video, I kept wanting to scroll the Console to read the rest of the logs :-)

 

If you create a simplified version of your project, does the crash still happen? I've not seen this in any of my apps using STV.

 

I'm willing to take a look if you post your project somewhere.


Cheers,

Dave

www.dgapps.ie




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users