Bug 93123 - VIEWING: Split/frozen sheet not redrawn properly when formula with manual range selection causes page to scroll
Summary: VIEWING: Split/frozen sheet not redrawn properly when formula with manual ran...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: Other All
: high normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2015-08-04 17:55 UTC by tmacalp
Modified: 2023-01-17 03:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Animated gif of screen not redrawing properly (90.72 KB, image/gif)
2015-08-27 21:15 UTC, tmacalp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tmacalp 2015-08-04 17:55:58 UTC
Description:
A certain combination of conditions causes part of the screen to not redraw properly:
* Window is split or frozen
* Inputting data in the last visible row (so that pressing enter causes the window to scroll)
* Input a formula which then uses the cursor to select a range (for instance, click sum, then select the cells using the mouse)


Steps to reproduce:
1 Create a new spreadsheet

2. Insert some numbers anywhere on the sheet

3. Freeze the sheet

4. In the bottom right pane, click a cell in the last visible row (so that pressing enter will move the cursor down to the next row and force the screen to redraw.)

5. Press the sum button

6. Use the mouse to drag a range around the numbers you inserted earlier

7. Press enter

Pressing enter should calculate your sum formula and move the cursor down one cell.  Since the selected cell was the bottommost visible cell, this will cause our view to scroll down one cell.

Expected:
Our newly inserted formula and the region that was drawn when the screen scrolled should be redrawn correctly.

Actual:
Our newly inserted cell appears completely blank, but selecting the cell shows the correct formula in the formula bar.  

Notes:
The entire new bottom row of cells (the region redrawn by the window scrolling) is also not redrawn properly and will show blank values for cells with existing data.  That region will also be corrupted by other items, such as the animated "marching ants" copy region overlay and the magenta outline of our formula's manual range selection. 

This is extremely irritating if a user is keying a long list of values since each row will be corrupted as they key the formulas down the screen.

This is probably another edge case caused by some change to normal calc code that wasn't implemented in split/frozen panes.

I can confirm that this bug affects LO 4.4.5.2 and 5.0.0.4.  I went ahead and bibisected using the 4.4 repo, but had to skip some versions because they crashed on launch.

Bibisect:
There are only 'skip'ped commits left to test.
The first bad commit could be any of: 23eae1c9e288ecd9bb5e66a00f9bfc346982ae55 b74dafb5d92d445ce1f441eeb81e717a1a78fb03 5e858479245b1764a924407670bf449d5cd06890
We cannot bisect more!

$ git bisect log
git bisect start 'latest' 'oldest'
# good: [5d0dfb8e62ae61a240f8313c594d4560e7c8e048] source-hash-0c6cd530de13f80795881f61064f1bf1dcc4ea81
git bisect good 5d0dfb8e62ae61a240f8313c594d4560e7c8e048
# bad: [7dfacd0b8bd828331d74c0f79de6e8924bc4e6a5] source-hash-f93ce4f7eb90093d0ea3115d0a1c614612676dbd
git bisect bad 7dfacd0b8bd828331d74c0f79de6e8924bc4e6a5
# bad: [1a63057f6378db7c6b8af1171b7b140f7583f246] source-hash-59f84b4a2c082382767f12e0c7a06a3f0b52e721
git bisect bad 1a63057f6378db7c6b8af1171b7b140f7583f246
# good: [3787e4f82e47eaf4fa454afdca671272e50f875b] source-hash-0e09134a4a4cbb0639fc586c560c6fb2765487be
git bisect good 3787e4f82e47eaf4fa454afdca671272e50f875b
# good: [13c63ebe51bd9151757981f75b62271c00a47bf1] source-hash-5ccb510ef7dd6688b86038b37563583f64107936
git bisect good 13c63ebe51bd9151757981f75b62271c00a47bf1
# good: [2e44b89901b3478fac6251ab4fa87311bb8c256f] source-hash-91ebd8825bf0ac6bf3daaba54cefc1a11a64451d
git bisect good 2e44b89901b3478fac6251ab4fa87311bb8c256f
# skip: [b74dafb5d92d445ce1f441eeb81e717a1a78fb03] source-hash-87cb919c7ccf5aacda27b36781d5896eebbd182b
git bisect skip b74dafb5d92d445ce1f441eeb81e717a1a78fb03
# skip: [23eae1c9e288ecd9bb5e66a00f9bfc346982ae55] source-hash-2e6abb5d910f4813b75f86860c0b84ca01d98093
git bisect skip 23eae1c9e288ecd9bb5e66a00f9bfc346982ae55
# good: [743a6cc47f93aca3478e55e63cd29cdccfdcc3aa] source-hash-9dd5caac62083f7162d83319284df68ee83e3777
git bisect good 743a6cc47f93aca3478e55e63cd29cdccfdcc3aa
# bad: [5e858479245b1764a924407670bf449d5cd06890] source-hash-589ca2a5e88a976bb10e60fcb1e3e75f4aa2504e
git bisect bad 5e858479245b1764a924407670bf449d5cd06890
# only skipped commits left to test
# possible first bad commit: [5e858479245b1764a924407670bf449d5cd06890] source-hash-589ca2a5e88a976bb10e60fcb1e3e75f4aa2504e
# possible first bad commit: [23eae1c9e288ecd9bb5e66a00f9bfc346982ae55] source-hash-2e6abb5d910f4813b75f86860c0b84ca01d98093
# possible first bad commit: [b74dafb5d92d445ce1f441eeb81e717a1a78fb03] source-hash-87cb919c7ccf5aacda27b36781d5896eebbd182b
Comment 1 raal 2015-08-22 09:46:03 UTC
Cannot reproduce with Version: 5.1.0.0.alpha1+
Build ID: 6b7354ae66db40246a09e00aa876443057655a43
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-08-19_01:05:16
Comment 2 tmacalp 2015-08-27 21:15:39 UTC
Created attachment 118234 [details]
Animated gif of screen not redrawing properly

