运行时报错

may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

解决方案

添加环境变量: 点击窗口上的Run->Edit Configurations...->Environment variables->点击输入栏后的文件夹图标,

添加内容,key: OBJC_DISABLE_INITIALIZE_FORK_SAFETY, value: YES.

完整示例, OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

相关文章:

  • 2021-09-27
  • 2022-12-23
  • 2021-11-01
  • 2021-12-24
  • 2022-12-23
  • 2021-07-02
  • 2021-07-28
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2022-12-23
  • 2021-12-11
  • 2021-07-23
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案