Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.AccessViolationException: Attempted to read or write protected memory #27

Closed
AlexanderSWilliams opened this issue Jan 6, 2021 · 1 comment

Comments

@AlexanderSWilliams
Copy link

Here is the full output of the message I'm seeing:

Ceres < uci
Ceres > |=====================================================|
Ceres > | Ceres - A Monte Carlo Tree Search Chess Engine |
Ceres > | |
Ceres > | (c) 2020- David Elliott and the Ceres Authors |
Ceres > | With network backend code from Leela Chess Zero. |
Ceres > | |
Ceres > | Version 0.80. Use help to list available commands. |
Ceres > | {git}
Ceres > |=====================================================|
Ceres > Ceres user settings loaded from file Ceres.json
Ceres > Network evaluation configured to use:
Ceres > Entering UCI command processing mode.
Ceres > id name Ceres
Ceres > id author David Elliott and the Ceres Authors
Ceres > uciok
Ceres < isready
Ceres > Fatal error.
Ceres > System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Ceres > Repeat 2 times:

Ceres > --------------------------------

Ceres > at Ceres.Chess.NNEvaluators.LC0DLL.LCO_Interop.Alloc(Int32, System.String, Int32)
Ceres >

Ceres > at Ceres.Chess.NNEvaluators.Internals.LC0LibraryNNEvaluator..ctor(System.String, Int32)
Ceres >

Ceres > at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(Ceres.Chess.NNFiles.INNWeightsFileInfo, Int32[], Chess.Ceres.NNEvaluators.NNEvaluatorPrecision)
Ceres >

Ceres > at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(Ceres.Chess.NNFiles.INNWeightsFileInfo, Int32, Chess.Ceres.NNEvaluators.NNEvaluatorPrecision)
Ceres >

Ceres > at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.Singleton(Ceres.Chess.NNEvaluators.Defs.NNEvaluatorNetDef, Ceres.Chess.NNEvaluators.Defs.NNEvaluatorDeviceDef)
Ceres >

Ceres > at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.DoBuildEvaluator(Ceres.Chess.NNEvaluators.Defs.NNEvaluatorDef)
Ceres >

Ceres > at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.BuildEvaluator(Ceres.Chess.NNEvaluators.Defs.NNEvaluatorDef)
Ceres >

Ceres > at Ceres.MCTS.Params.NNEvaluatorSet.MakeEvaluator()
Ceres >

Ceres > at Ceres.MCTS.Params.NNEvaluatorSet.get_Evaluator1()
Ceres >

Ceres > at Ceres.MCTS.Search.MCTSSearchFlow..ctor(Ceres.MCTS.Iteration.MCTSManager, Ceres.MCTS.Iteration.MCTSIterator)
Ceres >

Ceres > at Ceres.MCTS.Iteration.MCTSManager.DoSearch(Ceres.Chess.SearchLimit, MCTSProgressCallback)
Ceres >

Ceres > at Ceres.MCTS.Iteration.MCTSManager.Search(Ceres.MCTS.Iteration.MCTSManager, Boolean, MCTSProgressCallback, Boolean)
Ceres >

Ceres > at Ceres.MCTS.Iteration.MCTSLaunch.Search(Ceres.MCTS.Params.NNEvaluatorSet, Ceres.MCTS.Params.ParamsSelect, Ceres.MCTS.Params.ParamsSearch, Ceres.MCTS.Managers.Limits.IManagerGameLimit, Ceres.MCTS.Iteration.ParamsSearchExecutionModifier, Ceres.MCTS.Iteration.MCTSIterator, Ceres.Chess.Positions.PositionWithHistory, Ceres.Chess.SearchLimit, Boolean, System.DateTime, System.Collections.Generic.List`1<Ceres.Chess.GameEngines.GameMoveStat>, MCTSProgressCallback, Boolean, Boolean)
Ceres >

Ceres > at Ceres.Features.GameEngines.GameEngineCeresInProcess.RunSearchPossiblyTreeReuse(Ceres.MCTS.Iteration.MCTSIterator, Ceres.Chess.Positions.PositionWithHistory, System.Collections.Generic.List`1<Ceres.Chess.GameEngines.GameMoveStat>, Ceres.Chess.SearchLimit, MCTSProgressCallback, Boolean)
Ceres >

Ceres > at Ceres.Features.GameEngines.GameEngineCeresInProcess.DoSearch(Ceres.Chess.Positions.PositionWithHistory, Ceres.Chess.SearchLimit, System.Collections.Generic.List`1<Ceres.Chess.GameEngines.GameMoveStat>, ProgressCallback, Boolean)
Ceres >

Ceres > at Ceres.Chess.GameEngines.GameEngine.Search(Ceres.Chess.Positions.PositionWithHistory, Ceres.Chess.SearchLimit, System.Collections.Generic.List`1<Ceres.Chess.GameEngines.GameMoveStat>, ProgressCallback, Boolean)
Ceres >

Ceres > at Ceres.Chess.GameEngines.GameEngine.Warmup()
Ceres >

Ceres > at Ceres.Features.UCI.UCIManager.InitializeEngineIfNeeded()
Ceres >

Ceres > at Ceres.Features.UCI.UCIManager.PlayUCI()
Ceres >

Ceres > at Ceres.Commands.DispatchCommands.LaunchUCI(System.String, System.String)
Ceres >

Ceres > at Ceres.Commands.DispatchCommands.ProcessCommand(System.String)
Ceres >

Ceres > at Ceres.Program.Main(System.String[])
Ceres >

Ceres < ucinewgame
Ceres < position startpos moves g1f3 d7d6 g2g3 e7e5 c2c4
Ceres < go infinite

@dje-dev
Copy link
Owner

dje-dev commented Jan 8, 2021

The error is happening as it tries to communicate with the LC0.DLL. These types of low level errors are typically due to version mismatches of CUDA on your machine with Ceres. We are still working on understanding exactly what versions of CUDA are supported/required. You might ask for help on the Leela Chess Zero Discord (#help channel).

@dje-dev dje-dev closed this as completed Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants