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
4
votes
2 answers

EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP,subcode =0x0) on Swift when working with multi-dimensional arrays

I get this error when I try to create an array which contain arrays with enums. To illustrate better here's the code: let block1:Form[] = [Form.Circle, Form.Rectangle, Form.Triangle] let block2:Form[] = [Form.Rectangle, Form.Circle,…
3
votes
2 answers

Swift CoreData EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I'm trying to use CoreData but whenever I try to store an object, I have been getting the EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) error. What might be causing this error? As a side note, I did not initially create my project intending…
spotatoz
  • 151
  • 1
  • 1
  • 6
3
votes
1 answer

Fatal error: Range end index has no valid successor

So i have a problem using the Switch statement, when i used it with a range i get this "Fatal error: Range end index has no valid successor" in the console. var ArrayBytes : [UInt8] = [48 ,48 ,48] var SuperArrayMensaje : Array = [[UInt8]]() var…
3
votes
0 answers

Core Data Concurrency Debugging - exc_bad_instruction

I want to optimize Core Data and set the com.apple.CoreData.ConcurrencyDebug 1 flag. Now I get the exc_bad_instruction error for predicate. I didn't find enoght informations about it, only that can be the nil value, but I don't know how to fix it.
Nikita Ermolenko
  • 2,139
  • 2
  • 19
  • 41
3
votes
2 answers

EXC_BAD_INSTRUCTION (code = EXC_I386_INVOP, subcode=0x0)

I'm creating a temperature converter. When I run the application; enter a temperature, select which conversion and click convert. An error comes up. THE ERROR IS: EXC_BAD_INSTRUCTION (code = EXC_I386_INVOP, subcode=0x0) This is my code for…
Marcella Ruiz
  • 323
  • 1
  • 3
  • 15
3
votes
2 answers

Random number generate issue in swift language - EXC_BAD_INSTRUCTION

I tried to generate an array with strings in random order, but always got the error "Thread1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" at the end of function randomPile. Below is my code: import UIKit class RandomView:…
Peterxwl
  • 1,023
  • 3
  • 16
  • 24
2
votes
1 answer

SwiftUI :Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I am new in SwiftUI and I am currently developing my first big application.The program runs successfully in the simulator however the simulator screen is all white and I get the error: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP,…
iasonas zak
  • 35
  • 1
  • 6
2
votes
0 answers

EXC Bad Instruction Error Swift

I have an issue where I click on a tableviewcell and it is supposed to populate a detail view controller but when I click the cell this error pops up. import UIKit import Former import Parse import MapKit import Material import CoreLocation class…
Luc
  • 53
  • 6
2
votes
1 answer

Timestamp function that has been working reliably just caused EXC_BAD_INSTRUCTION

I have been using this function to generate a time stamp. I found it somewhere here on Stack Overflow. @objc public class var timestamp: String { return "\(Int(NSDate().timeIntervalSince1970 * 1000))" } It has been working without issue, but I…
Jeshua Lacock
  • 5,730
  • 1
  • 28
  • 58
2
votes
1 answer

Thread 1: EXC_BAD_INSTRUCTION (code=EXC_1386_INVOP,subcode=0x0)

So close to actually getting this app moving. There is just one more problem. Now, my app will run, and it will give me an error when the next view controller is trying to show. I am showing a ViewController with a quote and an author. I get this…
DrPepperGrad
  • 361
  • 1
  • 4
  • 17
2
votes
2 answers

Simple Swift Fibonacci program crashing (Project Euler 2)

I am trying to solve the second problem on Project Euler. The problem is as follows: Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21,…
makenaw
  • 21
  • 1
2
votes
2 answers

xcode swift won´t change label text

I have got two views. first ist "homeView" the second is "detailView". in homeView i have two buttons button1 button2 in detailView i have on label label1 when i push button1 the should change to "detailView" an the label1.text should be "button 1…
euleec7
  • 55
  • 1
  • 6
2
votes
3 answers

EXC_BAD_INSTRUCTION when i set UILabel title in Swift 2.0

I want to change the title of an UILabel, but I receive an EXC_BAD_INSTRUCTION error. My label was correctly connected to the storyboard and I don't understand why i have an error. Could anybody please point where I am wrong? Thank you for your…
RemyDCF
  • 364
  • 1
  • 4
  • 14
2
votes
1 answer

Error saving NSManagedObjectContext in swift

I'm using Xcodes auto generated code for a core data swift project which includes this function in the app delegate: func saveContext () { if let moc = self.managedObjectContext { var error: NSError? = nil if…
MathewS
  • 2,267
  • 2
  • 20
  • 31
2
votes
1 answer

Swift append to array gives me EXC_BAD_INSTRUCTION EXC_l386_INVOP on 32-bit systems

So I'm trying to parse a String and fill an Array with each characters casted as String and I'm also removing white spaces. Here's a part of the code: class KeyboardView: UIView { var answer: AnyObject? var keyboardLetters = [String]() …
Skoua
  • 3,373
  • 3
  • 38
  • 51
1
2 3 4 5 6 7