Thread problems during moleculeChanged calls

Bugs item #2791266, was opened at 2009-05-13 15:40
Message generated for change (Tracker Item Submitted) made by mr_grieves
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=835077&aid=2791266&group_id=165310

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Commands / Extensions
Group: v 0.9.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mr_Grieves (mr_grieves)
Assigned to: Marcus D. Hanwell (cryosuk)
Summary: Thread problems during moleculeChanged calls

Initial Comment:
When calling moleculeChanged to update the mainwindow’s widget, I will frequently get one of the following:

ASSERT failure in QReadLocker: “QReadWriteLock pointer is misaligned”, file /usr/include/QtCore/qreadwritelock.h, line 132

QMutex::lock: mutex lock failure:

or sometimes just a segfault. It happens during the following call to moleculeChanged – the debug at the begin appears, but not the last. m_results_list is a QList<Xtal*>*, where Xtal is a class derived from Avogadro::Molecule.

void XtalOptDialog::selectMoleculeFromResults(int row,int,int oldrow,int) {
qDebug() << “XtalOptDialog::selectMoleculeFromResults( " << row << " " << oldrow << " ) called”;
if (row == oldrow) return;
emit moleculeChanged(m_results_list->at(row));
qDebug() << “molecule set!”;
}

This is happening with the code at this revision of the xtalopt extension: http://github.com/dlonie/avogadro-XtalOpt/commit/a304f765bd2ace3cd42f03af2c9a9946cf1a1f25 . The snippet above comes from the bottom of xtaloptdialog.cpp


You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=835077&aid=2791266&group_id=165310