Hi~~~ Currently I have to trace some types of nodes in a custom background thread.
But as someone warn me before, Lots of API calls are not threadsafe.
Sometime in foreground maya may delete the node while this node being parsing in backgound and recording information.
So I check MStatus after each call to maya API function,but still get some access violation error ,which directly crashes maya:
...
MFnDependencyNode nodeFn (node,&stat);
...
MString nodeType =nodeFn.typeName(&stat); //Access violation writing at ...
I want to catch this kind of error, stop the function and return. Just anything to stop maya from crashing. Is there anyway to do so?