Thread: [Scidvspc-users] Bug between ScidVsPC and Stockfish
Chess Database and Toolkit program
Brought to you by:
stevenaaus
From: Alex W. <al...@un...> - 2016-04-21 14:52:34
|
Hi, I configured ScidVsPC to use the Stockfish chess engine and noticed an issue where Stockfish would crash when asked to evaluate a position already in checkmate. This issues happens frequently if Stockfish is running during the checkmate in N training. Solving the puzzle results in a crash. I filed a bug on the issue at https://bugzilla.redhat.com/show_bug.cgi?id=1325013 but the maintainer attributed the issue to Stockfish being asked to evaluate an invalid move. Here's the engine log of an example crash: Engine: readyok Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 Scid : go infinite [...] Engine analysis here Scid : stop Scid : isready Engine: readyok Engine: bestmove h6h8 Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 moves h6h8 Scid : go infinite Engine: info depth 0 score mate 0 Scid : stop Scid : isready Engine: readyok Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 moves h6h8 Scid : go infinite Engine: bestmove (none) Note: Engine terminated without warning. Note: Engine terminated without exit code: "\"$standard_error\"" Any thoughts or help would be greatly appreciated! ------------ Regards, Alex |
From: Steve A <ste...@gm...> - 2016-04-23 00:26:31
Attachments:
dont_send_nomoves_to_engine.patch.gz
|
I cant see the bug report, even after joining their bugzilla. But if they are happy to have their app crash with very reasonable input... i guess we should probably add a safeguard to handle it. Stockfish does many unfriendly things in a way *no* other engine does. This should handle it (also attached) and will probably get comitted, but as my version of SF doesnt crash, i cant test it. Index: tcl/tools/analysis.tcl =================================================================== --- tcl/tools/analysis.tcl (revision 2523) +++ tcl/tools/analysis.tcl (working copy) @@ -3544,6 +3544,9 @@ append cmd { [ } " after $delay sendPosToEngineUCI $n $delay " { ] } set analysis(after$n) [eval [list after idle $cmd]] } else { + if {[sc_pos moves] == {}} { + return + } ### Dont send position if annotating and in book if { $::annotate(Engine) == $n && ! $::wentOutOfBook && $::useAnalysisBook} { bookAnnotation On Fri, Apr 22, 2016 at 12:27 AM, Alex Wood <al...@un...> wrote: > Hi, > > I configured ScidVsPC to use the Stockfish chess engine and noticed an > issue where Stockfish would crash when asked to evaluate a position > already in checkmate. This issues happens frequently if Stockfish is > running during the checkmate in N training. Solving the puzzle results > in a crash. > > I filed a bug on the issue at > https://bugzilla.redhat.com/show_bug.cgi?id=1325013 but the maintainer > attributed the issue to Stockfish being asked to evaluate an invalid > move. Here's the engine log of an example crash: > > Engine: readyok > Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 > Scid : go infinite > [...] Engine analysis here > Scid : stop > Scid : isready > Engine: readyok > Engine: bestmove h6h8 > Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 moves h6h8 > Scid : go infinite > Engine: info depth 0 score mate 0 > Scid : stop > Scid : isready > Engine: readyok > Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 moves h6h8 > Scid : go infinite > Engine: bestmove (none) > Note: Engine terminated without warning. > Note: Engine terminated without exit code: "\"$standard_error\"" > > Any thoughts or help would be greatly appreciated! > ------------ > Regards, > Alex > > > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications Manager > Applications Manager provides deep performance insights into multiple tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > _______________________________________________ > Scidvspc-users mailing list > Sci...@li... > https://lists.sourceforge.net/lists/listinfo/scidvspc-users |
From: Gregor C. <re...@gm...> - 2016-04-23 06:54:07
|
Of course, this crash is a severe Stockfish bug, a full.-hearted implementation would test the position before analyzing. But that's not the only issue with Stockfish. Stockfish is designed for reaching high ELO ratings, it is doing this with aggressive pruning. In analyze mode this aggressive pruning has the effect that Stockfish is often overlooking even simple drawing combinations, and other quite obvious things. For analysis mode alternative engines are of interest, but I don't know which engines are the best for analysis. Some years ago (the free version of) Zappa was a very good engines for wild positions, but the last release is 2005. Gregor |
From: Jerome M. <jmo...@gm...> - 2016-04-23 12:22:34
|
Hello I can t réplicate it on ubuntu and sf7 for the moment but i keep go on with your position Le 23 Avr. 2016 02:26, "Steve A" <ste...@gm...> a écrit : > I cant see the bug report, even after joining their bugzilla. > > But if they are happy to have their app crash with very reasonable > input... i guess we should probably add a safeguard to handle it. > Stockfish does many unfriendly things in a way *no* other engine does. > > This should handle it (also attached) and will probably get comitted, > but as my version of SF doesnt crash, i cant test it. > > Index: tcl/tools/analysis.tcl > =================================================================== > --- tcl/tools/analysis.tcl (revision 2523) > +++ tcl/tools/analysis.tcl (working copy) > @@ -3544,6 +3544,9 @@ > append cmd { [ } " after $delay sendPosToEngineUCI $n $delay " { > ] } > set analysis(after$n) [eval [list after idle $cmd]] > } else { > + if {[sc_pos moves] == {}} { > + return > + } > ### Dont send position if annotating and in book > if { $::annotate(Engine) == $n && ! $::wentOutOfBook && > $::useAnalysisBook} { > bookAnnotation > > On Fri, Apr 22, 2016 at 12:27 AM, Alex Wood <al...@un...> wrote: > > Hi, > > > > I configured ScidVsPC to use the Stockfish chess engine and noticed an > > issue where Stockfish would crash when asked to evaluate a position > > already in checkmate. This issues happens frequently if Stockfish is > > running during the checkmate in N training. Solving the puzzle results > > in a crash. > > > > I filed a bug on the issue at > > https://bugzilla.redhat.com/show_bug.cgi?id=1325013 but the maintainer > > attributed the issue to Stockfish being asked to evaluate an invalid > > move. Here's the engine log of an example crash: > > > > Engine: readyok > > Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 > > Scid : go infinite > > [...] Engine analysis here > > Scid : stop > > Scid : isready > > Engine: readyok > > Engine: bestmove h6h8 > > Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 moves h6h8 > > Scid : go infinite > > Engine: info depth 0 score mate 0 > > Scid : stop > > Scid : isready > > Engine: readyok > > Scid : position fen 4k3/8/4K2Q/8/8/8/8/8 w - - 3 8 moves h6h8 > > Scid : go infinite > > Engine: bestmove (none) > > Note: Engine terminated without warning. > > Note: Engine terminated without exit code: "\"$standard_error\"" > > > > Any thoughts or help would be greatly appreciated! > > ------------ > > Regards, > > Alex > > > > > > > ------------------------------------------------------------------------------ > > Find and fix application performance issues faster with Applications > Manager > > Applications Manager provides deep performance insights into multiple > tiers of > > your business applications. It resolves application problems quickly and > > reduces your MTTR. Get your free trial! > > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > > _______________________________________________ > > Scidvspc-users mailing list > > Sci...@li... > > https://lists.sourceforge.net/lists/listinfo/scidvspc-users > > > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications > Manager > Applications Manager provides deep performance insights into multiple > tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > _______________________________________________ > Scidvspc-users mailing list > Sci...@li... > https://lists.sourceforge.net/lists/listinfo/scidvspc-users > > |
From: Alex W. <al...@un...> - 2016-04-23 18:00:13
|
On 4/22/2016 8:26 PM, Steve A wrote: > I cant see the bug report, even after joining their bugzilla. > > But if they are happy to have their app crash with very reasonable > input... i guess we should probably add a safeguard to handle it. > Stockfish does many unfriendly things in a way *no* other engine does. > > This should handle it (also attached) and will probably get comitted, > but as my version of SF doesnt crash, i cant test it. > > Index: tcl/tools/analysis.tcl > =================================================================== > --- tcl/tools/analysis.tcl (revision 2523) > +++ tcl/tools/analysis.tcl (working copy) > @@ -3544,6 +3544,9 @@ > append cmd { [ } " after $delay sendPosToEngineUCI $n $delay " { ] } > set analysis(after$n) [eval [list after idle $cmd]] > } else { > + if {[sc_pos moves] == {}} { > + return > + } > ### Dont send position if annotating and in book > if { $::annotate(Engine) == $n && ! $::wentOutOfBook && > $::useAnalysisBook} { > bookAnnotation Sorry about that. I just updated the bug https://bugzilla.redhat.com/show_bug.cgi?id=1325013 so that it is public. Thanks for the patch. On Monday, I can drop that patch into the RPM that I've built for Fedora, rebuild it, and test it out. Thanks for the quick response! ------------ Regards, Alex P.S. I'm 99.99% sure I'm subscribed properly to the mailing list, but Steve, if you have to moderate this email let me know and I'll try to get it figured out. |
From: Alex W. <al...@un...> - 2016-04-27 17:13:15
|
>> Index: tcl/tools/analysis.tcl >> =================================================================== >> --- tcl/tools/analysis.tcl (revision 2523) >> +++ tcl/tools/analysis.tcl (working copy) >> @@ -3544,6 +3544,9 @@ >> append cmd { [ } " after $delay sendPosToEngineUCI $n $delay >> " { ] } >> set analysis(after$n) [eval [list after idle $cmd]] >> } else { >> + if {[sc_pos moves] == {}} { >> + return >> + } >> ### Dont send position if annotating and in book >> if { $::annotate(Engine) == $n && ! $::wentOutOfBook && >> $::useAnalysisBook} { >> bookAnnotation > > Sorry about that. I just updated the bug > https://bugzilla.redhat.com/show_bug.cgi?id=1325013 so that it is > public. > > Thanks for the patch. On Monday, I can drop that patch into the RPM > that I've built for Fedora, rebuild it, and test it out. Thanks for > the quick response! The patch worked. I've already incorporated it into the Fedora build at http://copr.fedoraproject.org/coprs/awood/scid_vs_pc Thanks for the assistance! --------------- Regards, Alex |