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



  • 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"]



  • @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?



  • 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 "").


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.