0

I just add the text field as a search bar, didn't set any delegate or other stuff. I change the App language and after reloading the view just tap on the text field app gets crashed.

Xcode console shows. invalid mode 'kCFRunLoopCommonModes' provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. This message will only appear once per execution. 2022-02-09 08:57:03.357146-0500 NXO - TASC Towers[3082:658326] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'

Don't know where it getting out of the index. Please help me if you can.

enter image description here

  • Add exception breakpoint in the Xcode – Cy-4AH Feb 09 '22 at 15:16
  • How do you initialise text field ? From storyboard or xib or code ? If storyboard , did you localised it ? – Ptit Xav Feb 09 '22 at 16:54
  • @Cy-4AH yes for debugging I added exception and symbolic breakpoints but not get exact point. – syed aurangzaib Feb 13 '22 at 10:59
  • @PtitXav Yes I'm using storyboard, yes I tested it with and without localization also, and also try to remove outlet and comment all the code related it. But the thing is this crash happened on every text field not only one. – syed aurangzaib Feb 13 '22 at 11:01
  • @syedaurangzaib Did you find the any solution for this issue as I am also facing the same issue – Sujit Baranwal Nov 06 '22 at 19:19
  • 1
    @SujitBaranwal Yes, In my case I was applying Translation for Arabic updating semantics when app loading. It was crashing in later OS versions. Apple updated some view hierarchy settings like the NavigationBar, tabbar also sceneDelegate and access window are different now. My understanding, I was updating view using older implementations even those not available in later versions. Then, I updated implementation, like get window, redraw view again once semantic change is required and update view. Probably got it, Now, debug point to point and find those lines of code and update. – syed aurangzaib Nov 07 '22 at 11:33

0 Answers0