Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML hangs in debug mode run (ctrl+R) *only*
Forum Updated to NodeBB v4.3 + New Features

QML hangs in debug mode run (ctrl+R) *only*

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 648 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SeDiS Offline
    SeDiS Offline
    SeDi
    wrote on last edited by SeDi
    #1

    Hi,
    in a rather big project I have a condition where one Dialog hangs when I quickly click on a SpinBox multiple (like 10-15) times in a row.

    This happens in debug mode run (ctrl+R) only - neither while really debugging (F5) nor in release mode does this ever happen.
    The code of the spinbox is quite simple, it does even hang, when I comment out the whole onValueChanged block:

    SpinBox {
                id: percentSpinBox
                property bool disableSpinBox: false
                editable: true
                height: parent.height
                width: implicitWidth
                from: -100
                to: 200
                value: IncEditInterface ? IncEditInterface.percentValue : 0
                onValueChanged: {
    
                    console.debug("entering spinBox' onValueChanged with "+value)
                    console.debug("disableCombo is "+symbolCombo.disableCombo+", disableSpinBox is "+disableSpinBox)
                    if (!disableSpinBox && IncEditInterface) {
                        console.debug("spinBox starts to work")
                        disableSpinBox = true
                        symbolCombo.disableCombo = true
                        IncEditInterface.percentChanged(value);
                        symbolCombo.disableCombo = false
                        disableSpinBox = false
                    }
                    console.debug("leaving spinBox' onValueChange with "+value)
                }
            }
    

    Normally, there is a "half recovery" after a while, meaning that I can see the program reacting again in my Application output, but the UI stays unresponsive, sometimes I even have a weirdly blurred output like on the pic attached, that normalizes when I resize the dialog - but not to the current value, just to the value before the hanging.

    I have neither any idea of the root cause, nor do I see a possibility to get to its heart, because it doesn't happen when in step-by-step debugging.

    Any hints on how or where to look would be highly appreciated.0_1533074651678_f03cc09f-446f-4e45-8f98-f0cb8c432409-grafik.png
    [sorry for the typo here, gotta be "unnecessary"]

    DiracsbracketD 1 Reply Last reply
    0
    • SeDiS SeDi

      Hi,
      in a rather big project I have a condition where one Dialog hangs when I quickly click on a SpinBox multiple (like 10-15) times in a row.

      This happens in debug mode run (ctrl+R) only - neither while really debugging (F5) nor in release mode does this ever happen.
      The code of the spinbox is quite simple, it does even hang, when I comment out the whole onValueChanged block:

      SpinBox {
                  id: percentSpinBox
                  property bool disableSpinBox: false
                  editable: true
                  height: parent.height
                  width: implicitWidth
                  from: -100
                  to: 200
                  value: IncEditInterface ? IncEditInterface.percentValue : 0
                  onValueChanged: {
      
                      console.debug("entering spinBox' onValueChanged with "+value)
                      console.debug("disableCombo is "+symbolCombo.disableCombo+", disableSpinBox is "+disableSpinBox)
                      if (!disableSpinBox && IncEditInterface) {
                          console.debug("spinBox starts to work")
                          disableSpinBox = true
                          symbolCombo.disableCombo = true
                          IncEditInterface.percentChanged(value);
                          symbolCombo.disableCombo = false
                          disableSpinBox = false
                      }
                      console.debug("leaving spinBox' onValueChange with "+value)
                  }
              }
      

      Normally, there is a "half recovery" after a while, meaning that I can see the program reacting again in my Application output, but the UI stays unresponsive, sometimes I even have a weirdly blurred output like on the pic attached, that normalizes when I resize the dialog - but not to the current value, just to the value before the hanging.

      I have neither any idea of the root cause, nor do I see a possibility to get to its heart, because it doesn't happen when in step-by-step debugging.

      Any hints on how or where to look would be highly appreciated.0_1533074651678_f03cc09f-446f-4e45-8f98-f0cb8c432409-grafik.png
      [sorry for the typo here, gotta be "unnecessary"]

      DiracsbracketD Offline
      DiracsbracketD Offline
      Diracsbracket
      wrote on last edited by
      #2

      @SeDi
      What kind of object is IncEditInterface?

      Does IncEditInterface.percentChanged(value) result in IncEditInterface.percentValue to change?

      Do you somehow also set the Spinbox's value inside IncEditInterface ?

      Have you tried with another Qt version?

      1 Reply Last reply
      2
      • SeDiS Offline
        SeDiS Offline
        SeDi
        wrote on last edited by
        #3

        Thank you, Diracsbracket! I have tried out the hints in your questions, but finally the solution came from a totally unexpected ANGLE (sorry for the pun). With QtCreator 4.7.0 the default for QT_OPENGL has been changed from "desktop" to "angle" - I just had to change this back and everything is fine again (several other problems were solved as well by this…).

        For posterity: go to Projects | RunSettings | Run Environment and set QT_OPENGL to "desktop" (without "").

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved