PyVirtualDisplay icon indicating copy to clipboard operation
PyVirtualDisplay copied to clipboard

Never clear values from _USED_DISPLAY_NR_LIST

Open coderforlife opened this issue 1 year ago • 3 comments

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).

coderforlife avatar Mar 11 '23 03:03 coderforlife

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

ponty avatar Mar 11 '23 15:03 ponty

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: @.***>

coderforlife avatar Mar 11 '23 20:03 coderforlife

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/

ponty avatar Mar 12 '23 06:03 ponty