2

I'd had a report from a user that my app opens up, gets to the launch screen, and then crashes. He's from portugal on a iPhone 5 running iOS8. Here's his crash log - http://justpaste.it/j36w

This is my first iOS app so I'm having trouble understanding this. I see the exception that caused the crash - EXC_BREAKPOINT (SIGTRAP), but I don't really understand how.

My first thought was it had something to do with localizing the strings, but he said his phone was in english. Any ideas?

Edit: http://justpaste.it/j3jy

Edit2:

func createBarArray(townName: String, dict: NSDictionary) -> NSMutableArray{

    var barArray = dict[townName] as NSArray
    var bars = [] as NSMutableArray

    // Get day of the week
    let dateFormatter = NSDateFormatter()
    dateFormatter.dateFormat = "EEEE"
    let dayOfWeekString = dateFormatter.stringFromDate(NSDate())

    for bar in barArray{
        var name = bar["name"] as NSString
        var dealsArr = bar[dayOfWeekString] as NSArray
        var deal = dealsArr[0] as NSString
        var lat = bar["lat"] as Double
        var long = bar["long"] as Double
        var negLong = -long

        var newBar = BarAnnotation(latitude: lat, longitude: negLong, name: name, deal: deal)

        switch(townName){
            case "amesBars":
                newBar.town = "Ames"
            case "cedarFallsBars":
                newBar.town = "Cedar Falls"
            case "iowaCityBars":
                newBar.town = "Iowa City"
            default:
                newBar.town = ""
        }

        bars.addObject(newBar)
    }

    return bars
}
leerob
  • 2,876
  • 1
  • 18
  • 38
  • 2
    The first thing you should try is [to symbolicate the crash log](http://stackoverflow.com/questions/25855389/how-to-symbolicate-crash-log-xcode-6) . Once this is done, the exact place and reason of the error should be more obvious. If not, please post here your symbolicated crash log – Emilie Jan 26 '15 at 18:04
  • Well, it crahses in tabsaver with a SIGTRAP which usually indicates a wrong memory access. – qwerty_so Jan 26 '15 at 18:11
  • I added the symbolication. – leerob Jan 26 '15 at 18:14
  • It's crashing in the createBarArray method, what is this? – Steven Ritchie Jan 26 '15 at 18:46
  • Added to main post. It takes a JSON dictionary it creates an array of my custom annotation objects for the map. – leerob Jan 26 '15 at 19:29
  • I believe JSON answers are always optional. Maybe unwrapping the fields? – Tokuriku Jan 26 '15 at 21:15

1 Answers1

0

Steps -

  1. Get .app file
  2. Get .dSYM file
  3. Get the address from the crash report
  4. Run xcrun atos -o MYAPP.app/MYAPP -arch arm64 -l 0x1000f4000 0x00000001002162c8

For better understanding check this article out.

Nikhil Manapure
  • 3,748
  • 2
  • 30
  • 55