[Bug 363251] New: setting `Value to nil in SelectionBox causes Segfault
https://bugzilla.novell.com/show_bug.cgi?id=363251 Summary: setting `Value to nil in SelectionBox causes Segfault Product: openSUSE 11.0 Version: Alpha 2 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: sh@novell.com ReportedBy: aschnell@novell.com QAContact: jsrain@novell.com Found By: Development Setting the `Value to nil in SelectionBox causes Segfault. Found in example Events.ycp ("Special..." -> "Candel order"). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=363251 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=363251#c1 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Normal |Major --- Comment #1 from Stefan Hundhammer <sh@novell.com> 2008-02-29 09:40:17 MST --- No longer segfaults, but also doesn't properly deselect. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=363251 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=363251#c2 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Stefan Hundhammer <sh@novell.com> 2008-03-04 06:28:20 MST --- Arg. This bug seems to have been introduced intentionally. I just can't believe this. void YQSelectionBox::deselectAllItems() { YSelectionBox::deselectAllItems(); _qt_listBox->clearSelection(); if ( _qt_listBox->currentRow() > -1 ) { // Some item is selected after all; the Qt documtation says this // happens if the QListBox is in single selection mode (which it is) // and has the keyboard focus. // // Synchronize internal "selected" flags with what the QListBox // displays. This has a small performance penalty because it calls // YSelectionBox::deselectAllItems() again which again iterates over // all items. selectItem( _qt_listBox->row(_qt_listBox->currentItem()) ); } } Well, this is clearly too cheap. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=363251 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|setting `Value to nil in SelectionBox causes |setting `Value to nil in SelectionBox has no |Segfault |effect -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=363251 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=363251#c3 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|setting `Value to nil in SelectionBox has no |setting `Value to nil in SelectionBox segfaults |effect | --- Comment #3 from Stefan Hundhammer <sh@novell.com> 2008-03-04 08:44:14 MST --- It still segfaults. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=363251 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=363251#c4 --- Comment #4 from Stefan Hundhammer <sh@novell.com> 2008-03-04 08:45:22 MST --- 2008-03-04 16:43:17 <1> snell(32541) [YCP] examples/Events.ycp:19 formatEvent($["EventSerialNo":6, "EventType":"MenuEvent", "ID":`cancel_order]) 2008-03-04 16:43:17 <1> snell(32541) [YCP] examples/Events.ycp:252 Cancelling order 2008-03-04 16:43:17 <3> snell(32541) [qt-ui] src/YQUI_core.cc(qMessageHandler):611 <qt-fatal> ASSERT: "!isEmpty()" in file /usr/include/QtCore/qlist.h, line 229 2008-03-04 16:43:17 <3> snell(32541) [liby2] genericfrontend.cc(signal_handler):133 got signal 6 at YCP file /local_home/sh/yast2/trunk/ycp-ui-bindings/examples/Events.ycp:254 2008-03-04 16:43:17 <3> snell(32541) [liby2] genericfrontend.cc(log_backtrace):81 Back trace: Frame 0: /usr/lib/liby2.so.2 log_backtrace() Frame 1: /usr/lib/liby2.so.2 signal_handler(int) Frame 2: [0xb7f92420] Frame 3: [0xb7f92410] Frame 4: /lib/libc.so.6(abort+0x101) [0xb7a03801] Frame 5: /usr/lib/YaST2/plugin/libpy2qt.so.2 [0xb66de6b5] Frame 6: /usr/lib/libQtCore.so.4 qt_message_output(QtMsgType, char const*) Frame 7: /usr/lib/libQtCore.so.4 qFatal(char const*, ...) Frame 8: /usr/lib/libQtCore.so.4 qt_assert(char const*, char const*, int) Frame 9: /usr/lib/YaST2/plugin/libpy2qt.so.2 QList<QListWidgetItem*>::first() Frame 10: /usr/lib/YaST2/plugin/libpy2qt.so.2 YQSelectionBox::slotSelectionChanged() Frame 11: /usr/lib/YaST2/plugin/libpy2qt.so.2 YQSelectionBox::qt_metacall(QMetaObject::Call, int, void**) Frame 12: /usr/lib/libQtCore.so.4 QMetaObject::activate(QObject*, int, int, void**) Frame 13: /usr/lib/libQtCore.so.4 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) Frame 14: /usr/lib/libQtGui.so.4 QListWidget::itemSelectionChanged() Frame 15: /usr/lib/libQtGui.so.4 QListWidget::qt_metacall(QMetaObject::Call, int, void**) Frame 16: /usr/lib/libQtCore.so.4 QMetaObject::activate(QObject*, int, int, void**) Frame 17: /usr/lib/libQtCore.so.4 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) Frame 18: /usr/lib/libQtGui.so.4 QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) Frame 19: /usr/lib/libQtGui.so.4 QItemSelectionModel::clearSelection() Frame 20: /usr/lib/libQtGui.so.4 QAbstractItemView::clearSelection() Frame 21: /usr/lib/YaST2/plugin/libpy2qt.so.2 YQSelectionBox::deselectAllItems() Frame 22: /usr/lib/YaST2/plugin/libpy2UI.so.2 bool trySetSelectionWidgetValue<YSelectionBox, YCPItem>(YWidget*, YCPValue const&) Frame 23: /usr/lib/YaST2/plugin/libpy2UI.so.2 YCPPropertyHandler::trySetSelectionBoxValue(YWidget*, YCPValue const&) Frame 24: /usr/lib/YaST2/plugin/libpy2UI.so.2 YCPPropertyHandler::setComplexProperty(YWidget*, std::string const&, YCPValue const&) Frame 25: /usr/lib/YaST2/plugin/libpy2UI.so.2 YCP_UI::ChangeWidget(YCPValue const&, YCPValue const&, YCPValue const&) Frame 26: /usr/lib/YaST2/plugin/libpy2UI.so.2 YUINamespace::ChangeWidget(YCPSymbol const&, YCPSymbol const&, YCPValue const&) Frame 27: /usr/lib/YaST2/plugin/libpy2UI.so.2 YUIFunction::evaluateCall_int() Frame 28: /usr/lib/YaST2/plugin/libpy2UI.so.2 YCPBuiltinCaller::call() Frame 29: /usr/lib/libyui.so.3 YUI::uiThreadMainLoop() Frame 30: /usr/lib/libyui.so.3 start_ui_thread(void*) Frame 31: /lib/libpthread.so.0 [0xb7d06112] Frame 32: /lib/libc.so.6(clone+0x5e) [0xb7a982ee] == End of back trace === -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=363251 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=363251#c5 Stefan Hundhammer <sh@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #5 from Stefan Hundhammer <sh@novell.com> 2008-03-04 09:58:06 MST --- Fixed the segfault (caused by false assumption that the list returned by QListWidget::selectedItems() can be used with QList::first() if it is empty) and also deselecting the items: QListWidget::setCurrentItem(-1) does the trick, even if single selection is set. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=363251 User sh@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=363251#c6 --- Comment #6 from Stefan Hundhammer <sh@novell.com> 2008-03-04 09:59:34 MST --- Fix available with yast2-qt-2.16.32. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com