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:

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: . The snippet above comes from the bottom of xtaloptdialog.cpp

You can respond by visiting: