12

Strange issues that I've spent the last 24 hours trying to fix.

I have an app which was working perfectly fine. I updated Xcode for iOS9 now one of 5 push segues wont perform the action. I can breakpoint within 'prepareForSegue' and everything appears to run correctly, but soon as it exits the function the phone CPU maxes out and just sits there. The GUI doesn't do anything. I've tried many things from creating a new viewcontroller and using the same segue link and everything works. Its only this one viewcontroller I cannot perform a 'performSegueWithIdentifier' to. I've commented ALL code from this viewcontroller and still nothing. Theres nothing special about it compared to those that do work. I'm totally stuck now, anyone have ideas?

Sorry if im being vague, please ask for any details I've failed to note here.

Thanks Dean

iAnurag
  • 9,286
  • 3
  • 31
  • 48
Deano Roots
  • 313
  • 2
  • 9
  • remove any custom font if used and then try – Syed Faraz Haider Zaidi Sep 18 '15 at 11:02
  • Run it in instruments and see what's hogging the CPU. – David S. Sep 18 '15 at 11:35
  • That sounds like a deadlock of the main thread. Let it run and freeze, press pause in debugger and make a screenshot of active threads so we could see what leads to freeze or at least where it's lingering. – pronebird Sep 18 '15 at 11:51
  • I am facing a very similar issue after updating to the Xcode 7.0 my target device for test is on 8.2, the screen freezes after prepareForSegue. I have a UITextView along with some optional string properties on the destination controller. – runios Sep 18 '15 at 17:40
  • possible duplicate of [iOS 9 Segue Causes App To Freeze (no crash or error thrown)](http://stackoverflow.com/questions/32643765/ios-9-segue-causes-app-to-freeze-no-crash-or-error-thrown) – Iain McManus Sep 27 '15 at 09:38

1 Answers1

16

So after completely rebuilding the issue view controller i have identified the cause of the error. Very strange indeed, i have a UITextView on the View with default text of 'Notes...'......remove this and all works ok. Cant believe this is the cause but hey....Must be a bug in iOS9 where default text is placed in text view's via the storyboard.

Thought id place my findings incase someone else comes across similar problems

Deano Roots
  • 313
  • 2
  • 9
  • 1
    Good finding, should be marked as solution. And thanks Apple, you did it again. – user623396 Sep 18 '15 at 14:34
  • Deleting the default text in textView worked for me as well. Cheers! – runios Sep 19 '15 at 05:45
  • Is it only about UITextView? I have several UIView, UILabel, UITableView, UIImageView and UIButtons and facing the same issue! Any recomendations – Sibir Sep 28 '15 at 12:23
  • Ran into the exact same problem. I had a UITextView in one of view controllers and tried to custom present it and a sudden freeze. Then I removed text view and all works well again. – iltercengiz Oct 01 '15 at 06:02
  • This was crazy. I had a UITextView that was causing it to crash. Not linked to anything. Removed it and recreated from scratch, now it's working. Thanks for finding this. – fredley Dec 02 '15 at 13:54