evogym-design-tool icon indicating copy to clipboard operation
evogym-design-tool copied to clipboard

X Error of failed request: BadMatch (invalid parameter attributes) when changing width of GUI

Open dmosher42 opened this issue 2 years ago • 1 comments

When I tried to change the width of the tools gui, the program would crash and I would get the following error:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  73 (X_GetImage)
  Serial number of failed request:  29533
  Current serial number in output stream:  29533
Segmentation fault

The solution I found is quite simple. In src/gui.py change

        self.width = mx//4

to

        self.width = mx

For me, this also had the added benefit that the tools gui would start at a width that showed all menu items.

dmosher42 avatar Jun 02 '23 23:06 dmosher42

I'm not 100% sure what causes this error. It appears to usually occur if the tool gui width is changed when it's too narrow to see all the gui elements.

dmosher42 avatar Jun 02 '23 23:06 dmosher42