Closed yanpanlau closed 7 years ago
Are you able to reproduce this on 1.1.0?
Yes. I just re-install it via the following scripts:
git clone --branch 1.1.0 https://github.com/nadavbh12/Retro-Learning-Environment.git
cd Retro-Learning-Environment/
mkdir build && cd build
cmake -DUSE_SDL=ON -DBUILD_EXAMPLES=ON ..
make -j 4
cd ..
pip install .
What's your setup? Could you perhaps do a binary search and find the faulty commit causing the issue?
I am running Ubuntu 14.04 and compile under gcc 4.9
In order to test the setup, I also installed ZSNES and I can run the ROM successfully.
Can you advice how to do a binary search and how to find the faulty commit?
Since you got it to work under 1.0.2 I conclude there must have been a subsequant commit which broke it.
You can run git log
to view the latest commits.
Run git checkout <commit id>
to change to a previous commit. You can go back one by one and see which is the one the crashes. Or you can binary search through them to find it faster.
I did few more test
1) Neither RLE 1.0.2 or 1.1.0 works 2) The ubuntu emulator ZSENS works (works) 3) The another emulator retroarch works (works) 4) The ALE environments https://github.com/mgbellemare/Arcade-Learning-Environment.git (works) 5) From the debugger info, it seems it is related to the audio in RetroAgent.cpp (line 316) static size_t core_audio_sample_batch(const int16_t *data, size_t frames) {}
I have re-install it from fresh but it seems cannot solve the problem. Attached is my compile log file hope it can help you to find out the reason?
I see that you've named your ROM test.sfc.
RLE requires that the ROM name be identical to the ROM name as defined in the .h file (an error message was added catching this in a later RLE version). So for mortal kombat that would be mortal_kombat.sfc
.
Please try re-running this in version 1.0.2. It would also be better to run the sharedlibraryinterface example so we know the problem is within RLE or the emulator rather than with the Python interface.
Regarding 3. - which emulator did you use for SNES? If the above doesn't work, try using it with SNES9x2010.
Thanks for quick reply, here is how I run
./python_example.py Mortal_Kombat.sfc ../../snes9x2010/snes9x2010_libretro.so
I am using Ubuntu 14.04 in the previous setup
I just did a new test, I use another computer and re-format and install Ubuntu 16.04, and it works with RLE 1.0.2, but it won't work for RLE 1.1.0 or RLE 1.1.1
The error was like this (during pip install)
Processing /home/dickson/RLE
Installing collected packages: rle-python-interface
Running setup.py install for rle-python-interface ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-l48SiO-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qNFFnm-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON=ON
CMake Error: The current CMakeCache.txt directory /tmp/pip-l48SiO-build/build/CMakeCache.txt is different than the directory /home/dickson/RLE/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/tmp/pip-l48SiO-build/CMakeLists.txt" does not match the source "/home/dickson/RLE/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Error while running cmake
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-l48SiO-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qNFFnm-record/install-record.txt --single-version-externally-managed --compile" failed with error code 255 in /tmp/pip-l48SiO-build/
In the newest version (not sure if 1.1.0 or 1.1.1) you no longer need to run the build command (cmake + make), setup.py does that for you.
Remove CMakeCache.txt
and then run pip install .
again.
We are getting close. OK. On Ubuntu 16.04 + RLE 1.1.1 + Street Fighter II + USE_SDL == FALSE, it works!
./python_example.py Street_Fighter_II.sfc snes
But if I turn on the USE_SDL (to see the sound and graphics, I have the following error)
[Based upon the Arcade Learning Environment (A.L.E)]
[Powered by LibRetro]
Use -help for help screen.
terminate called after throwing an instance of 'std::runtime_error'
what(): The key sound you are trying to set does not exist.
Aborted (core dumped)
(I can see the video under RLE 1.0.2 with USE_SDL == True)
Well that seems to be a bug I found a few days back and forgot to push the fix. Sorry about that.
Hum...I tried the 7c6e062...but error remains the same
git clone https://github.com/nadavbh12/Retro-Learning-Environment.git
cd Retro-Learning-Environment/
sudo pip install --upgrade --no-deps --force-reinstall .
cd ~/Retro-Learning-Environment/doc/examples
./python_example.py Street_Fighter_II.sfc snes
R.L.E: Retro Learning Environment (version 1.1.1)
[Based upon the Arcade Learning Environment (A.L.E)]
[Powered by LibRetro]
Use -help for help screen.
terminate called after throwing an instance of 'std::runtime_error'
what(): The key sound you are trying to set does not exist.
Aborted (core dumped)
You're correct. I've updates the shared_library example but not the python example. Please try now after the newer fix.
I just tried the newer fix.
However, there is no video screen come out....
We are 99.9% there.....
Usually when using the Python interface the SDL screen isn't used. If you want to use it you can edit setup.py and add `-DUSE_SDL=ON' to the Cmake args.
Awesome! Finally it works!
Just curious, how to turn the sound on? It will be REALLY cool to have both screen and sound on at the same time
Glad to hear it finally worked out. We haven't implemented the sound yet, so I'm afraid it's not possible.
I just gave it another look and it turned out to be rather easy to implement. So you can now enable sound by settings 'sound' to true.
Awesome. I just test. It works perfectly! That's the best AI platform! wonderful work.
Hi, I got the following error when try to load the ROM, can you please assist? (FYI : can compile the code successfully using the branch 1.0.2)
Using gdb debugger I got the following extra information: