bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Bug in command line mode


From: Joern Thyssen
Subject: Re: [Bug-gnubg] Bug in command line mode
Date: Thu, 22 Aug 2002 07:35:42 +0000
User-agent: Mutt/1.4i

Hi Sander,

On Thu, Aug 22, 2002 at 03:47:50AM +0200, Sander van Rijnswou wrote
> Hi all,
> 
> Using the cvs version I encountered a problem with "gnubg -t", the
> commandline version. 
> 
> doing:
> gnubg -t 
> new game
> hint
>  
> 
> Gives a segfault. This the complete output. (In the stable version 0.12
> this works fine)
> 
> address@hidden:~/project/gnubg-cvs-current/gnubg > gnubg -t
[snip]
> GLib-CRITICAL **: file ghash.c: line 152 (g_hash_table_insert):
> assertion `hash_table != NULL' failed.
>  
> Gtk-WARNING **: invalid cast from (NULL) pointer to `Board'
> Segmentation fault

Which snapshot do you use?

I'll look at it tonight. I have a feeling what's wrong:

gnubg.c, line 2875ff:

2875: #if USE_GTK
2876:         fHasMoved = GTKGetMove ( anMove );
2877:         if ( fHasMoved )
2878:           MoveKey ( ms.anBoard, anMove, auch );
2879: #else
2880:         fHasMoved = FALSE;
2881: #endif /* ! USE_GTK */
2882: 

should probably be (untested):

2875: #if USE_GTK
              if ( fX ) {
2876:            fHasMoved = GTKGetMove ( anMove );
2877:            if ( fHasMoved )
2878:              MoveKey ( ms.anBoard, anMove, auch );
              }
              else
                fHasMoved = FALSE;
2879: #else
2880:         fHasMoved = FALSE;
2881: #endif /* ! USE_GTK */
2882: 



Jørn

-- 
Joern Thyssen, PhD
Vendsysselgade 3, 3., DK-9000 Aalborg, Denmark
+45 9813 2791 (private) / +45 2077 2689 (mobile) / +45 9633 7036 (work)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]