# Precompiling Mousetrap fails on Ubuntu with NVidia driver

**URL:** <https://discourse.julialang.org/t/precompiling-mousetrap-fails-on-ubuntu-with-nvidia-driver/103945>\
**Category:** General Usage\
**Tags:** question, package, mousetrap\
**Created:** [September 17, 2023, 10:07am UTC](https://discourse.julialang.org/t/precompiling-mousetrap-fails-on-ubuntu-with-nvidia-driver/103945 "2023-09-17T10:07:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 17, 2023, 10:07am UTC](https://discourse.julialang.org/t/precompiling-mousetrap-fails-on-ubuntu-with-nvidia-driver/103945/1 "2023-09-17T10:07:54Z")

</div>

I have the following issue:

```julia
julia> using Mousetrap
[Info: Precompiling Mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e]

[25147] signal (11.1): Segmentation fault
in expression starting at /home/ufechner/.julia/packages/Mousetrap/k0X9u/src/Mousetrap.jl:39
gdk_x11_surface_get_xid at /home/ufechner/.julia/artifacts/5498f875c31a1b3422ce1b64ef770407109eff30/lib/libgtk-4.so (unknown line)

```

I already reported this as bug, [On Ubuntu 22.04 with Nvidia driver moustrap 0.2 crashes · Issue #25 · Clemapfel/Mousetrap.jl · GitHub](https://github.com/Clemapfel/Mousetrap.jl/issues/25)  
but perhaps here somebody has an idea how to debug this kind of issues?

I created a virtual machine with Ubuntu 22.04, and there it works fine…

It also works with the nouveau graphics driver, but not with the official nvidea graphics drivers, which is strange…

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 17, 2023, 10:33am UTC](https://discourse.julialang.org/t/precompiling-mousetrap-fails-on-ubuntu-with-nvidia-driver/103945/2 "2023-09-17T10:33:42Z")

</div>

Does anybody know how to run Julia under GDB to get a proper stack trace?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [September 18, 2023, 6:37pm UTC](https://discourse.julialang.org/t/precompiling-mousetrap-fails-on-ubuntu-with-nvidia-driver/103945/3 "2023-09-18T18:37:35Z")

</div>

[https://docs.julialang.org/en/v1/devdocs/backtraces/](https://docs.julialang.org/en/v1/devdocs/backtraces/)

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 18, 2023, 7:36pm UTC](https://discourse.julialang.org/t/precompiling-mousetrap-fails-on-ubuntu-with-nvidia-driver/103945/4 "2023-09-18T19:36:12Z")

</div>

Is it needed to create a debug build of Julia to debug the crash in this library?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [September 18, 2023, 8:01pm UTC](https://discourse.julialang.org/t/precompiling-mousetrap-fails-on-ubuntu-with-nvidia-driver/103945/5 "2023-09-18T20:01:13Z")

</div>

Yes, a `make debug` is needed if you want good stacktraces.
