Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: One more time Delphi and UCI

Author: Tony Werten

Date: 23:02:01 04/21/02

Go up one level in this thread


On April 21, 2002 at 17:33:01, Martin Bauer wrote:

>Hello,
>
>a few days ago i asked for delphi and UCI: how to listen at stdin while
>calculating a move. Now I tried to fix the problem by following the given hints.
>
>My application is NOT a console application, so i tried to listen at stdin with
>a delphi tread object. It works in normal mode, but not if i start my engine
>with the Fritz7 GUI.
>
>Then I tried the given hints with the createthread() command:
>
>******************************************************
>unit Main;
>interface
>uses [...]
>const [...some const declarations]
>type[...some type declarations]
>var[...some other variable]
>  Threadid : THandle;
>
>implementation
>[...]
>procedure listen_sdtin;
>begin
>  // listening at stdin and processing the commands
>end;
>[... many other functions for calculating the best move ...]
>
>initialization
>   createthread(nil,0,@listen_sdtin,nil,0,Threadid);
>// creating the tread to listen stdin.
>******************************************************
>
>but now I get a "access violation" (I hope I translated correctly) when the
>engine starts calculating, there is no problem while identyfing the engine. The
>problem is hard to find, because with the Fritz GUI I can't debug the program.

So why do you use it ? Just a thought, try winboard.

>But there are problems with delphi threads and the VCL, you must use the
>synchronize() command.

No you don't.

>So I thought this may be the problem and now I made a
>console application - but the same problem: access violation. There are no
>errors when compiling.
>
>Any Ideas?

My code only gives this when you're trying to read from the stdin but it is not
started with a pipe. But then again, my code doesn't use a thread object.

Tony

>
>Regards
>
>Martin



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.