You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: