1

Currently i run into a problem i really don't understand, as its just a different string that should not change anything.

This one crashes my App

https://euw.api.pvp.net/api/lol/euw/v1.4/summoner/by-name/Jüjük?api_key=5c7d4d4f-f320-43d5-8647-643c9f6ee5de

This one works without any problems

https://euw.api.pvp.net/api/lol/euw/v1.4/summoner/by-name/smirknaitia?api_key=5c7d4d4f-f320-43d5-8647-643c9f6ee5de

Here is my Code:

    let url = NSURL(string: urlPath)
    let session = NSURLSession.sharedSession()
    let task = session.dataTaskWithURL(url!, completionHandler: {data, response, error -> Void in

        if (error != nil) {
            println(error)
        } else {
            let jsoneResult = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) as NSDictionary

            println(jsoneResult)

        }
    })

    task.resume()

It already crashes in let task0 = session0.dataTaskWithURL(url0!, completionHandler: {data, response, error -> Void in With the Error Message:

Thread1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

Any clue what brings causes the error and how to fix it?

Fabian Boulegue
  • 6,476
  • 14
  • 47
  • 72

0 Answers0