System.AccessViolationException

The engine.
Post Reply
voxxxo
Posts: 3
Joined: Fri Jul 09, 2010 4:14 pm

System.AccessViolationException

Post by voxxxo »

I don't know if someone face this problem before, I am using C# and C++ with smile.h to develop a web service. everything is fine, deploy it to the IIS server, I loop for few time to read the xsdl fie, i get this error:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at DSL_network.{dtor}(DSL_network* )
Can it be because I did not clear the belief?
Last edited by voxxxo on Sun Jul 18, 2010 7:24 am, edited 2 times in total.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: System.AccessViolationException

Post by shooltz[BayesFusion] »

Can it be because I did not clear the belief?
No, I would check the return value of FindNode call; maybe your 'node' parameter is incorrect (node identifiers in SMILE are case-seensitive).
voxxxo
Posts: 3
Joined: Fri Jul 09, 2010 4:14 pm

Post by voxxxo »

It return a result for three time then the system corrupted.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

voxxxo wrote:It return a result for three time then the system corrupted.
You should explicitly check the DSL_node pointer before dereferencing it and calling Value() method:

DSL_node *p = theNet.GetNode(theNet.FindNode(node));
if (p == NULL)
{
// can't find node by its id
}
voxxxo
Posts: 3
Joined: Fri Jul 09, 2010 4:14 pm

Post by voxxxo »

Thnks Schooz, It work now.
Post Reply