Hmm.  I can reproduce using:

Version: 5.1.0.0.alpha1+
Build ID: ce0bba5fc1090caa7fb80f1bcc6ce64f67f11238
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-08-19_23:36:11
Locale: en-US (en_US.UTF-8)

I actually had a bit of trouble finding split/freeze, since they've now been moved under the "View" menu in the dev builds.  I'll need to test on another system, but this might be one of those bugs that is impossible to reproduce in window managers with fancy compositors which call for additional redraws.  I'm using pure X.  I'll test this again under a window manager with fancy desktop effects later.

I've uploaded a short gif of my experience using the version mentioned above.  Note at the end, I select the cell I just typed into and you can see the contents do show in the formula bar, but not in the actual cell.  Parts of the tooltip text also appear to stick around when the page scrolls up.
Comment 3 raal 2015-08-28 05:14:35 UTC
No repro Verze: 5.0.0.5
ID sestavení: 1b1a90865e348b492231e1c451437d7a15bb262b
Win7
Comment 4 tmacalp 2015-08-31 19:27:10 UTC
Sorry, this one does appear to be tricky to reproduce.  I originally ran into it using a Fedora 21 thin-client connected to a RHEL6 server using xdmcp.  I was then able to reproduce it using a Fedora 20 laptop running pure X (no window manager, no compositing).  If I then enable compositing, by running xcompmgr, I can no longer reproduce the bug.  Finally, I was then able to reproduce it under KDE by disabling "desktop effects" (alt-shift-F12 to toggle), which disables compositing.

I don't have access to a native MS Windows machine right now, but I tried and failed to reproduce this under MS Windows 7 using VirtualBox.  In the past, I have been able to reproduce similar compositing bugs in MS Windows (Vista and earlier) by setting all visual effects to "best performance" (Control Panel->System->Advanced system settings->Performance).  I'll try a few more tests later, but we can probably mark this "Linux only."

It also appears that it's only reproducible when the cells have no direct formatting (using the default style).  So, one workaround is to select all affected cells and simply reapply the current font.  And once the cell's font has been changed, it will remain fixed for that session, even if you clear direct formatting.
Comment 5 Robinson Tryon (qubit) 2015-12-13 11:13:15 UTC Comment hidden (obsolete)
Comment 6 mahfiaz 2016-04-17 12:33:58 UTC
Cannot reproduce with 5.1.2.1 on Linux.
Comment 7 tmacalp 2016-04-18 02:25:06 UTC
I'm not too sure what is going on, but I can still reproduce using version 5.1.2.2 under Arch Linux.

Version: 5.1.2.2.0+
Build ID: 5.1.2.2 Arch Linux build-1
CPU Threads: 6; OS Version: Linux 4.5; UI Render: default; 
Locale: en-US (en_US.UTF-8)

