Computer Chess Club Archives


Search

Terms

Messages

Subject: Another possiblity...

Author: Eiko Bleicher

Date: 07:13:48 10/26/03

Go up one level in this thread


>>>void uci_wait_for_command() {
>>>  char command[10000];
>>>
>>>  fgets(command, 10000, stdin);
>>>  uci_handle_command(command); }
>>

I don't know your code, but if command is a local variable, its allocated space
is destroyed when the function returns.

Are you sure (I mean very sure ;-)) that it crashes in the fgets()?

It might crash in the uci_handle_command() function, if i. e. it starts a new
thread and keeps using this buffer, or it just copies that command-pointer to
another variable and then returns.

Then, if it is used later, the command buffer is void, but still references to
it exist.

Just an idea :-) Happy hunting!

Eiko



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.