-
Notifications
You must be signed in to change notification settings - Fork 185
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
PyCall does not close window correctly #808
Comments
The Python equivalent of the Julia snippet above would be
and that properly terminates the window. However, I think @bzinberg's comment is very interesting - from reading the external code and stepping through it with a debugger it indeed seems like the method currently does nothing and just allows begin_scene to overwrite the scene which is in direct conflict to what I've been told (but I should have known better and checked for myself). I will for now close this issue, since it is i) not clear there is a bug in PyCall and ii) since this might provide a good solution to the problem. Thank you, Ben - very helpful. And apologies for filing a most likely unnecessary bug report. |
I need to use Python bindings for a Unity 3D environment which provides explicit methods to start and end scenes. However, while the
end_scene()
method will close the opened window with the 3D environment under Python, when executed via PyCall from Julia the environment will just stay open. This is a major issue, since terminating the entire process and starting a new one would entail prohibitive overhead for thousands of scenes.I have built a minimal example. Unfortunately, it requires three files:
Note that these are from a well-known DARPA-affiliated company and the details are explained here, so there should be no security concerns about running it. [It is also fully public and I have explicit clearance to post the code below.] You need to make the first file executable (Linux binary!), extract the second file right next to it and finally extract the third archive somewhere. Afterwards please just adapt
scene_path
below to point to the file with the same name in extracted folder from the third file as well asmcs_executable_path
to point to the executable from file 1.Optional explanation: You do not need to point to the second file, since it is right next to the executable. If the executable
MCS-AI2-THOR-Unity-App-v0.0.10.x86_64
is in a folder, the folderMCS-AI2-THOR-Unity-App-v0.0.10_Data
extracted from file 2 needs to be right next to it in the same folder. That's all. [Also note that the solution is built in a convoluted way since that's what I had at hand - of course, you would do this in a singlevcat()
command in any production code.]As aforementioned, the last line should close the window and free the resources for that particular scene so I can start a second scene via
controller.start_scene(config_data)
, but instead the window remains open and occupies system resources thus preventing me from executing the thousands of scenes I need to run.Any ideas what could cause this or how I could solve this would be highly appreciated. Thank you in advance.
PS:
This is on Ubuntu 20.04.1 LTS (64 bit, 5.4.0-42-generic) with PyCall 1.91.4 and Julia 1.3.1.
The text was updated successfully, but these errors were encountered: