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

QDoubleSpinBox asserts in validate with default properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.1.2, 6.1.3, 6.2.0 RC
    • Fix Version/s: 6.2.1, 6.3.0 Alpha
    • Labels:
      None
    • Environment:
      Windows 10, MSVC 19.29 x64
    • Platform/s:
      Windows
    • Commits:
      c1281c306c1304374cb7ba1c341db71b584bf6c6 (qt/qtbase/dev) 46c1ca0f323d8578c7550b12cd361a8334c16a4c (qt/qtbase/6.2)

      Description

      I was trying to use a QDoubleSpinBox in my project, and always got an assert on startup.

      • Launch the repro application
      • EXPECTED: The application runs and shows QDoubleSpinBox with default properties
      • ACTUAL: The application terminates with an assert

      Assert message from debug build:

      Program: D:\Programs\Qt\6.2.0\msvc2019_64\bin\Qt6Cored.dll
      Module: 6.2.0
      File: C:\Users\qt\work\qt\qtbase\include\QtCore\../../src/corelib/text/qstring.h
      Line: 1210
      ASSERT: "size_t(i) < size_t(size())" in file C:\Users\qt\work\qt\qtbase\include\QtCore\../../src/corelib/text/qstring.h, line 1210
      

       
      Callstack:

      1  qt_message_fatal                            qlogging.cpp           1869
      2  QMessageLogger::fatal                       qlogging.cpp           891 
      3  qt_assert                                   qglobal.cpp            3281
      4  QString::at                                 qstring.h              1210
      5  QDoubleSpinBoxPrivate::validateAndInterpret qspinbox.cpp           1284
      6  QDoubleSpinBox::validate                    qspinbox.cpp           1035
      7  QSpinBoxValidator::validate                 qabstractspinbox.cpp   1995
      8  QWidgetLineControl::finishChange            qwidgetlinecontrol.cpp 721 
      9  QWidgetLineControl::internalSetText         qwidgetlinecontrol.cpp 786 
      10 QWidgetLineControl::setText                 qwidgetlinecontrol_p.h 254 
      11 QLineEditPrivate::setText                   qlineedit_p.cpp        290 
      12 QLineEdit::setText                          qlineedit.cpp          320 
      13 QAbstractSpinBoxPrivate::updateEdit         qabstractspinbox.cpp   1820
      14 QAbstractSpinBox::showEvent                 qabstractspinbox.cpp   839 
      15 QWidget::event                              qwidget.cpp            8910
      16 QAbstractSpinBox::event                     qabstractspinbox.cpp   823 
      17 QApplicationPrivate::notify_helper          qapplication.cpp       3401
      18 QApplication::notify                        qapplication.cpp       3351
      19 QCoreApplication::notifyInternal2           qcoreapplication.cpp   1063
      20 QCoreApplication::sendEvent                 qcoreapplication.cpp   1472
      21 QWidgetPrivate::show_helper                 qwidget.cpp            7832
      22 QWidgetPrivate::setVisible                  qwidget.cpp            8130
      23 QWidget::setVisible                         qwidget.cpp            8061
      24 QWidget::show                               qwidget.cpp            7687
      25 QWidgetPrivate::showChildren                qwidget.cpp            8202
      26 QWidgetPrivate::show_helper                 qwidget.cpp            7789
      27 QWidgetPrivate::setVisible                  qwidget.cpp            8130
      28 QWidget::setVisible                         qwidget.cpp            8061
      29 QWidget::show                               qwidget.cpp            7687
      30 main                                        main.cpp               12  
      31 invoke_main                                 exe_common.inl         79  
      32 __scrt_common_main_seh                      exe_common.inl         288 
      33 __scrt_common_main                          exe_common.inl         331 
      34 mainCRTStartup                              exe_main.cpp           17  
      35 BaseThreadInitThunk                         KERNEL32                   
      36 RtlUserThreadStart                          ntdll                      
      

        Attachments

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

          Activity

            People

            Assignee:
            Eddy Edward Welbourne
            Reporter:
            snrwk Leon Scharnowski
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes