Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates a sequence of objc errors on macOs Big Sur #257

Open
ghost opened this issue Jan 17, 2021 · 0 comments
Open

Generates a sequence of objc errors on macOs Big Sur #257

ghost opened this issue Jan 17, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 17, 2021

For some reason, I'm facing this issue when I run main.py in PyCharm, no errors faced in macOs terminal, which is the subject and according to the complains here is due to added security to restrict multithreading in Mac OS High Sierra and above. Therefore one workaround is to disable the fork safety using an environment variable. I'm working on a fix and I will submit a PR when I'm done.

objc[7715]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7715]: +[__NSCFConstantString initialize] 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.
objc[7707]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7707]: +[__NSCFConstantString initialize] 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.
objc[7699]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7699]: +[__NSCFConstantString initialize] 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.
objc[7698]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7698]: +[__NSCFConstantString initialize] 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.
objc[7700]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7700]: +[__NSCFConstantString initialize] 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.
objc[7711]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7711]: +[__NSCFConstantString initialize] 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.
objc[7721]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7721]: +[__NSCFConstantString initialize] 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.
objc[7709]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7709]: +[__NSCFConstantString initialize] 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.
objc[7718]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7718]: +[__NSCFConstantString initialize] 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.
objc[7702]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7702]: +[__NSCFConstantString initialize] 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.
objc[7719]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7719]: +[__NSCFConstantString initialize] 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.
objc[7697]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7697]: +[__NSCFConstantString initialize] 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.
Traceback (most recent call last):
  File "/Users/emadboctor/Desktop/pytorch-a2c-ppo-acktr-gail/main.py", line 256, in <module>
objc[7713]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7713]: +[__NSCFConstantString initialize] 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.
    main()
  File "/Users/emadboctor/Desktop/pytorch-a2c-ppo-acktr-gail/main.py", line 36, in main
    envs = make_vec_envs(
  File "/Users/emadboctor/Desktop/pytorch-a2c-ppo-acktr-gail/a2c_ppo_acktr/envs.py", line 96, in make_vec_envs
    envs = SubprocVecEnv(envs)
  File "/usr/local/lib/python3.8/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 106, in __init__
    observation_space, action_space = self.remotes[0].recv()
  File "/usr/local/Cellar/[email protected]/3.8.7/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/usr/local/Cellar/[email protected]/3.8.7/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
    buf = self._recv(4)
  File "/usr/local/Cellar/[email protected]/3.8.7/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/connection.py", line 383, in _recv
    raise EOFError
EOFError
objc[7703]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[7703]: +[__NSCFConstantString initialize] 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.

Process finished with exit code 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants