Why do I keep getting this error

Just wondering why when I try to run my apps this happens (I'm relatively new to swift)

Answered by Claude31 in 713982022

Could you show more of the crash log ?

Did you notice where it crashes (call stack). If so, please show code.

You have a segmentation fault. This may be due to a missing or corrupted IBOutlet connection.

Log shows you are running MacOS 12.0.1. You'd better update to 12.3 at least.

Accepted Answer

Could you show more of the crash log ?

Did you notice where it crashes (call stack). If so, please show code.

You have a segmentation fault. This may be due to a missing or corrupted IBOutlet connection.

Log shows you are running MacOS 12.0.1. You'd better update to 12.3 at least.

Thanks for your help just updating and will let you know how that goes.

Hi sorry to be a pain

No worry.

  • First, try a Clean Build Folder (Product Menu)

If not enough:

  • Look at issue Navigator. What do you see ?

Then, in the ViewCOntroller that is indicated, check all IBOutlet connections.

  • the best is to disconnect every IBOutlet
  • in storyboard, select the object, open the link inspector (extreme right icon of inspector panels)
    • the circle in code should turn from black to white in front of the IBOutlet
  • reconnect
  • do a clean build folder (in case)
  • Try to run…

Another possible cause may be an object created without a frame, such as:

let view = UIView()

you should create with:

let view = UIView(frame: someCGRect)
Why do I keep getting this error
 
 
Q