buggnubg - Bugs: bug #62482, Segfault when clicking on board


bug #62482: Segfault when clicking on board

Submitter:  Oli <thedubster>
Submitted:  Tue 17 May 2022 04:13:37 PM UTC
Originator Name:  Oli Item Group:  * Crash error
Category:  * Graphical User Interface Release:  * 1.06
Privacy:  Public Operating System:  * Linux
Severity:  4 - Important Open/Closed:  Open
Assigned to:  None Priority:  5 - Normal
Status:  Confirmed
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Wed 16 Nov 2022 10:38:37 PM UTC, comment #9: 

As far as I could verify (on FreeBSD), the 22.2.x Mesa releases don't trigger a crash any more, but OpenGL picking doesn't work, so 3D boards are still not usable.

Philippe Michel <plm>
Group administrator
Mon 20 Jun 2022 10:03:24 PM UTC, comment #8: 

I could reproduce the issue with the current cvs sources and recent mesa releases on FreeBSD (mesa 21.3.8) and Ubuntu 22.04 (mesa 22.0.1), but not with older releases of this library.

While doing that, I rebuilt mesa with debug symbols to get more information than in Oli's backtrace and, googling for name of the function where it crashed, found this:

Someone who had the same problem in another software, with a disappointing side (zero interest from the mesa folks) and a positive one: a suggestion that the picking technique used in the OpenGL code could be the cause of the problem.

There are many tutorials, blog posts, etc... about OpenGL picking and they indeed generally state that the method used in the old (gtk2) gnubg code is deprecated.

On the other hand, a build of gnubg with gtk3 doesn't crash. That doesn't mean it should be used instead (the gnubg gtk3 interface is immature and has other issues), but it should be possible to backport some limited portion of the the gtk3 GL code to the gtk2 part and hopefully fix the problem.

Philippe Michel <plm>
Group administrator
Tue 14 Jun 2022 03:27:13 PM UTC, comment #7: 

HI Christian,
thanx for your suggestions. I will actually go for option 2 and 3 and see if it will be solved by the maintainer so I can install it from the repo again. Easier for updating. But for now I will compile from source.

Oli <thedubster>
Tue 14 Jun 2022 02:24:09 PM UTC, comment #6: 

This is not a GNU backgammon bug as the 3d board works fine under ubuntu 20.04. And we have no way to reproduce your problem.

You have the following options

1. Uninstall GNU backgammon
2. Download and install from the source code
3. Report the problem to the manjaro packager of gnu backgammon.

If you want to help us and yourself please go with option 2 and if you still have the problem, we will be glad to re-open the bug report and see what we can do.

Christian Anthon <c_anthon>
Group administrator
Sun 12 Jun 2022 05:13:01 PM UTC, comment #5: 

mesa and llvm-libs have been updated twice since. It's gotten worse. Now the 3D board doesn't even respond anymore after clicking. As much as I love playing backgammon I will have to ditch gnubg. At the moment it's just taking up space on my drive being unusable.

Oli <thedubster>
Thu 19 May 2022 10:20:37 PM UTC, comment #4: 

That's what I thought. Problem is: the library didn't get updated during the system upgrade (llvm-libs and mesa got upgraded a month earlier). But anyway looks like a problem with my system rather than gnubg. I'll wait for a fix.
Thanx for looking at it anyway.

Thu 19 May 2022 10:10:13 PM UTC, comment #3: 

As far as I can see, the problem is a bug in an updated system library, crocus_dri.so from the mesa package or libLLVM-13.so from llvm-libs.

The issue is most probably limited to the 3D graphics (mesa is the drivers for OpenGL, used by gnubg for the 3D board but not for the 2D one). The obvious workaround would be to use the 2D board and watch for updates of the above packages.

In addition, you could try to open a bug report similar to this one with Manjaro.

Philippe Michel <plm>
Group administrator
Tue 17 May 2022 09:38:32 PM UTC, comment #2: 

Yep that's right only on the board not the moves list nor the anlysis.
It's in 3D mode (haven't tried 2D).
That's the gdb output:

