# Geant4 crash when visualize

**URL:** <https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301>\
**Category:** Recording, Visualizing and Persisting Data\
**Created:** [November 20, 2022, 12:38pm UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301 "2022-11-20T12:38:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giannistsrb](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/giannistsrb/32/5431_2.png) [@Giannistsrb](https://geant4-forum.web.cern.ch/u/Giannistsrb)\
**Post date:** [November 20, 2022, 12:38pm UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/1 "2022-11-20T12:38:08Z")

</div>

Hello. I made a very simple program in geant4 (a cube filled with air) and when I visualize it, I get this:

 ![Screenshot from 2022-11-20 14-33-09](https://geant4-forum.web.cern.ch/uploads/default/original/2X/a/aabedd1ecac631cc78032e1dd3a29ef383bf2dda.png)  
The cube does not seem to be clear and except for that, the strange is that when I rotate the cube with my cursor, the whole pc crashes and I should restart it!!  
Help me please… Thank you.

---

<div class="post-metadata">

**Author:** ![allison](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allison](https://geant4-forum.web.cern.ch/u/allison)\
**Post date:** [November 20, 2022, 3:18pm UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/2 "2022-11-20T15:18:24Z")

</div>

Very curious! I’ve not seen that before.

Please tell us your operating system (Linux variety or Mac or Windows), the Geant4 version and the Qt version.

---

<div class="post-metadata">

**Author:** ![Giannistsrb](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/giannistsrb/32/5431_2.png) [@Giannistsrb](https://geant4-forum.web.cern.ch/u/Giannistsrb)\
**Post date:** [November 20, 2022, 3:25pm UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/3 "2022-11-20T15:25:12Z")

</div>

The very strange is that I tested it to other devices, and the simulation worked perfectly. Here are my specs:

OS: Ubuntu 22.04.1 LTS  
Geant4: 11.0.3  
Processor: AMD® Ryzen 5 5500u with radeon graphics × 12 (I updated the AMD graphics today)  
Graphics: AMD Renoir  
Qt version: Qt 5.15.3 (x86\_64-little\_endian-lp64 shared (dynamic) release build; by GCC 11.3.0) on “xcb”  
[linux version 5.15.0-53-generic]

Thank you for help. I am also working on it…

---

<div class="post-metadata">

**Author:** ![Hachiman512](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/hachiman512/32/6282_2.png) [@Hachiman512](https://geant4-forum.web.cern.ch/u/Hachiman512)\
**Post date:** [April 3, 2023, 7:26am UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/4 "2023-04-03T07:26:29Z")

</div>

Hello fellow,

I am also facing the same issue right now. are you able to solve this problem or not?  
I seriously got frustrated now with this issue. So, please reply ASAP if you have any input regarding this issue.  
Thanks

---

<div class="post-metadata">

**Author:** ![allison](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allison](https://geant4-forum.web.cern.ch/u/allison)\
**Post date:** [April 3, 2023, 8:41am UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/5 "2023-04-03T08:41:17Z")

</div>

Dear Anil/Hachiman512

I think you have posted your problem on another thread (Geometry, Fields and Transportation). It doesn’t help - it only confuses - if you post to more than one thread. It is not yet clear to me whether your problem is to do with visualisation or some other aspect of your code. Moreover, most of us respond to this forum on a best effort basis. I’m sorry you are “seriously frustrated” by your issue, but we will have a look at it as soon as we can. For myself, I have a meeting right now, and will respond to your posting on the other thread this afternoon, all being well. Maybe someone else will respond meanwhile.

John

---

<div class="post-metadata">

**Author:** ![allison](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@allison](https://geant4-forum.web.cern.ch/u/allison)\
**Post date:** [April 3, 2023, 8:43am UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/6 "2023-04-03T08:43:37Z")

</div>

Dear Giannistsrb

Picking up your message from last November…did you fix your problem?

John

---

<div class="post-metadata">

**Author:** ![Giannistsrb](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/giannistsrb/32/5431_2.png) [@Giannistsrb](https://geant4-forum.web.cern.ch/u/Giannistsrb)\
**Post date:** [April 3, 2023, 9:34am UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/7 "2023-04-03T09:34:23Z")

</div>

Yes, I fixed it. Tell me about your graphic’s card and ubuntu version you have.

---

<div class="post-metadata">

**Author:** ![Hachiman512](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/hachiman512/32/6282_2.png) [@Hachiman512](https://geant4-forum.web.cern.ch/u/Hachiman512)\
**Post date:** [April 3, 2023, 10:37am UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/9 "2023-04-03T10:37:24Z")

</div>

Yes, I have a dedicated NVIDIA graphic card and integrated amd card. I am listing details of both by using “lspci | grep VGA” command:

1. VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
2. VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c6)

Please suggest me something how did you solve this issue. I will be great help.  
I am also sharing my system details:  
OS: Ubuntu 22.04.2 LTS  
Geant4: 11.1.1  
Processor: AMD® Ryzen 7 4800hs with radeon graphics × 16  
Graphics: AMD Renoir and NVIDIA (I also mentioned it above).  
Qt version: Qt 5.15.3  
[linux version 5.19.0-38-generic]

---

<div class="post-metadata">

**Author:** ![Giannistsrb](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/giannistsrb/32/5431_2.png) [@Giannistsrb](https://geant4-forum.web.cern.ch/u/Giannistsrb)\
**Post date:** [April 3, 2023, 11:51am UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/10 "2023-04-03T11:51:32Z")

</div>

I have a suspicion that the problem is in the graphics card and the new version of ubuntu 22.04. There is no driver for AMD graphics in ubuntu 22.04 I think… Search in your ubuntu system if everything is ok about the graphics card.  
Because I faced this problem as well (in the past), I reinstalled the whole ubuntu system in a previous version (20.04) and it worked!!!  
It was not the code unfortunately. Something’s very wrong.  
So, if you can, reinstall ubuntu 20.04 focal fossa and geant4 again and tell us if it works… I think it will work like in my laptop… It worths the while for you to make a try.

\*\*\*Furthermore, the craziest thing was that when I was running the exampleB1 (before reinstalling the ubuntu), there was no problem and no crash while in the cube there was…! I can’t explain that…

---

<div class="post-metadata">

**Author:** ![Shiva\_Prasad\_Nayak](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/shiva_prasad_nayak/32/7713_2.png) [@Shiva\_Prasad\_Nayak](https://geant4-forum.web.cern.ch/u/Shiva_Prasad_Nayak)\
**Post date:** [March 9, 2024, 6:52am UTC](https://geant4-forum.web.cern.ch/t/geant4-crash-when-visualize/9301/11 "2024-03-09T06:52:19Z")

</div>

> [@System freezes while rotating the geometry in QT](https://geant4-forum.web.cern.ch/t/system-freezes-while-rotating-the-geometry-in-qt/11853/1):
>
> Hi all!!  
> I’m super new to Geant4 Simulation. I’m learning by watching a YouTube tutorial. I’m just making a simple box with some simple physics with it. While running that program in visualisation software my laptop freezes. I can’t rotate that plot. When I try to run an example (exampleB1) provided by Geant4 official it runs smoothly. So I guess something is wrong with my code maybe.

So the solution is to downgrade to ubuntu 20.04? Is there any way we can work on 22.04? By downgrading I will lose all my data so if any solution is there that’s be really helpful.

Thank you
