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

Swift EXC_BAD_INSTRUCTION

I try to code a game (i use this tutorial https://www.youtube.com/watch?v=LkYpoRj-7hA im new in Swift). Thats my Code so far: import UIKit class ViewController: UIViewController { //Image View @IBOutlet var ticTac_A01: UIImageView =…
user2996927
  • 29
  • 1
  • 3
0
votes
0 answers

NISession() returns error - Apple Nearby Interactions

I have downloaded the Nearby Interactions project that Apple released here. When I try to run the application I get this error I have not modified the original project and there is nothing in the ReadMe that details extra setup configuration. Only…
texasRanger009
  • 139
  • 1
  • 9
0
votes
1 answer

in a search field error Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

in a search field if I write in it gives me this error: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) If I type a comma, or a number (so the result is not there) the app works, but if I enter a letter (then find a result) the app…
devSwift
  • 1
  • 4
0
votes
1 answer

I am getting EXC_BAD_INSTRUCTION in NSUrlConnection sendSynchronousRequest

Exception generating code: NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; NSString* serverURL=getServerUrl(); NSData *postData = [NSJSONSerialization dataWithJSONObject:myPostDataNSArray options:0 error:nil]; [request…
0
votes
1 answer

What is causing a "EXC_Bad_Instruction" error in this code?

From my understanding, the error is coming from something being set to "nil". The only thing set to "nil" in my code is the userInfo which should be "nil" since there will never be any data there. Any help is appreciated! import UIKit class…
0
votes
1 answer

how to locate crash EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) in SwiftUI

I write a macOS app with SwiftUI, Xcode crashed at AppDelegate, but not crash every time. I have tried to add Exception Breakpoint, but it didn't work. The probably code as below var body: some View { ZStack { if…
Mingbao
  • 11
  • 4
0
votes
2 answers

Data.subdata(in:) results in EXC_BAD_INSTRUCTION

While trying to retrieve subdata of a Data object, the application crashes issuing the following error: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) Below you can see the code. It's a Data extension. Hope someone can explain…
Bram
  • 2,718
  • 1
  • 22
  • 43
0
votes
0 answers

VBA Copy Cell Value of *.XLS files Consolidated

I'm getting stuck atm with an excel vba macro. I like to do the following. A File is lying on a Network Drive. Ie. H:\Excel Files\LocationA\ In this folder are many Excel Files all are the same with diffrent data. I need to read out 2 Cell Values…
0
votes
1 answer

How to fix Zombie Object throwing 'EXC_BAD_INSTRUCTION' when calling show window

My program visualizes and graphs the currents of simulated neurons and how they interact. When we try to add more than two neurons to be visualized 2/3 times the program crashes with a EXC_BAD_INSTRUCTION error on the line which should show a window…
0
votes
1 answer

I am facing this error "exc_bad_instruction (code=exc_i386_invop subcode=0x0)"

I am running the following code and getting error in swift. func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell =…
user6305542
0
votes
0 answers

swift error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

I search for the error, but I doesn't find the answer I understand. I'm a newby to Swift, so please be kind. I get an error [Execution was interrupted] when I try to insert a name in a database. Opening the database and creating a table is no…
JosN
  • 1
  • 1
0
votes
0 answers

Getting a EXC_BAD_INSTRUCTION Error when deleting a tableview

My tableview currently looks like this. and here is the code for the cellForRowAtIndexPath func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell =…
A. G
  • 631
  • 2
  • 9
  • 19
0
votes
1 answer

EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) error loading from Bundle

I'm making a calc just for fun and I want to add a sound for when you press a button. The error is: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) On this line of code: let alertSound = URL(fileURLWithPath:…
0
votes
0 answers

SWIFT 3 Thread 1: EXC_BAD_INSTRUCTION(code=EXC_1386_INVOP,subcode=0*0)

let roupa1: [String: String] = ["ID": "H1", "Descricao": "Roupa bacana!", "Preco": "40$"] var roupasArray = [Dictionary()] roupasArray.append(roupa1) UserDefaults.standard.set(roupasArray, forKey: "Roupas") if let objecto =…
0
votes
1 answer

Swift Admob issue's Thread 1: EXC_BAD_INSTRUCTION

I've been working on the following problem for a couple of days now and I'm getting a little upset with it. So I have a project file https://github.com/PCmex/lift-side-memu-in-swift-3 and I successfully initiated Cocoapod with it. I followed the…
DeDe Schurk
  • 113
  • 11