ViZDoom
ViZDoom copied to clipboard
Controlled ViZDoom instance exited unexpectedly
Full error:
/home/anaconda3/envs/tf_gpu/lib/python3.6/site-packages/vizdoom/vizdoom: symbol lookup error: /home/anaconda3/lib/libpangoft2-1.0.so.0: undefined symbol: hb_font_set_variations
---------------------------------------------------------------------------
ViZDoomUnexpectedExitException Traceback (most recent call last)
<ipython-input-3-76610cdaebbf> in <module>
----> 1 game.init()
ViZDoomUnexpectedExitException: Controlled ViZDoom instance exited unexpectedly.
Running:
- Python 3.6.9 on a clean Anaconda3 environment
- 16.04.1-Ubuntu
I found this older issue #34 mentioning the same error, the solution, however, never got published by the user.
This error can stem from any number of causes, as it just generally means the vizdoom binary died all the sudden. Here are some suggestions that could work:
- Try older versions of ViZDoom.
- Make sure the minor (the last digit) version of Python is correct. It may allow importing ViZDoom when first two digits match, but crash upon init.
- What I gather from #34, the binary was linked to incorrect versions of some libraries (e.g. it was loading libraries that it was not built against). I assume this could happen with environments where vizdoom loads some libraries from env and others from OS. Checking that those check out could work.
- If possible, try without anaconda/conda/envs. These have been known to cause issues in the past (e.g. #370 #275)
Unfortunately not using anaconda is not an option for me. I ended up moving /home/anaconda3/lib/libpangoft2-1.0.so.0
to a temporary folder. It works without issue now.
I have the same problem with python3.7.7 and vizdoom1.1.7, any update?
I have the same problem with python3.8.8 and vizdoom1.1.9, any update?
@Waterkin Can you share more details?
- Which code did you try to run?
- What kind of system are you running (OS, library versions, etc)
@Miffyli I tried to import vizdoom in Pycharm on Mac, but the error indicated that I didn't download the .wad file. And just now I successfully debuged it. I put freedoom1.wad to directory /Library/Application Support/(underline)vizdoom which I created. The question is: the error told me to create a directory /Library/Application Support/vizdoom and the "underline" was not mentioned in the feedback. Except for this, Python 3.8.8 vizdoom 1.1.8 cannot be opened in Pycharm or Console on Mac as it said "The interpreter is 3.8.8 but the interpreter vizdoom was compiled with was 3.8.5".
Ah gotcha! Sadly I am not a mac person so can not comment on the bugs too much (sounds like you found something that needs to be better documented, so a PR to adjust for that would be very welcome!)
The pre-compilation thing is a known-ish issue: the pre-built binaries only work on a very specific version of Python. On Mac and Linux I highly recommend building the packages yourself: https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md#macos_build . Make sure the interpreter used by pycharm is the same you installed vizdoom on.
Ok thanks a lot. I am still learning to use Github. Happy to PR for that.
Hi @Waterkin, could you tell me how have you installed ViZDoom? From source? Using pip install
? And how are you trying to import it? There is no precompiled version of ViZDoom for Mac,pip install
basically builds it using available Python and C++ compiler during the setup.