Using source from 20 Feb 22:00 GMT. If you start gnubg in GUI mode and give it an .sgf file on the command line, it segfaults when opening the main window. I've run it under gdb and the attached segv.gdb gives the backtrace and the contents of the prd structure, which hasn't been initialised when RenderBoard() is called. Starting gnubg in GUI mode, then loading the same .sgf file works as expected, as does CLI mode.
I've also been looking at the periodic thread errors which I've been seeing in both CLI and GUI mode. It looks like it might be a race condition, as it seems to occur about 1/2 the time. I've attached a gdb output where it showed this error on the third run (trap.gdb). It appears that occasionaly td.queueLock is still locked when trying to close the threads I've also captured this error using strace to log system calls and include a gzipped trace of a run which showed this fault, although I don't know if it adds any real information. Finally, on the progress indication, under GUI mode, where the progress bar calculates the percentage completed, that percentage resets itself along with the absurd count sequence (in other words on a match with 611 moves, the count progress normally to perhaps 30 moves (4 to 5 percent), then shows as 1 move of 611 and 1% completion. I occasionaly see displays of 5/6611 moves and similar oddities. On a side note, I've taken Christen's advice and modified neuralnet.c to not perform the SSE test if there is a processor type defined (__x86_64). This may not work with other compilers than gcc, but if the #define is not present, then the old code is run, so only 64 bit machines with a different compiler than gcc will see it. -- Jim Segrave [EMAIL PROTECTED]
Current directory is /usr/home/jes/gnubg/
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
+++++++++++++++++++++++++++++
start gnubg with a valid sgf file to load
+++++++++++++++++++++++++++++
(gdb) r /tmp/benham.sgf
Starting program: /usr/home/jes/gnubg/gnubg /tmp/benham.sgf
[Thread debugging using libthread_db enabled]
[New Thread 47462576884560 (LWP 25495)]
/usr/local/share/gnubg/gnubg.gtkrc:48: error: invalid identifier `font_size',
expected valid identifier
GNU Backgammon 0.16-develCopyright 1999, 2000, 2001, 2002, 2003, 2004 by Gary
Wong.
GNU Backgammon is free software, covered by the GNU General Public License
version 2, and you are welcome to change it and/or distribute copies of it
under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GNU Backgammon. Type "show warranty" for
details.
[New Thread 1082460496 (LWP 25498)]
[Thread 1082460496 (LWP 25498) exited]
[New Thread 1091180880 (LWP 25499)]
[New Thread 1082460496 (LWP 25500)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47462576884560 (LWP 25495)]
0x00000000004a68c5 in RenderBoard (prd=0x45c98c0, puch=0x54667b0 "���\217�*+",
nStride=-324) at render.c:1621
(gdb) bt
#0 0x00000000004a68c5 in RenderBoard (prd=0x45c98c0,
puch=0x54667b0 "���\217�*+", nStride=-324) at render.c:1621
#1 0x00000000004a7070 in RenderImages (prd=0x45c98c0, pri=0x46b1658)
at render.c:2801
#2 0x00000000004bab7f in board_create_pixmaps (board=<value optimized out>,
bd=0x46b1380) at gtkboard.c:3258
#3 0x00000000004bedb1 in board_set (board=<value optimized out>,
board_text=0x7ffff00e55a6 "", resigned=<value optimized out>, cube_use=1)
at gtkboard.c:2861
#4 0x00000000004bf3ff in game_set (board=0x46a9330, points=0x762b20, roll=1,
name=0x764a88 "benham", opp_name=0x764260 "jim_segrave", match=21,
score=15, opp_score=7, die0=0, die1=0, computer_turn=1, nchequers=15)
at gtkboard.c:3186
#5 0x000000000043d7e3 in ShowBoard () at gnubg.c:3241
#6 0x000000000043e514 in UpdateSettings () at gnubg.c:2573
#7 0x000000000047dbef in CommandLoadMatch (
sz=0x7ffff00e6780 "/tmp/benham.sgf") at sgf.c:1633
#8 0x00000000004437e0 in main (argc=2, argv=0x7ffff00e93e8) at gnubg.c:7453
(gdb) p *prd
$1 = {wt = WOOD_REDWOOD, aarColour = {{0.25882354378700256,
0.25882354378700256, 0.84705883264541626, 1}, {0.86274510622024536,
0.87843137979507446, 0.30588236451148987, 1}}, aarDiceColour = {{
0.015686275437474251, 0.015686275437474251, 0.89803922176361084,
0.90000000000000002}, {0.96470588445663452, 0.99215686321258545,
0.26274511218070984, 0.5}}, afDieColour = {0, 0}, aarDiceDotColour = {{
0.99215686321258545, 0.99215686321258545, 0.99215686321258545, 1}, {0,
0, 0, 1}}, arCubeColour = {0.88235294818878174, 0.88235294818878174,
0.88235294818878174, 1}, aanBoardColour = {"\000{\000�", "\000?\000�",
"\n\003\003�", "����"}, aSpeckle = {0, 25, 0, 0}, arRefraction = {
1.70000005, 1.5}, arCoefficient = {1, 0.200000003}, arExponent = {
73.1999969, 86.5999985}, arDiceCoefficient = {1, 0.300000012},
arDiceExponent = {100, 1}, arLight = {-0.556669295, 0.321393371,
0.766045451}, rRound = 0.600000024, nSize = 4294967295, fHinges = 1,
fLabels = 0, fClockwise = 1, fShowIDs = 1, fDiceArea = 0,
fShowGameInfo = 1, fDynamicLabels = 1, showMoveIndicator = 1}
(gdb) print /x prd->nSize
$2 = 0xffffffff
(gdb)
++++++++++++++++++++++++++++
nSize is (unsigned int) -1.
it appears to be declared as unsigned in render.h, but treated as int
in other places
++++++++++++++++++++++++++++
Current directory is /usr/home/jes/gnubg/
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x4429a0: file gnubg.c, line 6999.
(gdb) b CommandQuit
Breakpoint 2 at 0x43ebd0: file gnubg.c, line 4201.
(gdb) r -t
Starting program: /usr/home/jes/gnubg/gnubg -t
[Thread debugging using libthread_db enabled]
[New Thread 47097203821392 (LWP 25362)]
[Switching to Thread 47097203821392 (LWP 25362)]
Breakpoint 1, main (argc=2, argv=0x7fff01fd42d8) at gnubg.c:6999
(gdb) c
Continuing.
GNU Backgammon 0.16-develCopyright 1999, 2000, 2001, 2002, 2003, 2004 by Gary
Wong.
GNU Backgammon is free software, covered by the GNU General Public License
version 2, and you are welcome to change it and/or distribute copies of it
under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GNU Backgammon. Type "show warranty" for
details.
[New Thread 1082460496 (LWP 25365)]
[Thread 1082460496 (LWP 25365) exited]
[New Thread 1091180880 (LWP 25366)]
[New Thread 1082460496 (LWP 25367)]
(No game) q
Breakpoint 2, CommandQuit (sz=0x47037b1 "") at gnubg.c:4201
(gdb) c
Continuing.
[Thread 1082460496 (LWP 25367) exited]
[Thread 1091180880 (LWP 25366) exited]
Program exited normally.
++++++++++++++++++++++++++++++++++++++
Didn't trap, try again
++++++++++++++++++++++++++++++++++++++
(gdb) r -t
Starting program: /usr/home/jes/gnubg/gnubg -t
[Thread debugging using libthread_db enabled]
[New Thread 47237819186000 (LWP 25368)]
[Switching to Thread 47237819186000 (LWP 25368)]
Breakpoint 1, main (argc=2, argv=0x7fff44a8ed98) at gnubg.c:6999
(gdb) c
Continuing.
GNU Backgammon 0.16-develCopyright 1999, 2000, 2001, 2002, 2003, 2004 by Gary
Wong.
GNU Backgammon is free software, covered by the GNU General Public License
version 2, and you are welcome to change it and/or distribute copies of it
under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GNU Backgammon. Type "show warranty" for
details.
[New Thread 1082460496 (LWP 25369)]
[Thread 1082460496 (LWP 25369) exited]
[New Thread 1091180880 (LWP 25370)]
[New Thread 1082460496 (LWP 25371)]
(No game) q
Breakpoint 2, CommandQuit (sz=0x4703811 "") at gnubg.c:4201
(gdb) c
Continuing.
Program exited normally.
(gdb) c
The program is not being run.
+++++++++++++++++++++++++++++++++++++++
Didn't trap, try again
+++++++++++++++++++++++++++++++++++++++
(gdb) r -t
Starting program: /usr/home/jes/gnubg/gnubg -t
[Thread debugging using libthread_db enabled]
[New Thread 47741157337936 (LWP 25372)]
[Switching to Thread 47741157337936 (LWP 25372)]
Breakpoint 1, main (argc=2, argv=0x7fff135e58f8) at gnubg.c:6999
(gdb) c
Continuing.
GNU Backgammon 0.16-develCopyright 1999, 2000, 2001, 2002, 2003, 2004 by Gary
Wong.
GNU Backgammon is free software, covered by the GNU General Public License
version 2, and you are welcome to change it and/or distribute copies of it
under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GNU Backgammon. Type "show warranty" for
details.
[New Thread 1082460496 (LWP 25373)]
[Thread 1082460496 (LWP 25373) exited]
[New Thread 1091180880 (LWP 25374)]
[New Thread 1082460496 (LWP 25375)]
(No game) q
Breakpoint 2, CommandQuit (sz=0x4703871 "") at gnubg.c:4201
(gdb) c
Continuing.
[Thread 1091180880 (LWP 25374) exited]
[Thread 1082460496 (LWP 25375) exited]
Program exited normally.
+++++++++++++++++++++++++++++++++
Start it once again
+++++++++++++++++++++++++++++++++
(gdb) r -t
Starting program: /usr/home/jes/gnubg/gnubg -t
[Thread debugging using libthread_db enabled]
[New Thread 47336198073168 (LWP 25376)]
[Switching to Thread 47336198073168 (LWP 25376)]
Breakpoint 1, main (argc=2, argv=0x7fff5cd24038) at gnubg.c:6999
(gdb) b
Note: breakpoint 1 also set at pc 0x4429a0.
Breakpoint 3 at 0x4429a0: file gnubg.c, line 6999.
(gdb) c
Continuing.
GNU Backgammon 0.16-develCopyright 1999, 2000, 2001, 2002, 2003, 2004 by Gary
Wong.
GNU Backgammon is free software, covered by the GNU General Public License
version 2, and you are welcome to change it and/or distribute copies of it
under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GNU Backgammon. Type "show warranty" for
details.
[New Thread 1082460496 (LWP 25377)]
[Thread 1082460496 (LWP 25377) exited]
[New Thread 1091180880 (LWP 25378)]
[New Thread 1082460496 (LWP 25379)]
(No game) q
Breakpoint 2, CommandQuit (sz=0x47095d1 "") at gnubg.c:4201
(gdb) c
Continuing.
[Thread 1082460496 (LWP 25379) exited]
GThread-ERROR **: file gthread-posix.c: line 160 (): error 'Device or resource
busy' during 'pthread_mutex_destroy ((pthread_mutex_t *) mutex)'
aborting...
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00002b0d5035713c in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x00002b0d5035713c in g_logv () from /usr/lib/libglib-2.0.so.0
#1 0x00002b0d50357353 in g_log () from /usr/lib/libglib-2.0.so.0
#2 0x00002b0d50109836 in ?? () from /usr/lib/libgthread-2.0.so.0
#3 0x0000000000510a32 in MT_Close () at multithread.c:521
#4 0x000000000043b218 in Shutdown () at gnubg.c:4091
#5 0x000000000043e77a in PromptForExit () at gnubg.c:4189
#6 0x0000000000441677 in HandleCommand (sz=0x47095d1 "",
ac=<value optimized out>) at gnubg.c:2906
#7 0x0000000000443d28 in main (argc=1, argv=0x7fff5cd24038) at gnubg.c:7531
(gdb) f 3
#3 0x0000000000510a32 in MT_Close () at multithread.c:521
(gdb) l
516 FreeManualEvent(td.activity);
517 FreeManualEvent(td.lockContention);
518 FreeManualEvent(td.contentionCleared);
519 FreeEvent(td.alldone);
520 FreeMutex(td.multiLock);
521 FreeMutex(td.queueLock);
522 FreeManualEvent(td.syncStart);
523 FreeManualEvent(td.syncEnd);
524 TLSFree(td.tlsItem);
525 }
(gdb)
This time it has failed. Thread 25376 (the initial thread is still
live and in a debugger trap.
trap.strace.gz
Description: application/gunzip
_______________________________________________ Bug-gnubg mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gnubg
