Crash of my chess programm when using Xboard

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Crash of my chess programm when using Xboard

Postby adrien » 29 Jul 2010, 13:40

Hi everyone,

I have a strange problem with a chess programm I wrote 5 years ago. So far I remember it worked fine and I didn't modify it in the past few years.

WIth a little bit of nostalgia I compiled it again and launched it with Xboard. Whatever I do, it crash just after my second move, meaning that it do his first move correctly, let me play again and crash. But if I use it in command line, it works fine.

Code: Select all
$ ./evariste
49
feature ping=0 setboard=1 playother=1 san=0 usermove=1 reuse=0 done=1
new
usermove d2d3
6 -90 1800 0
move e7e5
usermove e2e4
5 98 500 0
move d7d5


Here is the debug file of xboard

Code: Select all
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
shuffleOpenings = 0
resolved -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-* at pixel size 34
  to -adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1
resolved -*-helvetica-bold-r-normal--*-*-*-*-*-*-*-* at pixel size 12
  to -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
resolved -*-helvetica-medium-r-normal--*-*-*-*-*-*-*-* at pixel size 14
  to -adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1
xboard 4.4.2 + evariste
Invalid continuation sequence ""  (maximum length is: 11)
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
TC string = '+40/5'
mps=40 tc=300000 inc=0
TC string = '+40/5'
mps=40 tc=300000 inc=0
1076 >first : xboard
protover 2
shuffleOpenings = 0
1915 <first : 49
1915 <first : feature ping=0 setboard=1 playother=1 san=0 usermove=1 reuse=0 done=1
1915 >first : accepted ping
1915 >first : accepted setboard
1915 >first : accepted playother
1915 >first : accepted san
1915 >first : accepted usermove
1915 >first : accepted reuse
1915 >first : accepted done
1916 >first : new
random
1916 >first : level 40 5 0
1916 >first : post
1916 >first : hard
moveType 4 = 33, promochar = 0
TC string = '+40/5'
mps=40 tc=300000 inc=0
move: d2d3
, parse: d3 (
)
nps: w=-1, b=-1
nps: w=-1, b=-1
time odds: 1 1
6501 >first : time 30000
6501 >first : otim 30000
book hit = (NULL)
6501 >first : usermove 6501 >first : d2d3
AnimateMove: piece 0 slides from 3,1 to 3,2
24088 <first : 6 -90 1700 0
24088 <first : move e7e5
machine move 1, castling = 7 0 4 7 0 4
move to parse: e7e5
TC string = '+40/5'
mps=40 tc=300000 inc=0
move: e7e5
, parse: e5 (
)
AnimateMove: piece 22 slides from 4,6 to 4,4
moveType 4 = 33, promochar = 0
TC string = '+40/5'
mps=40 tc=300000 inc=0
move: e2e4
, parse: e4 (
)
time odds: 1 1
Interrupting first
26655 >first : time 28241
26655 >first : otim 29743
book hit = (NULL)
26655 >first : usermove 26655 >first : e2e4
AnimateMove: piece 0 slides from 4,1 to 4,3
GameEnds(38, Error: first chess program (./evariste) exited unexpectedly, 2)
Interrupting first
28474 >first : result 0-1 {Error: first chess program (./evariste) exited unexpectedly}
28479 >first : quit


Thnaks for your help ! The point is that I even didn't know how t identify the problem precisely...
adrien
 
Posts: 4
Joined: 28 Jun 2010, 20:39

Re: Crash of my chess programm when using Xboard

Postby nevatre » 29 Jul 2010, 14:30

Hi,

I think xboard will be sending a SIGINT signal to your program. Does your program handle this? If not, you can turn off the signal(s) by adding "sigint=0 sigterm=0" to the feature list supplied by evariste.
nevatre
 
Posts: 9
Joined: 10 Jun 2009, 15:34
Location: Newport, UK

Re: Crash of my chess programm when using Xboard

Postby adrien » 29 Jul 2010, 14:55

Thanks, but why do you think it could be the problem ? So far I know, the SIGINT signal is lauched when I want to interrupt my program, not during the game..
adrien
 
Posts: 4
Joined: 28 Jun 2010, 20:39

Re: Crash of my chess programm when using Xboard

Postby adrien » 29 Jul 2010, 15:03

Strange, but it seems to work, thanks a lot ! Can you explain this a little bit more ?
adrien
 
Posts: 4
Joined: 28 Jun 2010, 20:39

Re: Crash of my chess programm when using Xboard

Postby nevatre » 29 Jul 2010, 15:37

adrien wrote:Strange, but it seems to work, thanks a lot ! Can you explain this a little bit more ?


Adrien,

All I know is explained in section 7. Signals, in this document http://home.hccnet.nl/h.g.muller/engine-intf.html#7
nevatre
 
Posts: 9
Joined: 10 Jun 2009, 15:34
Location: Newport, UK

Re: Crash of my chess programm when using Xboard

Postby adrien » 29 Jul 2010, 15:38

Thanks a lot :)
adrien
 
Posts: 4
Joined: 28 Jun 2010, 20:39


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 22 guests