AddInstanceForFactory & HALC_ShellDriverPlugIn errors when using SDL2 with Xcode?
Asked Answered
I

2

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.

Islean answered 21/11, 2019 at 20:37 Comment(4)
Would this be better off on the game development stack overflow?Islean
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?Florina
@Florina I am using Mac OS Catalina 10.15.1. Using only SDL_INIT_VIDEO still causes the first three lines of errors and crashing.Islean
Are you using AudioKit, by any chance? I am seeing the same [plugin] and HALC_ messages in my AudioKit-based project.Fellows
C
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.

Centralization answered 26/11, 2019 at 8:26 Comment(0)
B
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.

Boo answered 27/11, 2021 at 21:41 Comment(1)
The Metal API Validation stuff is in the Options tab, not the Diagnostics tab, at least in my XCode 11.5.Radome

© 2022 - 2024 — McMap. All rights reserved.