Thread 1 "gnubg" received signal SIGSEGV, Segmentation fault.
0x00007fffed644379 in llvm::ConstantFoldCastInstruction(unsigned int, llvm::Constant*, llvm::Type*) () from /usr/lib/libLLVM-13.so
(gdb) where
#0  0x00007fffed644379 in llvm::ConstantFoldCastInstruction(unsigned int, llvm::Constant*, llvm::Type*) () at /usr/lib/libLLVM-13.so
#1  0x00007fffed66cf9b in  () at /usr/lib/libLLVM-13.so
#2  0x00007fffed682bb5 in LLVMBuildBitCast () at /usr/lib/libLLVM-13.so
#3  0x00007ffff39c8d68 in  () at /usr/lib/dri/crocus_dri.so
#4  0x00007ffff4523c8b in  () at /usr/lib/dri/crocus_dri.so
#5  0x00007ffff399af11 in  () at /usr/lib/dri/crocus_dri.so
#6  0x00007ffff392977a in  () at /usr/lib/dri/crocus_dri.so
#7  0x00007ffff393bb25 in  () at /usr/lib/dri/crocus_dri.so
#8  0x00007ffff38dedc6 in  () at /usr/lib/dri/crocus_dri.so
#9  0x00007ffff45299d6 in  () at /usr/lib/dri/crocus_dri.so
#10 0x00007ffff38e346c in  () at /usr/lib/dri/crocus_dri.so
#11 0x00007ffff38f1ae4 in  () at /usr/lib/dri/crocus_dri.so
#12 0x00007ffff36ad075 in  () at /usr/lib/dri/crocus_dri.so
#13 0x00007ffff35eb185 in  () at /usr/lib/dri/crocus_dri.so
#14 0x00007ffff35e83ed in  () at /usr/lib/dri/crocus_dri.so
#15 0x00007ffff355bd33 in  () at /usr/lib/dri/crocus_dri.so
#16 0x00007ffff355c085 in  () at /usr/lib/dri/crocus_dri.so
#17 0x00007ffff365852c in  () at /usr/lib/dri/crocus_dri.so
#18 0x00005555556855f3 in  ()
#19 0x0000555555682903 in  ()
#20 0x000055555568b6b5 in BoardPoint3d ()
#21 0x0000555555633503 in board_button_press ()
#22 0x00007ffff74960a8 in  () at /usr/lib/libgtk-x11-2.0.so.0
#23 0x00007ffff6ea7f8f in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#24 0x00007ffff6ec3ba8 in  () at /usr/lib/libgobject-2.0.so.0
#25 0x00007ffff6ec4fb8 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#26 0x00007ffff6ec5824 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#27 0x00007ffff75bb275 in  () at /usr/lib/libgtk-x11-2.0.so.0
#28 0x00007ffff74946d6 in gtk_propagate_event () at /usr/lib/libgtk-x11-2.0.so.0
#29 0x00007ffff7494b4b in gtk_main_do_event () at /usr/lib/libgtk-x11-2.0.so.0
#30 0x00007ffff73033be in  () at /usr/lib/libgdk-x11-2.0.so.0
#31 0x00007ffff6dab163 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#32 0x00007ffff6e019e9 in  () at /usr/lib/libglib-2.0.so.0
#33 0x00007ffff6daa6a3 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#34 0x00007ffff74939fe in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#35 0x000055555564af1b in RunGTK ()
#36 0x00005555555977d9 in main ()

Oli <thedubster>
Tue 17 May 2022 09:14:19 PM UTC, comment #1: 

When you write "on the board (not the toolbar)", I assume you mean not in the moves list eiter, nor the analysis, all the GUI except specifically the board. Could you confirm, just in case ?

Does it happen with the 3D board ? the 2D one ? both ?

I don't have a Manjaro system, but downloading the gnubg package from one of its mirror repositories, I can see that its binary is built as a "ELF 64-bit LSB pie executable, ..., stripped".

Stripped implies that it will be essentially impossible to see with any accuracy where the crash happen. Still, you could run it under gdb ("gdb /usr/bin/gnubg", then "run", then, after the crash, "where"). This should show if the failure is in gnubg itself or in a system library and in the latter case which one, but probably nothing more.

Philippe Michel <plm>
Group administrator
Tue 17 May 2022 04:13:37 PM UTC, original submission:  

gnubg segfaults when clicking anywhere on the board (not the toolbar).

  • thread #1, name = 'gnubg', stop reason = signal SIGSEGV: invalid address (fault address: 0x8).

Happens since I did a system upgrade on my Manjaro on the 13/5/2022.

Oli <thedubster>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by c_anthon (Posted a comment)
  • -email is unavailable- added by plm (Posted a comment)
  • -email is unavailable- added by thedubster (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-20 plm Severity3 - Normal 4 - Important
        Open/ClosedClosed Open
        StatusWorks For Me Confirmed
    2022-06-14 c_anthon Open/ClosedOpen Closed
        StatusPostponed Works For Me
    2022-05-28 ineiev Carbon-CopyRemoved 0 -
    2022-05-19 plm StatusNone Postponed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code