cimarronOST / Monolith

UCI chess engine
GNU General Public License v3.0
9 stars 1 forks source link

memory error thrown #6

Closed MarksDen closed 6 years ago

MarksDen commented 6 years ago

in fritz 16 when in kibitzer or analysis mode the engine throws error msgbox "memory could not be written." it happens only in certain positions when moving backward (not forward) in a game.

Example: whites 43rd move to black's 42nd Bf4 move throws error.

[Event "Montreal International"] [Site "Montreal"] [Date "1979.04.13"] [Round "3"] [White "Larsen, Bent"] [Black "Karpov, Anatoly"] [Result "1/2-1/2"] [ECO "B10"] [WhiteElo "2620"] [BlackElo "2705"] [PlyCount "85"] [EventDate "1979.04.11"] [EventType "tourn"] [EventRounds "18"] [EventCountry "CAN"] [EventCategory "15"] [SourceTitle "MCL"] [Source "ChessBase"] [SourceDate "1999.07.01"] [SourceVersion "1"] [SourceVersionDate "1999.07.01"] [SourceQuality "1"]

  1. e4 c6 2. c4 d5 3. exd5 cxd5 4. cxd5 Nf6 5. Qa4+ Nbd7 6. Nc3 g6 7. d4 Bg7 8. Qb3 O-O 9. Bg5 Nb6 10. Bxf6 Bxf6 11. Nf3 Bg7 12. Be2 e6 13. dxe6 Bxe6 14. Qb5 a6 15. Qb4 Nd5 16. Qxb7 Rb8 17. Qxa6 Rxb2 18. Nxd5 Qxd5 19. O-O Ra8 20. Qd3 Raxa2 21. Rxa2 Qxa2 22. Re1 Bf8 23. Bf1 Bb4 24. Rc1 Rxf2 25. d5 Rxf1+ 26. Qxf1 Qxd5 27. Kh1 Be7 28. Rd1 Qb7 29. Rb1 Qa7 30. Ra1 Qc5 31. Nd2 Kg7 32. Re1 Qd4
  2. Qe2 Bf6 34. Ne4 Bh4 35. Rd1 Qe5 36. Qf3 h5 37. Qc3 Qxc3 38. Nxc3 Bf6 39. Ne4 Be5 40. Kg1 Bf5 41. Nc5 Bc7 42. Na6 Bf4 43. Nb4 1/2-1/2

error_msgbox

3-31-18:

It has occurred to me that this error could be a compiler problem for new amd ryzen cpu's - as a few other minGW engines throw same error code at same spot. I have not tested Monolith on intel cpus yet.

cimarronOST commented 6 years ago

Thank you for reporting this, I'll look into it as soon as possible.

cimarronOST commented 6 years ago

The crash is caused by a hash-entry ageing bug, I'd never considered analyzing while moving backwards through a game and therefore the ageing system hadn't been designed to handle entries that are getting "younger". So in this case no compiler problem. Because the crash only occurs in analysis mode while moving backwards in a game and doesn't affect normal game-play, the bug fix will be included in the next release. Until then, if someone really wants to analyze a game backwards with Monolith (which I doubt), the hash has to be cleared before every new analysis (e.g. through the 'Clear Hash' UCI command).