Bug 388454 - Thread table truncated
Summary: Thread table truncated
Status: RESOLVED FIXED
Alias: None
Product: KXStitch
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Steve Allewell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-02 11:55 UTC by David Edmundson
Modified: 2018-01-06 23:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2018-01-02 11:55:47 UTC
Running master.

Generated a pattern, all looks good except the table of colours.

In the print preview page I can see 1 A4 page worth's of entries, with the rest not shown, it does not continue onto the next page.

Manually adding a table with an offset fails to add anything.
Comment 1 Steve Allewell 2018-01-03 20:34:45 UTC
Investigating
Comment 2 Steve Allewell 2018-01-03 21:31:23 UTC
This is peculiar.  I downloaded the code from master to OpenSuSE Leap 42.3, compiled and ran and the page layout tools worked as expected.  I have also tried the release-2.1.0 branch, again this worked as expected.

Running the same code on Tumbleweed fails because the layout tool stops receiving the mouse move events.

Leap 42.3 has QT 5.6, Tumbleweed has 5.10

Can you confirm which version of Qt you have please.  It might help me narrow things down.

Thanks
Comment 3 David Edmundson 2018-01-04 00:04:32 UTC
The latest code in the Qt5.10 branch (so after 5.10.0); both on wayland and X.

There was a huge input rewrite in Qt 5.9; we had some issues in plasma with mouse grabs.
Comment 4 Steve Allewell 2018-01-06 12:01:37 UTC
This is failing when the QToolTip is displayed. The underlying window seems to lose focus and no longer receives the mouseMoveEvent.  Oddly the same technique actually works fine in the pattern editor when using the select tool - perhaps you can check that with yours.  I noticed it also fails in other dialogs that display tooltips when dragging with the mouse.

I am no closer to a solution at the moment, unless I just turn off the tooltips, but I do not really want to do that.

I am going to try creating a minimal application to try and replicate the problem and see if I can fix it, or report it as a Qt bug.
Comment 5 Steve Allewell 2018-01-06 23:21:26 UTC
Seems to definitely be a Qt bug, so I logged it as QTBUG-65599.  I came across another bug report there, although not exactly the same, which gave a workaround.  

I have tried that and it works to re-enable the tooltips.  I shall commit the change to the release-2.1.0 branch and merge it to head after I release 2.1.0

I checked the creation of multiple key elements using the start and count fields, and that worked fine, so it should sort out the problem that you originally identified.
Comment 6 Steve Allewell 2018-01-06 23:36:41 UTC
Git commit bc1f21241cbd6dc38d459fc6cf6451012b72785a by Steve Allewell.
Committed on 06/01/2018 at 23:23.
Pushed by sallewell into branch 'release-2.1.0'.

Fix rubberband selections in various dialogs

Bug 388454 identified a problem creating elements in the print setup
dialog. Investigation shows there appears to be a Qt bug in QWidget
derived classes when used in QDialogs, which blocks mouse events when a
mouse button is pressed and a QToolTip is displayed.

A minimal application that replicates this is in github:
https://github.com/SAllewell/tooltip-bug

The original code worked in Qt 5.6, but fails in Qt 5.10
The version that introduced the regression is unknown.

It has been logged as QTBUG-65599
FIXED-IN: 2.1.0

M  +2    -0    src/ImageElementDlg.cpp
M  +2    -0    src/PatternElementDlg.cpp
M  +2    -0    src/PrintSetupDlg.cpp

https://commits.kde.org/kxstitch/bc1f21241cbd6dc38d459fc6cf6451012b72785a
Comment 7 David Edmundson 2018-01-06 23:40:08 UTC
Thanks for the quick reply and the investigation.

If you're at Akademy I'll buy you a beer.