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

Layout with negative spacing crashes application in debug mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.1.1, 5.2.0
    • Fix Version/s: 5.2.1
    • Component/s: Quick: Layouts
    • Labels:
      None
    • Environment:
      Windows 7, x86, msvc2010, ANGLE
    • Commits:
      bc973dcf2163b25f2db74d974b252384bbee8d80

      Description

      I want to set negative spacing in the ColumnLayout so one component could overlap another. In debug build this fails one assert which leads to a crash.
      Example in the attachment.

      Message in the console

      ASSERT: "spacing >= 0.0" in file qgridlayoutengine.cpp, line 816 global\qglobal.cpp: 2096

      Stacktrace

      0 qt_message_fatal qlogging.cpp 972 0x533c3d71
      1 QMessageLogger::fatal qlogging.cpp 384 0x533c1fe4
      2 qt_assert qglobal.cpp 2096 0x533bc254
      3 QGridLayoutEngine::setSpacing qgridlayoutengine.cpp 816 0x5a5ab9fa
      4 QQuickLinearLayout::setSpacing qquicklinearlayout.cpp 866 0x5a5bf83a
      5 QQuickLinearLayout::qt_metacall moc_qquicklinearlayout_p.cpp 547 0x5a5c4fbb
      6 QQuickColumnLayout::qt_metacall moc_qquicklinearlayout_p.cpp 703 0x5a5c520b
      7 QMetaObject::metacall qmetaobject.cpp 309 0x5367eec0
      8 QQmlVME::run qqmlvme.cpp 397 0x55a67c8a
      9 QQmlVME::execute qqmlvme.cpp 200 0x55a67515
      10 QQmlComponentPrivate::beginCreate qqmlcomponent.cpp 905 0x55a5a7b6
      11 QQmlComponent::beginCreate qqmlcomponent.cpp 844 0x55a5a3e2
      12 QQmlComponent::create qqmlcomponent.cpp 803 0x55a5a34a
      13 QQuickView::continueExecute qquickview.cpp 462 0x56021c7d
      14 QQuickViewPrivate::execute qquickview.cpp 107 0x56020d78
      15 QQuickView::setSource qquickview.cpp 236 0x5602108f
      16 QtQuick2ApplicationViewer::setMainQmlFile qtquick2applicationviewer.cpp 71 0x1221899
      17 main main.cpp 9 0x122117a
      18 WinMain qtmain_win.cpp 131 0x1222eda
      19 __tmainCRTStartup crtexe.c 547 0x1222410
      20 WinMainCRTStartup crtexe.c 371 0x122219f
      21 BaseThreadInitThunk kernel32 0x769bed5c
      22 __RtlUserThreadStart ntdll 0x77af37eb
      23 _RtlUserThreadStart ntdll 0x77af37be

        Attachments

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

          Activity

            People

            Assignee:
            smd Jan Arve
            Reporter:
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes