GTK apps are breaking this because at-spi2-core is calling XCloseDisplay, not because of XGetWindowProperty.
I tried commenting (https://git.gnome.org/browse/at-spi2-core/tree/atspi/atspi-misc.c#n1456, XGetWindowProperty call) and this bug still occurred. Then I tried commenting (https://git.gnome.org/browse/at-spi2-core/tree/atspi/atspi-misc.c#n1462, XCloseDisplay call) and it allows GTK apps to run without crashing XMir.
Aside, to run GTK apps under XMir, pass the display name as a command line argument (--display :1) instead of setting DISPLAY/AT_SPI_DISPLAY.
GTK apps are breaking this because at-spi2-core is calling XCloseDisplay, not because of XGetWindowProperty.
I tried commenting (https:/ /git.gnome. org/browse/ at-spi2- core/tree/ atspi/atspi- misc.c# n1456, XGetWindowProperty call) and this bug still occurred. Then I tried commenting (https:/ /git.gnome. org/browse/ at-spi2- core/tree/ atspi/atspi- misc.c# n1462, XCloseDisplay call) and it allows GTK apps to run without crashing XMir.
Aside, to run GTK apps under XMir, pass the display name as a command line argument (--display :1) instead of setting DISPLAY/ AT_SPI_ DISPLAY.