ponty / PyVirtualDisplay

Python wrapper for Xvfb, Xephyr and Xvnc
BSD 2-Clause "Simplified" License
697 stars 78 forks source link

Never clear values from _USED_DISPLAY_NR_LIST #83

Open coderforlife opened 1 year ago

coderforlife commented 1 year ago

When a display is stopped, it isn't removed from _USED_DISPLAY_NR_LIST. If displays are continuously started and stopped, this will eventually become impossible to get displays from.

(I have a server that is rendering things on-demand with workers that last a long time).

ponty commented 1 year ago

Do you run it on macOS? If yes, what is your XQuartz version?

coderforlife commented 1 year ago

No, on Linux. But I am ultimately created new displays fairly regularly and the services are running for months before restarting.

On Sat, Mar 11, 2023 at 10:18 AM ponty @.***> wrote:

Do you run it on macOS? If yes, what is your XQuartz version?

— Reply to this email directly, view it on GitHub https://github.com/ponty/PyVirtualDisplay/issues/83#issuecomment-1464933002, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALXNGCKLG4XKI4YQCD2HATW3SJS7ANCNFSM6AAAAAAVXHOGRI . You are receiving this because you authored the thread.Message ID: @.***>

ponty commented 1 year ago

I fixed it, but can you help with your setup? Distro version, Xvfb -help, Xvfb version. _USED_DISPLAY_NR_LIST is only used when -displayfd command line option is not available which was added to Xvfb in 2012. Do you have a very old system? How is it possible that you don't have -displayfd?

Additional info from README:

"Recent X servers as of version 1.13 (Xvfb, too) support the -displayfd command line option: It will make the X server choose the display itself" https://stackoverflow.com/questions/2520704/find-a-free-x11-display-number/

Version 1.13 was released in 2012: https://www.x.org/releases/individual/xserver/