LXD, wine, windows app crash


I try to use LXD for installing wine and some windows application under a container in my 20.04 ubuntu machine. I have done the same procedure with the same windows application when I have ubuntu 16.04 and everything worked fine.
Now I get:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  3 (X_ShmPutImage)
  Value in failed request:  0x760
  Serial number of failed request:  524
  Current serial number in output stream:  565

The windows app starts and randomly after few or less seconds it crashes with the above message.
How I resolve the issue? I use the snap LXD installation in my 20.04 ubuntu while in 16.04 I used the apt installation (this is the only difference)


Maybe try setting QT_X11_NO_MITSHM=1 in your environment, that does the trick for QT based apps at least. There may also be a wine-specific equivalent for it.

QT_X11_NO_MITSHM, probably for QT applications similar to X11 java apps for disable shared memory. There is a patch for wine: https://bugs.winehq.org/attachment.cgi?id=59517&action=diff&context=patch&collapsed=&headers=1&format=raw. IPC mapping not good in lxd, shm seems mounted, i think that lxd need to ack verify the usage of mit-shm and disable it, I fix it