Again, to reproduce, I have to disable compositing effects (alt-shift-f12 under KDE).  This means the bug might not be reproducible under many modern desktop environments like Unity, Cinnamon, Gnome3, XFCE, etc...  Which environments (window managers/desktop environments/compositing effect settings...) are you guys running when you can't reproduce?
Comment 8 mahfiaz 2016-04-18 13:57:07 UTC
I used Ubuntu 15.10 and MATE desktop with marco window manager. I disabled the compositing. Still cannot reproduce.
Comment 9 tmacalp 2016-04-18 14:49:28 UTC
I just installed MATE 1.12.1 on a 64bit fedora 23 machine.  With marco and compositing disabled, I was able to reproduce the bug using the fedora included LO 5.0.5.2.  To test if my repro steps were unclear, I had a coworker running IceWM under Fedora 21 using LO 4.4.5.2 reproduce the bug from this report.

Sorry that you're having trouble reproducing, but I'm still pretty sure this bug is still valid.
Comment 10 mahfiaz 2016-04-19 05:20:42 UTC
Yep, I finally am able to reproduce it.

It turns out my habit to close parenthesis of expressions failed me this time. You should type =SUM(<drag with mouse><Enter>, otherwise the tooltip is hidden before the scrolling takes place.

In its current form this takes place only if you drag with your mouse. Click to select, just typing or numerous other sequences won't cause this. Therefore lowering it's importance.

That said there are other similar strange cases when tooltips, parts of selection area borders and possibly more are left behind.
Comment 11 tmacalp 2016-04-19 18:15:57 UTC
(In reply to mahfiaz from comment #10)
> Yep, I finally am able to reproduce it.
> 
> It turns out my habit to close parenthesis of expressions failed me this
> time. You should type =SUM(<drag with mouse><Enter>, otherwise the tooltip
> is hidden before the scrolling takes place.

Thanks for retesting!  I'm really not looking specifically for the actual tooltip artifacts.  The main problem is that calc shows our recently input formulas as EMPTY cells.

I still trigger the bug a number of ways... even after closing the parenthesis.  For example,
=sum(<drag with mouse>)<enter>

As long as I've selected a range, I can even modify the formula and trigger the bug.
=sum(<drag with mouse>)+5*7<enter>

Even without the mouse, use the arrow keys to select a range, as long as that range doesn't include the cell directly over our formula range.
=sum(<arrow over to start of range><shift-arrow to select range>)<enter>

It still shows as an empty cell.  Basically, I trigger this bug using any graphical method of selecting a range when inputting a formula in the last visible row of a sheet and completing it with <enter>.

> In its current form this takes place only if you drag with your mouse. Click
> to select, just typing or numerous other sequences won't cause this.
> Therefore lowering it's importance.

I don't believe this is as isolated as you thinking.  The user I was helping when I discovered this bug is quite advanced.  When she ran into this, she was inputting formulas down a column while summing various regions in the sheet.  She then realized her entire column was blank and other numbers in that pane were in the wrong cells.  Her workaround for now is to keep scrolling so her active cell is never at the bottom of the screen.  If she does corrupt her screen, she minimizes/restores to get the pane to redraw properly.

If you're not expecting this bug, it can lead to some very confusing and error-prone situations.  According to the prioritizing bug flowchart, I'd argue it at least warrants a "makes it substantially harder to make high quality work or requires users not to use some features" (Medium/Minor).  Then the priority should potentially even be bump because it's a recent regression.  But I'll leave the QA to others.

> That said there are other similar strange cases when tooltips, parts of
> selection area borders and possibly more are left behind.

I also found that you can reproduce this bug in the bottom visible row of the upper right quadrant of a split sheet by pressing <enter>.  It's also possible to reproduce if you select a cell in the right-most visible column and end the formula with <tab>.  My guess is it's another case where someone didn't consider the case for redrawing all panes of a split/frozen window.
Comment 12 mahfiaz 2016-04-23 10:12:36 UTC
Thanks for the explanation of the use case. Bumping the importance seems right.
Comment 13 QA Administrators 2018-07-19 02:42:18 UTC Comment hidden (obsolete)
Comment 14 Karsten 2019-01-16 11:12:48 UTC Comment hidden (obsolete)
Comment 15 QA Administrators 2021-01-16 04:18:37 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2023-01-17 03:20:09 UTC
Dear tmacalp,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug