Ticket #105 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Crash in semeai.c at --level 0

Reported by: arend Owned by: arend
Priority: normal Milestone: 3.7.9
Component: source Version:
Severity: blocker Keywords:
Cc: patch: yes

Description

gnugo -l crash.sgf --level 0 produces the following crash:

***assertion failure:
semeai.c:215 - board[semeai_defense_target] == (WHITE+BLACK-(board[dragon2[d1].origin])) near PASS***

 (variation 0)
   A B C D E F G H J K L M N O P Q R S T
19 . . . . . . . . . . . . . X X X X X X 19
18 . O . O X . . O . . O . O O O X X O X 18
17 . . . O X X X O . O . O X O X X O O X 17
16 . . O X X . . X O + O X X O . X O X X 16
15 . O O . X X X . X O X O X X X X O O O 15
14 . X X . . . . . X . . O X X . X O . . 14
13 . . X O . X . X O O O . O O X O O . . 13
12 . . . X X X . X X O . O O X X X X O O 12
11 . X O O O X O X . X O . . O X X O O X 11     WHITE (O) has captured 4 stones
10 . O . X O O O O X X X O O O O X . O X 10     BLACK (X) has captured 10 stones
 9 O . . . . X X X . . X O X O O X . O X 9
 8 O X X X X . X O X X . X X X O X X X X 8
 7 . O O O O X . O X . X O X . X O O X . 7
 6 . . O X O X . . O . X O . X X X O X O 6
 5 . O X X O X . . . . . O . X X O O O . 5
 4 . O . X X O O . . + . O X . X X O X . 4
 3 . . O . X O . . O . . O . X . X O O . 3
 2 . . . . . . . . . . O X X . O O . . . 2
 1 . . . . . . . . . . . O . . . . . . . 1
   A B C D E F G H J K L M N O P Q R S T

Attachments

crash.sgf Download (1.4 KB) - added by arend 6 years ago.
arend_7_9.18.diff Download (1.4 KB) - added by arend 6 years ago.
arend_7_9.18a.diff Download (1.8 KB) - added by arend 6 years ago.
semicolons…

Regression Results

Attachment Rev. PASS FAIL Nodes Status
arend_7_9.18.diff Download never tested
arend_7_9.18a.diff Download never tested

Change History

Changed 6 years ago by arend

Changed 6 years ago by arend

comment:1 Changed 6 years ago by arend

  • Owner changed from gnugo to arend
  • patch set

I am a bit at a loss here. It seems this bug should happen whenever a dragon is involved in one semeai, which he loses regardless who moves first, but with uncertain semeai result. This should have hit us a lot more often.

comment:2 Changed 6 years ago by gunnar

  • Severity changed from normal to blocker

The reason why this haven't hit us more in the past is that the relevant assertion wasn't introduced until 3.7.8 (r2274). I'm less sure why we aren't seeing more of them now, although there have been a number of bug reports for these crashes.

As for the patch I'd prefer setting both best_defense and best_attack to -1 and keeping the assertion which is removed in the second hunk.

comment:3 Changed 6 years ago by arend

I don't see the point of the 2nd assertion, since it's trivially satisfied due to the line above (in fact it will be optimized out by the compiler).

Whether setting best_defense = -1 or best_defense = 0 and defense_certain = -1 seems a cosmetic question to me.

comment:4 Changed 6 years ago by arend

Sorry I misread the second assertion of course. Will post a revised patch.

comment:5 Changed 6 years ago by gunnar

Yes, setting best_defense=-1 instead of defense_certain=-1 is cosmetic, but has a small advantage in being less subtle. No big deal though.

-      gg_assert(semeai_results_second[d1][d2] != -1);
+      gg_assert(semeai_results_second[d1][d2] != -1)

Maybe you should add the semicolon back in too. :-)

Changed 6 years ago by arend

semicolons...

comment:6 Changed 6 years ago by arend

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.