jonnydee/nzmqt — Issue #3: Destruction problem with Qt 4.8.0 on MacOSX Lion
Author: jmesquita
Created: 2012-03-05 22:36:50+00:00
State: open

I am not sure how to even start tracking this problem down. It might be me coding it wrong but I am getting an ASSERT every time the application quits.

By the looks of it, it seems to be caused by the destruction of PollingZMQContext.

The assert is on: ASSERT: "staticMetaObject.cast(_o)" in file moc_nzmqt.cpp, line 294

The offending code seems to be on line 415 of nzmqt.hpp:

// Deleting children is necessary, because otherwise the children are deleted after the context
// which results in a blocking state. So we delete the children before the zmq::context_t
// destructor implementation is called.
inline ~ZMQContext()
{
QObjectList children_ = children();
foreach (QObject* child, children_)
delete child;
}

It is important to say that the problem only started to occur when I upgraded the Qt libs to 4.8.0. On 4.7.4, the problem was not being caused.

I am available at any time for debugging if necessary.

Thank you