PDC is crashing with NSInvalidArgumentException all the time on macOS

sw_vers
ProductName: macOS
ProductVersion: 15.4.1
BuildVersion: 24E263

  • pdc --version → 2.7.2

What I do: "pdc ." in my project directory with main.lua to get started

What I get:

pdc .
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
*** First throw call stack:
(
0 CoreFoundation 0x000000019c585df0 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000019c04ab60 objc_exception_throw + 88
2 CoreFoundation 0x000000019c4a2510 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 724
3 CoreFoundation 0x000000019c4a2210 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 52
4 pdc 0x00000001001a7b24 -[PlaydateConfig init] + 980
5 pdc 0x00000001001a7734 +[PlaydateConfig config] + 36
6 pdc 0x000000010017d4ec main + 148
7 dyld 0x000000019c08ab4c start + 6000
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort pdc .

There is a configuration file in your home directory that is . playdateconfig. It looks like that is misconfigured. The easiest thing to do to fix it is delete it and reinstall the SDK.

Helped! Thanks a lot!