# Add Data dialog box appears black the second time it's opened

**URL:** <https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277>\
**Category:** Support\
**Created:** [March 10, 2023, 1:48pm UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277 "2023-03-10T13:48:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ezemikulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ezemikulan/32/4850_2.png) [@ezemikulan](https://discourse.slicer.org/u/ezemikulan)\
**Post date:** [March 10, 2023, 1:48pm UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/1 "2023-03-10T13:48:22Z")

</div>

Hi, I’ve noticed that in versions starting from 5.0 in Linux (Ubuntu 22.04) the Add Data dialog box appears completely black the second time it is opened. I’ve tested it in 5.0, 5.2.1, 5.2.2 and 5.3 (preview). The first time it’s opened it works fine, but after closing and re-opening it doesn’t show anymore. If being opened by dragging and dropping a file, even though it is black the file will be opened after pressing enter, so the functionality is still there but just isn’t displaying correctly. In version 4.8 it works fine.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 10, 2023, 2:26pm UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/2 "2023-03-10T14:26:06Z")

</div>

Hmm, that’s odd. I mostly use Ubuntu 20.04 and have never seen that. Perhaps it’s a driver issue or something.

Maybe someone else can comment if they have seen similar issues?

---

<div class="post-metadata">

**Author:** ![ezemikulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ezemikulan/32/4850_2.png) [@ezemikulan](https://discourse.slicer.org/u/ezemikulan)\
**Post date:** [March 13, 2023, 9:36am UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/3 "2023-03-13T09:36:30Z")

</div>

Thanks for you reply. I updated the NVIDIA drivers to the latest version (525) on my computer (GeForce GTX 1070) and still have the issue. I also tried it on three other computers (2 desktops with HD Graphics 630 and a laptop with Iris XE) with freshly installed Ubuntu 22.04 (I had to install libxcb-xinerama0) and also found the same issue.

If there’s anything that I could try let me know. Thanks

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [March 13, 2023, 10:38am UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/4 "2023-03-13T10:38:11Z")

</div>

That’s strange. I can have a look in my systems and get back to you (and eventually open an issue if I can reproduce this behavior).

---

<div class="post-metadata">

**Author:** ![ezemikulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ezemikulan/32/4850_2.png) [@ezemikulan](https://discourse.slicer.org/u/ezemikulan)\
**Post date:** [March 13, 2023, 11:53am UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/5 "2023-03-13T11:53:12Z")

</div>

Thanks, I’ve found that the Python console shows this error four times when it fails to show the dialog box:

```auto
[Qt] QXcbConnection: XCB error: 8 (BadMatch), sequence: 7165, resource id: 94371965, major code: 130 (Unknown), minor code: 3

```

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [March 13, 2023, 12:30pm UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/6 "2023-03-13T12:30:25Z")

</div>

I can’t reproduce this error on my Ubuntu 22.04 (nvidia drivers). I have tried both latest stable and preview (are you running on Wayland?). I would think the best candidate for this problem is a dependent package missing :

1. Make sure you have all the dependencies required for Slicer installed ([Getting Started — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/user_guide/getting_started.html#debian-ubuntu))

2. If this does not work, I would suggest that you install the packages we normally use for development (this may pull whatever dependency is missing ([GNU/Linux systems — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/linux.html#ubuntu-21-10-impish-indri)), this is a difference between my Ubuntu 22.04 and a fresh install:

```bash
sudo apt update && sudo apt install git subversion build-essential cmake cmake-curses-gui cmake-qt-gui \
  qtmultimedia5-dev qttools5-dev libqt5xmlpatterns5-dev libqt5svg5-dev qtwebengine5-dev qtscript5-dev \
  qtbase5-private-dev libqt5x11extras5-dev libxt-dev libssl-dev

```

1. If none of these works. You can scan through ([Can't start latest stable on ubuntu 20.04 - #18 by manjula](https://discourse.slicer.org/t/cant-start-latest-stable-on-ubuntu-20-04/14029/18)), which was a long discussion around xcb-related problems. Perhaps some of the answer could be useful.

2. If none of this works, I could try to reproduce this in a fresh installation.

Let us know how this goes.

---

<div class="post-metadata">

**Author:** ![ezemikulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ezemikulan/32/4850_2.png) [@ezemikulan](https://discourse.slicer.org/u/ezemikulan)\
**Post date:** [March 13, 2023, 3:49pm UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/7 "2023-03-13T15:49:38Z")

</div>

Thanks for the suggestions. All computers were on X11 but one. I’ve now realized that the issue appears only if the Add Data dialog box is closed using the “x” from the window. If I load some data or if I close it using “Cancel” it works fine. I have all dependencies and installing the development packages didn’t fix it. I’ll have look at the link you provided.

Thanks again.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 13, 2023, 4:48pm UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/8 "2023-03-13T16:48:14Z")

</div>

You might also try building from source to see if this is an issue with the packages or something at the Qt or window manager level. You could also try different window manager environments to see if that makes a difference.

---

<div class="post-metadata">

**Author:** ![Suhaim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/suhaim/32/81421_2.png) [@Suhaim](https://discourse.slicer.org/u/Suhaim)\
**Post date:** [November 20, 2025, 7:02am UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/9 "2025-11-20T07:02:16Z")

</div>

Hi all,  
I am having the same issue with both Slicer built from source and the official pre-built binary. I followed the first two steps mentioned by @RafaelPalomar here :-

> [@RafaelPalomar](#):
>
> 1. Make sure you have all the dependencies required for Slicer installed ([Getting Started — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/user_guide/getting_started.html#debian-ubuntu))
> 2. If this does not work, I would suggest that you install the packages we normally use for development (this may pull whatever dependency is missing ([GNU/Linux systems — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/linux.html#ubuntu-21-10-impish-indri)), this is a difference between my Ubuntu 22.04 and a fresh install:
> 
> ```auto
> sudo apt update && sudo apt install git subversion build-essential cmake cmake-curses-gui cmake-qt-gui \
> qtmultimedia5-dev qttools5-dev libqt5xmlpatterns5-dev libqt5svg5-dev qtwebengine5-dev qtscript5-dev \
> qtbase5-private-dev libqt5x11extras5-dev libxt-dev libssl-dev
> 
> ```

This is my environment details :-  
Slicer version: 5.10.0  
Operating system: Ubuntu 22.04  
Desktop environment: ubuntu:GNOME  
Session type: x11  
GPU hardware: Mesa Intel® UHD Graphics (TGL GT1)

Steps to reproduce:

1. Open slicer’s pre-built binary or slicer built from source
2. Click on the “Data” widget
3. Close the window by clicking on “x“
4. Click on “Data“ widget again
5. The “Add Data” widget only has a blank black screen and the following errors are logged

Error log :  
`QXcbConnection: XCB error: 8 (BadMatch), sequence: 2194, resource id: 44040286, major code: 130 (Unknown), minor code: 3`  
`QXcbConnection: XCB error: 8 (BadMatch), sequence: 2197, resource id: 44040286, major code: 130 (Unknown), minor code: 3`  
`QXcbConnection: XCB error: 8 (BadMatch), sequence: 2213, resource id: 44040286, major code: 130 (Unknown), minor code: 3`  
`QXcbConnection: XCB error: 8 (BadMatch), sequence: 2214, resource id: 44040286, major code: 130 (Unknown), minor code: 3`  
`QXcbConnection: XCB error: 8 (BadMatch), sequence: 2235, resource id: 44040286, major code: 130 (Unknown), minor code: 3`  
`QXcbConnection: XCB error: 8 (BadMatch), sequence: 2241, resource id: 44040286, major code: 130 (Unknown), minor code: 3`

Was anyone able to find a solution for this?

---

<div class="post-metadata">

**Author:** ![Suhaim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/suhaim/32/81421_2.png) [@Suhaim](https://discourse.slicer.org/u/Suhaim)\
**Post date:** [November 20, 2025, 7:16am UTC](https://discourse.slicer.org/t/add-data-dialog-box-appears-black-the-second-time-its-opened/28277/10 "2025-11-20T07:16:04Z")

</div>

Found this post linking to the [tracked issue](https://github.com/Slicer/Slicer/issues/8579) :-

> [@The Add Data button is not working properly](https://discourse.slicer.org/t/the-add-data-button-is-not-working-properly/44557):
>
> So, when I click the Add Data button, it opens the file dialog box and I am able to load MRIs perfectly. But if I close the file dialog box without loading any MRML or MRI files and then try to open it again the file dialog box just goes full black and nothing is showing. The title bar of that window and the close button is working perfectly fine but it is not showing any files or folders to load. Just a black window. How can I fix it? Thanks for you help. (P.S This is problem exists in both pr…
