<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Am 27.02.21 um 14:23 schrieb Iurie
      Nistor:<br>
    </div>
    <blockquote type="cite"
      cite="mid:b1817e12-3927-3ea8-1eab-8480c458b994@gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hi,</p>
      <p>My developed plugin is based on another own develop GUI toolkit
        that uses XLib. In Ardour<br>
      </p>
      if I am opening two plugins UI and than close then one after
      another the host will crash because<code> it receives an X Window
        Error.</code> It might be that I am doing something wrong but it
      crashes because I am calling XCloseDisplay every time the plugin
      UI is closed. The display, i.e. the connection with the X sever is
      created<i> </i>with XOpenDisplay(NULL) every time the UI is
      opened. The interesting fact is that it crashes only when the
      second time XCloseDisplay is called. I thought that maybe I am
      closing twice<br>
      <p>the same connection but not. Also, I cannot experience this
        problem with hosts like QTractor (Qt based), zrythm (GTK based),
        and MusE (Qt based). I could dig more into the problem but maybe
        someone knows why this might happen?</p>
      <br>
    </blockquote>
    <p>Hi</p>
    <p>This may happen when you use a shared pointer in your toolkit. <br>
    </p>
    <p>Make sure that in your toolkit every instance use it's own
      pointer to store the Display in use.<br>
    </p>
  </body>
</html>