Questions tagged [exc-bad-instruction]

EXC_BAD_INSTRUCTION is an exception that happens when you try to execute an instruction the CPU doesn't support.

EXC_BAD_INSTRUCTION is an exception in Objective C, which usually occurs when an object has been released before usage, or if the project is running a vector extension which is not supported on the CPU where it is being compiled.

105 questions
1
vote
2 answers

Swift Google Directions API JSON - EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I am trying to get directions data using Google API, but it's keep crashing. Here is my code: let baseURLDirections = "https://maps.googleapis.com/maps/api/directions/json?" var selectedRoute: Dictionary! var overviewPolyline:…
S. Park
  • 139
  • 1
  • 2
  • 9
1
vote
1 answer

Swift Extension exception Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I have tried to do an extension to NSDate. What I wanted is a flag indicating if the NSDate has to be removed later So I have tried this in playground //: Playground - noun: a place where people can play import UIKit var str = "Hello,…
John B.
  • 682
  • 1
  • 11
  • 22
1
vote
1 answer

SpriteKit Unwrapping Optional Error (Swift)

Whenever I run my project, I get a bad instruction error on the line... ground.physicsBody!.dynamic = false Here is the full code I am running to go with this snippet. I'm not sure what is happening and I don't have a lot of experience with…
1
vote
0 answers

thread1: exc_bad_instruction on swift

I do have error Thread1: EXC_BAD_INSTRUCTION. Been trying very hard on this. Any helpful personnel out there? import UIKit import AVFoundation class PlaySoundsViewController: UIViewController { var filePathUrl: NSURL! var audioPlayer:…
CherChuan
  • 33
  • 5
1
vote
1 answer

Exc_bad_instruction with SWRevealViewController

Background My app has one MainViewController with a UIButton which leads to another ViewController when pressed. In the second ViewController is a UIBarButtonItem which has a "Back" segue to the MainViewController. Everything has worked fine, until…
1
vote
1 answer

AVAudioPath not working - Swift

I am trying to play a song based on the instrument the user selects. Here is my code: @IBAction func play(sender: AnyObject) { if isPlaying == false { player.play() isPlaying = true } } @IBAction func stop(sender: AnyObject)…
Pranav Wadhwa
  • 7,666
  • 6
  • 39
  • 61
1
vote
1 answer

Retrieving data from Parse.com (Swift)

I am attempting to fetch data from an object created on Parse.com into a custom cell that contains labels and images. The code I implemented thus far runs but my tableview remains empty and at runtime displays the following error. ERROR: Thread 1:…
1
vote
0 answers

Select Video from Library but Cannot Choose Swift

I am trying to allow users to upload video to there profile. Users are able to choose videos from there phone but after clicking the choose button of the video, the app crashes and you get a fatal error: unexpectedly found nil while unwrapping an…
pengcheng95
  • 292
  • 4
  • 13
1
vote
1 answer

iOS - Xcode Thread 1 EXC_BAD_INSTRUCTION

When I run my app and try to press button DONE I see: Thread 1 EXC_BAD_INSTRUCTION. Here is the code: import UIKit class DeveloperViewController: UITableViewController { @IBAction func…
1
vote
1 answer

Swift Xcode "EXC_BAD_INSTRUCTION"

when I try to run my game I get this fatal error: unexpectedly found nil while unwrapping an Optional value with the Thread error EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" This happens on this line of code HighscoreLbl.text =…
Cseal69
  • 159
  • 1
  • 2
  • 10
1
vote
1 answer

Swift error : class RecordSoundsViewController has no initializers

class RecordSoundsViewController: UIViewController, AVAudioRecorderDelegate{ @IBOutlet weak var recordButton: UIButton! @IBOutlet weak var recodinginProgress: UILabel! @IBOutlet weak var stopButton: UIButton! var audioPlayer: AVAudioPlayer! var…
Alan Isaac
  • 11
  • 2
1
vote
3 answers

EXC_BAD_INSTRUCTION upon pressing a button

I'm newbie in Swift and I'm currenlty trying to learn it but I faced a mystery issue. As you can see in the image below, there are some controls that are linked properly to this View Controller and upon pressing a button in the UI we execute this…
Maystro
  • 2,907
  • 8
  • 36
  • 71
1
vote
1 answer

iOS Swift - EXC_BAD_INSTRUCTION on certain devices

I'm very new to Swift and iOS development but I've come across a bug that is causing my app to crash when running on the following devices: iPhone 4S iPhone 5 iPad 2 iPad Retina Here is the code that is being flagged up: // bin2dec - converts binary…
SimonTheEngineer
  • 733
  • 1
  • 7
  • 19
1
vote
2 answers

Swift: error when trying to communicate with web API

I am trying to build a really basic iOS app using Swift - this is my first time doing so. Whilst the majority of it has been really straight forward. I have had a total nightmare getting the app to talk to my API, or any site in general! This is…
1
vote
3 answers

EXC_BAD_INSTRUCTION with Swift UIButton

I am using below code in a function to handle all UIButtons in my View and it works fine when all the objects in the View are UIButton. for v in self.mainView.subviews as [UIButton] { println (v.tag) } But in case there is any other objects…
Adaoli
  • 27
  • 1
  • 5