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
2
votes
1 answer

Error when getting plist data after writing value to it

I am trying to make a plist file to share data between my SKScene and settings view controller. Since I allow the user to access the settings any time during the game, if the user made any changes, I always get data from the plist file b4 starting…
junyi00
  • 792
  • 3
  • 8
  • 28
2
votes
1 answer

How to pull random item out of an array in Swift?

I'm trying to pull a random item out of an array. When I run, it works about 50/50 between pulling a random item and giving me this error "EXC_BAD_INSTRUCTION". Any idea what's going on? Right now my code looks like this: BEFORE Solution func…
Justin Cabral
  • 565
  • 1
  • 6
  • 20
2
votes
0 answers

dispatch_group EXC_BAD_INSTRUCTION

I'm getting a weird EXC_BAD_INSTRUCTION crash when I'm using dispatch_group_t. I'm using MagicalRecord and my success block gets triggered after a MagicalRecord save. My dispatch_group_leave(group) line crashes if there are no changes to save -…
coder
  • 10,460
  • 17
  • 72
  • 125
1
vote
0 answers

AVAssetExportSession through EXC_BAD_INSTRUCTION

I'm working on an image to video slideShow project. I have several transition effect on my project. I'm using the AVFoundation library but the transition is not working on iOS 14. When I call exportAsynchronously(completionHandler:{}} it throws…
1
vote
1 answer

Index Beyond Bounds / EXC_BAD_ACCESS upon Core Data Delete SwiftUI

I'm getting a Index Beyond Bounds error and a Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT) when trying to delete a Core Data index in SwiftUI. Basically, I have a Core Data entity (Dates), containing only a date attribute (Constraint - String).…
VincentBee
  • 67
  • 6
1
vote
1 answer

SwiftUI EXC_BAD_INSTRUCTION when filtering and mapping Array

I have an Entity called Lessons, which consists of: @NSManaged public var timeMinutes: Double @NSManaged public var id: UUID @NSManaged public var lessonDescription: String @NSManaged public var date: Dates The 'date' attribute is linked with a…
VincentBee
  • 67
  • 6
1
vote
0 answers

Cocoa archived app crashing

I am new in archiving app for testing/distribution. My MacOS cocoa app crash only when built as an archive. Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: …
Béatrice Cassistat
  • 1,048
  • 12
  • 37
1
vote
2 answers

Swift: app crashes with EXC_BAD_INSTRUCTION error?

At this point in the quiz, the app is supposed to calculate the final score. At the moment, it crashes after selecting an answer on the final question, with the title error appearing on the third line: var score = 0 for question in…
sheishistoric
  • 85
  • 1
  • 9
1
vote
1 answer

Exception: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) using C++

The problem is as the picture shows vector printMatrix(vector > matrix) { if (matrix.empty()) { return vector(); } this->matrix = std::move(matrix); int startRow = 0, lastRow = this->matrix.size() - 1; …
zengtong
  • 23
  • 1
  • 4
1
vote
2 answers

trying to understand this random error i get //swift

class Personnage { var vie = arc4random_uniform(10) + 1; var force = arc4random_uniform(8) + 1; var chance = arc4random_uniform(2); func attaquePar(joueur1:Personnage) ->String { var differenceForce = self.force -…
Airseb
  • 13
  • 2
1
vote
1 answer

Swift Error - Thread1: EXC_BAD_INSTRUCTION

I'm getting a Thread1: EXC_BAD_INSTRUCTION (code=EXC_1386_INVOP,subcode=0x0) after running my code in Xcode 9. The code works fine in Xcode 8. class func loadDataFromURL(_ url: URL, completion:@escaping (_ data: Data?, _ error: NSError?) -> Void)…
Julia
  • 1,207
  • 4
  • 29
  • 47
1
vote
1 answer

delegate = self causes Thread 1: exc_bad_instruction (code=exc_i386_invop subcode=0x0)

@IBOutlet weak var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() tableView.delegate = self // error occurs here }
1
vote
1 answer

Pass Data from Class to Class

So I'm trying to program an "Mad Lib" themed app for a class I'm in but I keep getting a EXC_BAD_INSTRUCTION error when I hit the submit button. The other students in the class couldn't figure it out either. Please help me! Here is my…
1
vote
0 answers

Bad Instruction when forcing landscape orientation, error arrived when updating to Xcode 8.2.1

When I updated my app to Xcode 8.2.1 I received a lot of new errors that I didn't have before. I was able to successfully fix most of them but I still have one error that I am struggling with. Whenever I press a button that is supposed to open up…
zach2161
  • 113
  • 11
1
vote
2 answers

Python multiprocess plot issue in Mac OSX Sierra - exception type EXC_BAD_INSTRUCTION

I've developed a GitHub repo with an example of a multiprocess script in python2.7 for plotting. Basically, the script allocates one process to generate the data, and such data are passed via a queue to a second process that is responsible to…