title: Thread 0 crashed with ARM Thread State (64-bit)
body: <p>I submited my app to app store, they said its crash when app launch. But for my device adn in simulator its working fine. Not able to find whats the issues here.</p>
  
  <p>I attached the binary image with crash file what apple gave me.please let me know any 1 able to get the issue.</p>
  
  <p><a href="https://iosapps-ssl.itunes.apple.com/itunes-assets/Purple124/v4/2b/7e/75/2b7e75d2-24d4-fe5e-7b18-9ca81808d8af/attachment-6415446505809967987crashlog-B92E0899-EDF9-4439-A0EF-4BF24542CC44.txt?accessKey=1549044439_6721582845565142174_ouvIf55K9Cedf0AGMi9zncnlPnRXhr62gq28veHgiz%2BiU3ch9NpohN1%2FcSRBZt56rY2eYMBkyL%2BXE9bjTT%2FSII2kBWKOy6ifTo%2F074qaxxgaIycWVdQ4WPxciNe9pxyotBWBNQ6qFI%2BJlW%2BRAoAWivXvz1kUaFjBk9amhd20jOME6jmj0BbY3iQ71v36362amz0sneCc%2B4HI1gpAxyWGhj2hXzKzeSevNDYZfyxqSam8GK%2BHsEvsnXO90QHff2Oi" rel="nofollow noreferrer">Here is that crash file </a></p>
  
  <p>Thanks </p>
  
  <p><a href="https://i.stack.imgur.com/89imB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/89imB.png" alt="enter image description here"></a></p>
  
  <p>the crash showed here :</p>
  
  <pre><code>Thread 0 name:  Dispatch queue: com.apple.main-thread
  Thread 0 Crashed:
  0   WCi                             0x0000000100df0454 specialized closure #1 in MainScreenViewController.getAdressName(coords:) + 509012 (MainScreenViewController.swift:668)
  1   WCi                             0x0000000100e01ed4 partial apply for closure #1 in MainScreenViewController.getAdressName(coords:) + 581332 (MainScreenViewController.swift:0)
  2   WCi                             0x0000000100de0288 _T0SaySo11CLPlacemarkCGSgs5Error_pSgIegxx_So7NSArrayCSgSo7NSErrorCSgIeyByy_TR + 443016 (MainScreenViewController.swift:0)
  3   libdispatch.dylib               0x00000001d96596c8 0x1d95f9000 + 394952
  4   libdispatch.dylib               0x00000001d965a484 0x1d95f9000 + 398468
  5   libdispatch.dylib               0x00000001d96069a4 0x1d95f9000 + 55716
  6   CoreFoundation                  0x00000001d9bb0df4 0x1d9b05000 + 703988
  7   CoreFoundation                  0x00000001d9babcbc 0x1d9b05000 + 683196
  8   CoreFoundation                  0x00000001d9bab1f0 0x1d9b05000 + 680432
  9   GraphicsServices                0x00000001dbe24584 0x1dbe19000 + 46468
  10  UIKitCore                       0x0000000206b38c00 0x206250000 + 9341952
  11  WCi                             0x0000000100dbeba4 main + 306084 (AppDelegate.swift:23)
  12  libdyld.dylib                   0x00000001d966abb4 0x1d966a000 + 2996
  </code></pre>
  
  <p>so in my <code>MainScreenViewController.swift</code></p>
  
  <pre><code> func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
  
  
          if  firstload == false  {
              firstload = true
              firstTimeLoads = true
              currentlocation = locations.last!
              let cityCoords = CLLocation(latitude: currentlocation.coordinate.latitude, longitude: currentlocation.coordinate.longitude)
              let addresss = getAdressName(coords: cityCoords)
              self.userlat =  "\(currentlocation.coordinate.latitude)"
              self.userlong = "\(currentlocation.coordinate.longitude)"
              self.userDevice = "iOS"
              self.userName = Uname ?? "NA"
              self.userId = UId ?? "NA"
              self.userTime = time
  
  
              let camera = GMSCameraPosition.init(target: currentlocation.coordinate, zoom: 11, bearing: 0, viewingAngle: 0)
              passloc = String(format: "%f,%f", currentlocation.coordinate.latitude,currentlocation.coordinate.longitude)
              if let locationData = passloc {
                  self.movelocation = currentlocation
                  UserDefaults.standard.set(locationData, forKey: "storemyloc")
                  UserDefaults.standard.synchronize()
                  viewmap.animate(to: camera)
                  self.getAddressFromLatLon(location: currentlocation)
                  print("my address")
                  print(currentlocation)
  
                  print("LOG: LOCATION 1 \(searchlocation)")
                  if CLLocationCoordinate2DIsValid(self.searchlocation.coordinate) {
                      self.movelocation = self.searchlocation
                  } else {
                      self.runlink()
                  }
              }
          }
      }
  
  func getAdressName(coords: CLLocation) {
  
      CLGeocoder().reverseGeocodeLocation(coords) { (placemark, error) in
          if error != nil {
              print("Hay un error")
          } else {
  
              let place = placemark! as [CLPlacemark]
              if place.count &gt; 0 {
                  let place = placemark![0]
                  var adressString : String = ""
  
  
                  if place.locality != nil {
                      adressString = adressString + place.name! + " - "
                  }
                  if place.thoroughfare != nil {
                      adressString = adressString + place.subLocality! + ", "
                  }
  
                  if place.locality != nil {
                      adressString = adressString + place.subAdministrativeArea! + " - "
                  }
  
                  if place.country != nil {
                      adressString = adressString + place.country!
                  }
                 self.Userdic.setValue(adressString, forKey: "useraddress")
                  self.userAdd = adressString
              }
          }
      }
  }
  </code></pre>
  
  <p>whats might be the issues here for that crash ?   Cordinates - lat,long is not passed or issues is with <code>func getAdressName(coords: CLLocation)</code></p>