0

I ran into an extremely frustrating problem, and I've been struggling with this all afternoon, so please excuse me if I'm all little short in my explanation. My patience is at an extremely low level right now.

I want to pass a CLPLacemark object form one view controller to another when it segues, so in order to do that, I created a variable that keeps track of the most recently created placemark by CLGeocoder. The problem is that this seems to be impossible, since every time I try to assign something to the CLPlacemark variable I created, the app crashes. Here's the most frustrating part: EVERYTHING WORKS! The placemark that gets returned from the geocoder is NOT NIL and the placemark even gets assigned to the variable of my view controller (I checked my debugger at the time it crashes and when I po self.currentlyDisplayingPlacemark the newly created placemark is actually assigned to it. So again: everything works perfectly fine, and yet for some reason my app won't continue executing. What is going on here? What am I missing?

Here the app crashes:

And here you can see the placemark successfully got assigned to my variable:

Mark Carols
  • 403
  • 4
  • 20
  • Anything special about the currentlyDisplayingPlacemark variable? Doing anything in didSet, kvo or similar? What does the rest of the code in that method look like? – InsertWittyName Jun 29 '17 at 21:10
  • What is the exception message? Are you sure that that is the line it is crashing on? Have you tried setting an exception breakpoint? – Paulw11 Jun 29 '17 at 21:46

0 Answers0