Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12308

Floating point exception using QListWidgetItem::setHidden()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.0, 4.7.1
    • 4.6.2, 4.6.3, 4.7.0
    • Widgets: Itemviews
    • None
    • Using Qt 4.6.2-shared that was packaged with Ubuntu 10.04.
    • 3c7e7992461b1fef37ada68244f1b5b891015bda

    Description

      I created a QListWidget with the following properties:

      iconSize: 48x48
      textElideMode: ElideNone
      verticalScrollMode: ScrollPerPixel
      horizontalScrollMode: ScrollPerPixel
      movement: static
      flow: LeftToRight
      isWrapping: true
      resizeMode: adjust
      layoutMode: Batched
      spacing: 15
      viewMode: IconMode
      sortingEnabled: true

      I creaeted 300 items in the list widget. I then allow a user to type text, which is used to filter the list by calling QListWidgetItem::setHidden(). If I type slowly, it works fine, although occasionally the items all jumble together in the top-left corner. however, if I type quickly (and apply the filter at each keystroke), I get the following floating point execption:

      Program received signal SIGFPE, Arithmetic exception.
      0x00007ffff3f5585f in QIconModeViewBase::initBspTree (this=0x23bf450,
      contents=<value optimized out>) at itemviews/qlistview.cpp:2762
      2762 itemviews/qlistview.cpp: No such file or directory.
      in itemviews/qlistview.cpp
      (gdb) bt
      #0 0x00007ffff3f5585f in QIconModeViewBase::initBspTree (this=0x23bf450,
      contents=<value optimized out>) at itemviews/qlistview.cpp:2762
      #1 0x00007ffff3f5898b in QIconModeViewBase::doDynamicLayout (this=0x23bf450,
      info=...) at itemviews/qlistview.cpp:2905
      #2 0x00007ffff3f5fb4c in QIconModeViewBase::doBatchedItemLayout (this=0x23bf450,
      info=<value optimized out>, max=<value optimized out>)
      at itemviews/qlistview.cpp:2739
      #3 0x00007ffff3f53175 in QListViewPrivate::doItemsLayout (this=0x23bb540,
      delta=<value optimized out>) at itemviews/qlistview.cpp:1717
      #4 0x00007ffff3f538f0 in QListView::timerEvent (this=0x23bb510, e=0x7fffffffd770)
      at itemviews/qlistview.cpp:811
      #5 0x00007ffff3222a63 in QObject::event (this=0x23bb510, e=0x7fffffffd770)
      at kernel/qobject.cpp:1212
      #6 0x00007ffff3a69bdf in QWidget::event (this=0x23bb510, event=0x7fffffffd770)
      at kernel/qwidget.cpp:8455
      #7 0x00007ffff3e114e6 in QFrame::event (this=0x23bb510, e=0x7fffffffd770)
      at widgets/qframe.cpp:557
      #8 0x00007ffff3e9c8ab in QAbstractScrollArea::event (this=0x23bb510,
      e=0x7fffffffd770) at widgets/qabstractscrollarea.cpp:989
      #9 0x00007ffff3f3958b in QAbstractItemView::event (this=0x23bb510,
      event=0x7fffffffd770) at itemviews/qabstractitemview.cpp:1546
      #10 0x00007ffff3a1422c in QApplicationPrivate::notify_helper (this=0x1893c40,
      --Type <return> to continue, or q <return> to quit--
      receiver=0x23bb510, e=0x7fffffffd770) at kernel/qapplication.cpp:4300
      #11 0x00007ffff3a1a6fb in QApplication::notify (this=0x7fffffffe050,
      receiver=0x23bb510, e=0x7fffffffd770) at kernel/qapplication.cpp:4183
      #12 0x00007ffff321306c in QCoreApplication::notifyInternal (this=0x7fffffffe050,
      receiver=0x23bb510, event=0x7fffffffd770) at kernel/qcoreapplication.cpp:704
      #13 0x00007ffff323fd42 in QCoreApplication::sendEvent (this=0x189cce0)
      at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
      #14 QTimerInfoList::activateTimers (this=0x189cce0)
      at kernel/qeventdispatcher_unix.cpp:603
      #15 0x00007ffff323c848 in timerSourceDispatch (source=<value optimized out>)
      at kernel/qeventdispatcher_glib.cpp:184
      #16 idleTimerSourceDispatch (source=<value optimized out>)
      at kernel/qeventdispatcher_glib.cpp:231
      #17 0x00007ffff06938c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
      #18 0x00007ffff0697748 in ?? () from /lib/libglib-2.0.so.0
      #19 0x00007ffff06978fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
      #20 0x00007ffff323c513 in QEventDispatcherGlib::processEvents (this=0x1899190,
      flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
      #21 0x00007ffff3ac446e in QGuiEventDispatcherGlib::processEvents (
      this=0x7ffff26d5e40, flags=<value optimized out>)
      at kernel/qguieventdispatcher_glib.cpp:204
      #22 0x00007ffff3211992 in QEventLoop::processEvents (this=<value optimized out>,
      --Type <return> to continue, or q <return> to quit--
      flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
      ) at kernel/qeventloop.cpp:149
      #23 0x00007ffff3211d6c in QEventLoop::exec (this=0x7fffffffda10, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
      )
      at kernel/qeventloop.cpp:201
      #24 0x00007ffff3215aab in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
      #25 0x000000000058a7de in main (argc=2, argv=0x7fffffffe338) at src/main.cxx:187

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            djsmith Dave Smith
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes