Ticket #1691 (closed: fixed)
Update Instruments when the facility is changed
Reported by: | Nick Draper | Owned by: | Michael Whitty |
---|---|---|---|
Priority: | blocker | Milestone: | Iteration 25 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Russell Taylor |
Description
This should be implemented by the ConfigService emiting a signal when any property has been updated (perhaps not on first loading).
This signal should contain the following:
- The name of the changed property
- The new vlue of the property
- Possibly the old value of the property (if it is easy)
Instrument widgets and other items can subscribe to the signal, filter out those it cares about and act on the.
Change History
comment:5 Changed 10 years ago by Michael Whitty
- Status changed from accepted to verify
- Resolution set to fixed
comment:6 Changed 10 years ago by Janik Zikovsky
- Status changed from verify to verifying
- Tester set to Janik Zikovsky
comment:7 Changed 10 years ago by Janik Zikovsky
- Status changed from verifying to reopened
- Resolution fixed deleted
I have gotten a reproducible segfault with these steps:
- Start MantidPlot
- Open Preferences. Go to Mantid.
- Facility says ISIS, switch to SNS. (Note the error message, but that's not a crash)
- Select POWGEN.
- Click OK.
- Go back to Preferences.
- Select ISIS again and ALF.
- Click OK.
- Segfault!
comment:8 Changed 10 years ago by Janik Zikovsky
Additional note: This is running under Ubuntu 10.10, with the debug-compiled version.
comment:9 Changed 10 years ago by Russell Taylor
I've seen this on mac & rhel as well. Here's a stack trace:
#0 0x00000033228d0bb2 in QComboBox::clear() () from /usr/lib64/libQtGui.so.4 #1 0x00002aaaac876035 in MantidQt::MantidWidgets::InstrumentSelector::fillWithInstrumentsFromFacility (this=0x12692e0, name=...)
at src/InstrumentSelector.cpp:102
#2 0x00002aaaac8766c5 in MantidQt::MantidWidgets::InstrumentSelector::handleConfigChange (this=0x12692e0, pNf=...) at src/InstrumentSelector.cpp:79 #3 0x00002aaaac877619 in Poco::NObserver<MantidQt::MantidWidgets::InstrumentSelector, Mantid::Kernel::ConfigServiceImpl::ValueChanged>::notify (
this=0x1264840, pNf=0x1d07720) at /usr/include/Poco/NObserver.h:103
#4 0x00002aaaacfee4de in Poco::NotificationCenter::postNotification(Poco::AutoPtr<Poco::Notification>) () from /usr/lib64/libPocoFoundationd.so.8 #5 0x00002aaaac25990d in Mantid::Kernel::ConfigServiceImpl::setString (
this=0x1206eb0, key=..., value=...) at ../src/ConfigService.cpp:714
#6 0x00000000007c82c2 in ConfigDialog::apply (this=0x133f490)
at src/ConfigDialog.cpp:1661
#7 0x00000000007c8709 in ConfigDialog::accept (this=0x133f490)
at src/ConfigDialog.cpp:1488
#8 0x0000000000a79bed in ConfigDialog::qt_metacall (this=0x133f490,
_c=InvokeMetaMethod, _id=2, _a=0x7fffffffb040) at ../tmp/qtiplot/debug/moc_ConfigDialog.cpp:105
#9 0x0000003321f58dfb in QMetaObject::activate(QObject*, int, int, void) ()
from /usr/lib64/libQtCore.so.4
#10 0x0000003322b251e7 in QAbstractButton::clicked(bool) ()
from /usr/lib64/libQtGui.so.4
comment:12 Changed 10 years ago by Michael Whitty
- Status changed from accepted to verify
- Resolution set to fixed
comment:13 Changed 10 years ago by Russell Taylor
- Status changed from verify to verifying
- Tester changed from Janik Zikovsky to Russell Taylor
comment:14 Changed 10 years ago by Russell Taylor
comment:15 Changed 10 years ago by Russell Taylor
- Status changed from verifying to closed
No crashes any more and looks like it does the right thing.
comment:16 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 2538