Bug 324942

Summary: Qt Designer hangs when slider is enabled for KIntNumInput
Product: [Plasma] Oxygen Reporter: Alexander Mezin <mezin.alexander>
Component: styleAssignee: Hugo Pereira Da Costa <hugo.pereira.da.costa>
Status: RESOLVED WORKSFORME    
Severity: crash CC: cfeck, hugo.pereira.da.costa
Priority: NOR    
Version First Reported In: 4.11.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: UI file that can be used to reproduce the issue

Description Alexander Mezin 2013-09-15 20:01:40 UTC
When I open a form that contains KIntNumInput with sliderEnabled set to true, Qt Designer hangs.

Reproducible: Always

Steps to Reproduce:
1. Create a form in Qt Designer
2. Add KNumInput
3. Save and close
4. Load the form
Actual Results:  
Qt Designer hangs

Expected Results:  
Form loads

Happens with both Qt Designer and Qt Creator
Doesn't happen for KDoubleNumInput
Comment 1 Christoph Feck 2013-09-17 23:45:24 UTC
I could not reproduce. Can you please attach that .ui file? Does it happen with every widget style (e.g. Oxygen, Plastique)?
Comment 2 Christoph Feck 2013-10-01 23:57:21 UTC
If you can provide the information requested in comment #1, please add it.
Comment 3 Alexander Mezin 2013-10-02 05:59:02 UTC
It happens with oxygen style only.
KIntNumInput by default has minValue = INT_MIN and maxValue = INT_MAX.
When I enable slider, Oxygen tries to draw maxValue - minValue ticks, and it takes really long time (I've attached gdb, and it was inside Style::renderSliderTickmarks).
Comment 4 Christoph Feck 2013-10-02 10:34:32 UTC
Thanks for the update. Note that you need to attach backtraces using the web page's "Add an attachment" link, sending attachments by mail does not work.
Comment 5 Hugo Pereira Da Costa 2013-10-02 10:40:55 UTC
Interesting case. Any other widget style that draws ticks ? 
My guess would rather be that this is an inconsistency between, min value, max value, and tickInterval, or pageStep. returned for kIntNumInput
The latter, if non zero, are what oxygen uses for defining the number of ticks, and I guess this ends up being a very large number of ticks. 

I believe the slider should just explicitely disable tick rendering by default. (did not double check whether this is the case or not), because ticks make no sense  between  INT_MIN and INT_MAX.
And then this would fix the issue. 

Christoph ? Oppinion ?
Comment 6 Hugo Pereira Da Costa 2013-10-02 10:42:46 UTC
hmmm Plastique should render ticks too (as far as I know). So maybe the bug is somewhere else (in oxygen). I'll have a look.
Comment 7 Hugo Pereira Da Costa 2013-10-02 10:46:58 UTC
Plastique must have some protection against such things (since only one tick is drawn). I'll look and copy it to oxygen
Comment 8 Christoph Feck 2013-10-02 19:59:45 UTC
Indeed, Skulpture is also affected...
Comment 9 Christoph Feck 2013-10-02 20:04:49 UTC
Actually, I can reproduce the same bug with any style. The Skulpture implementation uses QCommonStyle for tickmark rendering, and the bug is indeed visible with more Qt styles, such as Plastique and Windows style.
Comment 10 Christoph Feck 2013-10-02 20:08:00 UTC
Created attachment 82627 [details]
UI file that can be used to reproduce the issue

Load this UI file, enable tickmarks on slider, Designer hangs.
Comment 11 Andrew Crouthamel 2018-10-30 00:03:25 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2018-11-14 11:32:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Bug Janitor Service 2018-11-29 09:46:56 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!