gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] mysterious crash


From: bump
Subject: Re: [gnugo-devel] mysterious crash
Date: Sat, 6 Apr 2002 07:03:02 -0800

I now have a core file. The crash is at movenum 0,
empty board, in owl reasons. Here's the backtrace:

#0  0x400c5a01 in __kill () from /lib/i686/libc.so.6
(gdb) bt
#0  0x400c5a01 in __kill () from /lib/i686/libc.so.6
#1  0x400c57da in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x400c6f82 in abort () at ../sysdeps/generic/abort.c:88
#3  0x0805658b in do_trymove (pos=242, color=0, ignore_ko=0) at board.c:657
#4  0x080560e1 in trymove (pos=242, color=0, 
    message=0x80db73d "owl_does_defend", str=202, komaster=0, kom_pos=0)
    at board.c:486
#5  0x0807d300 in owl_does_defend (move=242, target=202) at owl.c:3579
#6  0x0807cfb7 in owl_reasons (color=2) at owl.c:3477
#7  0x08065590 in do_genmove (move=0xbffff068, color=2, 
    pure_threat_value=0.400000006) at genmove.c:423
#8  0x080651a0 in genmove (i=0xbffff09c, j=0xbffff0a0, color=2)
    at genmove.c:267
#9  0x0804f754 in gtp_genmove_black (s=0xbffff4ce "", id=-1) at play_gtp.c:1667
#10 0x08053919 in gtp_main_loop (commands=0x80f6bf8, gtp_input=0x401cb000)
    at gtp.c:104
#11 0x0804aa70 in main (argc=4, argv=0xbffffac4) at main.c:1110
#12 0x400b3507 in __libc_start_main (main=0x80491e0 <main>, argc=4, 
    ubp_av=0xbffffac4, init=0x8048d68 <_init>, fini=0x80d6110 <_fini>, 
    rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffffabc)
    at ../sysdeps/generic/libc-start.c:129

Evidently we don't do enough initializing when twogtp starts
a new game. The board is cleared by the call to 

The call to owl_does_defend at line 3477 of owl_reasons
asks whether B8 defends B10.  Of course B10 is empty.

The value of pos is at B9. There's dragon data for this
empty board position.

(gdb) p dragon[222]
$10 = {color = 1, id = 6, origin = 222, size = 1, effective_size = 2, 
  status = 0, owl_threat_status = 4, owl_status = 2, owl_attack_point = 242, 
  owl_attack_code = 3, owl_attack_certain = 1, owl_second_attack_point = 0, 
  owl_defense_point = 242, owl_defense_code = 3, owl_defense_certain = 1, 
  owl_second_defense_point = 0, matcher_status = 2}
(gdb) p dragon2[6]
$11 = {origin = 222, adjacent = {5, 1, 4, 7, 8, 9, 11, 0, 0, 0}, 
  neighbors = 2, hostile_neighbors = 1, moyo = 0, safety = 3, 
  escape_route = 0, genus = 0, heyes = 0, heye = 0, lunch = 0, semeai = 0, 
  semeai_margin_of_safety = -1}

This is presumably left over from the end of the previous
game, whose sgf file I have. B9 is occupied by a W stone
in that game.

The mystery here is why examine_positions, which runs before
owl_reasons, doesn't reset the dragon and dragon2 arrays.
These should be initialized by make_dragons.

Dan





reply via email to

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