CXX0030: Error: expression cannot be evaluated 
Author Message
 CXX0030: Error: expression cannot be evaluated

I am currently working on a game which is multithreaded.  My primary
thread maintains most of the functionality. Another thread listens to
a socket connection (connectionThread) for an AI bot to connect to.
Within the primary thread, there is a StateRepository class, which
contains data which both the connectionThread and the primary thread
modify.  However, whenever my connection thread calls a method within
the StateRepository, an Access Violation error is thrown.  

Below is a sample method that the connectionThread calls.  This method
is also called by the primary thread a few times, but this is before
the connectionThread is even started.

int CStateRepository::RegisterAgent()

 AgentState agent;
 EntityMap agentLoc;
 agentLoc.agentID = agentIDCounter;
 agentLoc.entityType = "NULL";
 agentLoc.state = M_IDLE;

 agent.agentID = agentIDCounter;
 agent.direction = 0;
 agent.modelState = (mState)M_IDLE;
 strcpy(agent.visionString, "");


 return agentIDCounter;


I ran the de{*filter*} and to check why an Access Violation error is still
whenever the connectionThread calls CStateRepository::RegisterAgent()
method (shown above).  The access violation is thrown as soon as the
context switches to the CStateRepository::RegisterAgent method.  In
the variable watch window, the values for all variables are: "CXX0030:
Error: expression cannot be evaluated".  Is there some reason why any
particular thread cannot access data members from another thread?  The
connectionThread does get passed a pointer to the CStateRepository
class, so I would think that all datamembers will have values set. ...
but obviously i must be wrong on this.

For what its worth, the primary thread will not
be calling this method with the exception of before the
connectionThread was started, but does call other methods within the
CStateRepository class routinely. I am using VC++ 6. Thank you for
your time and any help you may bring.


Tue, 13 Sep 2005 16:51:13 GMT  
 [ 1 post ] 

 Relevant Pages 

1. why expression cannot be evaluated?

2. expression cannot be evaluated

3. cxx0069 and cxx0030 errors

4. Recursive program that evaluate a postfix expression

5. Program to Evaluate Boolean Expressions

6. Evaluating Expressions/Conversion

7. Evaluating an expression.

8. Evaluating expressions....

9. Evaluate the Expression

10. evaluate a string as a mathematical expression

11. evaluating math expressions

12. evaluating expression with chars/unsigned shorts


Powered by phpBB® Forum Software