8

I am trying to make a simple game using SDL2 and C++ on Xcode 11.2.1; however, my progress has been stopped by an error.

All it takes to encounter these errors is simply initializing SDL. Just calling this function will cause the program to crash:

SDL_Init(SDL_INIT_EVERYTHING);

Giving these errors:

Westerino[16795:847932] Metal API Validation Enabled
Westerino[16795:848288] flock failed to lock maps file: errno = 35
Westerino[16795:848288] flock failed to lock maps file: errno = 35
Westerino[16795:847932] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x102157f00> F8BB1C28-BAE8-11D6-9C31-00039315CD46
Westerino[16795:847932]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
Westerino[16795:847932]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine

I have tried clearing the cache, cleaning the build, deleting the preferences, reinstalling the framework, etc. but nothing has helped yet.

It seems like these issues may have started when I updated Xcode, but I cannot confirm that.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Adam D
  • 81
  • 3
  • Would this be better off on the game development stack overflow? – Adam D Nov 21 '19 at 21:18
  • Googling around it looks like the `F8BB1C28-BAE8-11D6-9C31-00039315CD46` UUID & the `HALC_ShellDriverPlugIn` string indicates it might be audio-related; does init-ing only `SDL_INIT_VIDEO` change anything? Which version of macOS are you using? – genpfault Nov 21 '19 at 21:53
  • 1
    @genpfault I am using Mac OS Catalina 10.15.1. Using only `SDL_INIT_VIDEO` still causes the first three lines of errors and crashing. – Adam D Nov 22 '19 at 18:15
  • 1
    Are you using AudioKit, by any chance? I am seeing the same [plugin] and HALC_ messages in my AudioKit-based project. – B.T. Apr 12 '20 at 22:50

2 Answers2

1

The same issue here. I am also using Catalina 10.15.1 and XCode 11.2.1. Although, I managed to build and debug using CodeLLDB in VSCode. Also, turning off "C++: on throw" breakpoints helps to run the program without any pauses.

1

The message "Metal API Validation Enabled" is harmless and can be turned off easily. Go to Product/Scheme/Edit Scheme, click on the Diagnostics tab, and turn off the "Metal API Validation" option.

cigien
  • 57,834
  • 11
  • 73
  • 112
  • The Metal API Validation stuff is in the Options tab, not the Diagnostics tab, at least in my XCode 11.5. – jsbox Feb 06 '22 at 21:34