Michael Fawcett wrote:
On 4/19/07, Paul Giaccone
wrote: Paul Giaccone wrote:
Hm, that made no difference... Maya is still hanging with a segmentation fault when delete() is being called (not by me, incidentally) after 24 out of 48 frames have been processed, as if it is deciding it doesn't want the node after that length of time. It still works fine in Windows.
I don't think it has anything to do with Boost. I specifically remember using smart_ptrs (and other Boost libraries) in conjunction with the Maya SDK, but I no longer have Maya installed so I can't code up a quick test for you.
I imagine the problem is with the usage of the smart_ptrs, or lies elsewhere. Can you maybe post a small sample of your usage?
Hm, it's hard to cut it down to anything small, but I'll try to give
just the minimum here. Here's the creation of the node:
void* MyNode::creator(void)
{
return new MyNode();
}
Here's the constructor:
MyNode::MyNode(void) : success(false), error_message(""), info(0)
{
position.second.resize(NumPositionParameters);
orientation.reset(new double[NumOrientationParameters]);
previous_position_parameter.resize(NumPositionParameters);
for (unsigned int parameter = 0; parameter !=
NumPositionParameters; ++parameter)
{
previous_position_parameter[parameter] = 0.0;
}
}
where the following are declared in the header file (as well as lots of
other non-pointer variables):
boost::scoped_ptr<Info> info;
std::pair