Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AddInstanceForFactory & HALC_ShellDriverPlugIn errors when using SDL2 with Xcode?

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.

like image 278
Adam D Avatar asked Nov 21 '19 20:11

Adam D


2 Answers

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.

like image 190
Vadim Melnicuk Avatar answered Sep 20 '22 16:09

Vadim Melnicuk


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.

like image 20
Chris Mason Avatar answered Sep 19 '22 16:09

Chris Mason