Xpra: Ticket #2358: audio server test crash

Something X11 display related.

Traceback (most recent call first):
  File "/usr/lib64/python3.7/site-packages/xpra/sound/pulseaudio/pulseaudio_common_util.py", line 34, in get_x11_property
    root = X11Window.getDefaultRootWindow()
  File "/usr/lib64/python3.7/site-packages/xpra/sound/pulseaudio/pulseaudio_common_util.py", line 59, in get_pulse_id_x11_property
    return get_x11_property("PULSE_ID")
  File "/usr/lib64/python3.7/site-packages/xpra/sound/pulseaudio/pulseaudio_pactl_util.py", line 120, in get_pulse_id
    return get_pulse_id_x11_property()
  File "/usr/lib64/python3.7/site-packages/xpra/sound/pulseaudio/pulseaudio_pactl_util.py", line 195, in get_info
    "id"        : get_pulse_id(),
  File "/usr/lib64/python3.7/site-packages/xpra/server/mixins/audio_server.py", line 293, in init_sound_options
    pa_info = get_pa_info()
  File "/usr/lib64/python3.7/site-packages/xpra/server/mixins/audio_server.py", line 59, in setup
  File "/home/antoine/projects/Xpra/trunk/src/unittests/unit/server/mixins/servermixintest_util.py", line 86, in _test_mixin_class
  File "./unittests/unit/server/mixins/audio_test.py", line 31, in test_audio
    }, AudioMixin)
  File "/usr/lib64/python3.7/unittest/case.py", line 615, in run
  File "/usr/lib64/python3.7/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python3.7/unittest/suite.py", line 122, in run
  File "/usr/lib64/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python3.7/unittest/suite.py", line 122, in run
  File "/usr/lib64/python3.7/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python3.7/unittest/runner.py", line 176, in run
  File "/usr/lib64/python3.7/unittest/main.py", line 271, in runTests
    self.result = testRunner.run(self.test)
  File "/usr/lib64/python3.7/unittest/main.py", line 101, in __init__
  File "./unittests/unit/server/mixins/audio_test.py", line 39, in main
  File "./unittests/unit/server/mixins/audio_test.py", line 43, in <module>
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe9a63e06 in XDefaultRootWindow (dpy=0x555555893f90) at Macros.c:52
52	    return (RootWindow(dpy,DefaultScreen(dpy)));

Fri, 19 Jul 2019 10:26:39 GMT - Antoine Martin: status changed; resolution set

Tricky! This was a result of an old change where we removed the ability to connect to multiple X11 displays at the same time. The problem is that the unit tests create and destroy displays, and display contexts.

The bindings were made singletons, keeping hold of the X11 display until they are garbage collected on exit, but the X11 context they use may now get destroyed. What we really need is a way to invalidate the pointer we have handed over to the bindings...

But that's too hard to do, so r23193 just ensures we don't cache the display pointer in this particular case.

The only other place that is potentially problematic is X11XI2Bindings as used in xpra.platform.xposix.gui (as it is still cached there)

Sat, 23 Jan 2021 05:49:09 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2358