Issue 122149 - repaint error when scrolling (under particular circumstances)
Summary: repaint error when scrolling (under particular circumstances)
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: 4.0.0-dev
Hardware: PC All
: P3 Major with 3 votes (vote)
Target Milestone: 4.0.1
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords: regression
: 122801 122929 122930 122962 122977 123104 123265 123319 123322 123335 123343 (view as issue list)
Depends on:
Blocks:
 
Reported: 2013-04-23 17:32 UTC by Regina Henschel
Modified: 2017-05-20 10:34 UTC (History)
21 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.0
Developer Difficulty: ---
jsc: 4.0.1_release_blocker+


Attachments
File to produce the repainting problem (50.08 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-04-23 17:32 UTC, Regina Henschel
no flags Details
Screenshot of repaint errors (14.63 KB, image/png)
2013-04-23 17:33 UTC, Regina Henschel
no flags Details
Confirm problem (194.77 KB, application/vnd.oasis.opendocument.graphics)
2013-07-25 13:15 UTC, sevalav
no flags Details
screenshot (71.38 KB, image/jpeg)
2013-07-26 05:39 UTC, Oliver Brinzing
no flags Details
repaint error example file (10.41 KB, application/vnd.oasis.opendocument.spreadsheet-template)
2013-07-26 05:39 UTC, Oliver Brinzing
no flags Details
autocalc turned off (66.33 KB, image/jpeg)
2013-07-27 09:38 UTC, Oliver Brinzing
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2013-04-23 17:32:53 UTC
Created attachment 80583 [details]
File to produce the repainting problem

I use AOO350m1(Build:9611)  -  Rev. 1424563
Rev.1425220

Open attached document and change the value B1 for example to 2.
Scroll up and down by dragging the scrollbar.

Notice, that there are lines remaining from the tooltip object at the scrollbar and that the chart is not correctly repainted.

It has been OK in AOO 3.4.1.
Comment 1 Regina Henschel 2013-04-23 17:33:52 UTC
Created attachment 80584 [details]
Screenshot of repaint errors
Comment 2 Oliver Brinzing 2013-04-24 04:41:19 UTC
i noticed a repaint problem in aoo 4 if "window - freeze" is used and rows are inserted 
using a macro. i cannot reproduce with aoo341 too.
Comment 3 Edwin Sharp 2013-04-24 19:47:52 UTC
Attachment works OK in Rev. 1467541 Debian.
Comment 4 Armin Le Grand 2013-04-30 15:00:11 UTC
ALG: Very strange, it only happens after doing the change, no repaint with the original opened document. After activating/deactivating the OLE chart, it again stops happening.
Workaround
Comment 5 Armin Le Grand 2013-04-30 15:01:09 UTC
ALG: Workaround: Press CTRL+SHIFT+R to force a complete repaint
Comment 6 sevalav 2013-07-25 13:15:56 UTC
Created attachment 81141 [details]
Confirm problem
Comment 7 sevalav 2013-07-25 13:19:47 UTC
I reported the same problem. I tested your Calc document and got the same result (look my attachment). Also, please specify your hardware and OS, and is it 32 bit or 64 bit.
Comment 8 sevalav 2013-07-25 13:21:11 UTC
(In reply to sevalav from comment #7)
> I reported the same problem.

https://issues.apache.org/ooo/show_bug.cgi?id=122801
Comment 9 sevalav 2013-07-25 18:13:28 UTC
(In reply to Armin Le Grand from comment #5)
> ALG: Workaround: Press CTRL+SHIFT+R to force a complete repaint

I tried to do this (CTRL+SHIFT+R). Yes, I got a nice, undistorted sheet, but if I want to use scroll bar after that command  I will get distort sheet again.
Comment 10 Oliver Brinzing 2013-07-26 05:38:05 UTC
adding an example file and screenshot

- open spreadsheet "example_repaint_error.ots"
- select entries from listboxes in cells c2,c4,c6,c8
  -> some lines from listboxes will sty on screen
-  press CTRL+SHIFT+R to force a complete repaint

will not happen in aoo341
Comment 11 Oliver Brinzing 2013-07-26 05:39:08 UTC
Created attachment 81147 [details]
screenshot
Comment 12 Oliver Brinzing 2013-07-26 05:39:44 UTC
Created attachment 81148 [details]
repaint error example file
Comment 13 sevalav 2013-07-26 07:01:54 UTC
(In reply to brinzing from comment #12)
> Created attachment 81148 [details]
> repaint error example file

I confirm that problem. Brinzing, I tested your file, the same happend to me.

Brnzing, what is your configuration (hardwere and OS)?
Comment 14 Oliver Brinzing 2013-07-26 07:32:00 UTC
> what is your configuration (hardwere and OS)?

win7 64bit
Comment 15 sevalav 2013-07-26 08:09:15 UTC
(In reply to brinzing from comment #14)
> > what is your configuration (hardwere and OS)?
> 
> win7 64bit

win7 Home Premium or?
Comment 16 Oliver Brinzing 2013-07-26 08:15:50 UTC
> win7 Home Premium or?

professional
Comment 17 sevalav 2013-07-26 10:17:26 UTC
Brinzing, I tested your file and got next result: AutoCalculate (Tools/Cell content/AutoCalculate) is involved in this problem. When I turn off this option, I can filling cells (C2, C4, C6, C8) without any problems. Using scroll bar do not make distorted picture of sheet. But, when I turn on AutoCalculate option, active cells with formulas will be updating, and, if I using scrool bar after that, I will get distorted picture.

Please, do this yourself in your computer to confirm this.
1) open your calc document
2) turn on AutoCalculate  option  (Tools/Cell content/AutoCalculate) 
3) Make changes in cells (C2, C4, C6, C8) 
4) Visualy observe are there some problems when you in filling process of cells
5) Use scroll bar and observe
6) Turn on  AutoCalculate  option
7) Use  scroll bar again and observe
Comment 18 Oliver Brinzing 2013-07-27 09:38:49 UTC
Created attachment 81176 [details]
autocalc turned off
Comment 19 Oliver Brinzing 2013-07-27 09:39:11 UTC
with autocalc turned *off* it's getting worser ... see attched screenshot
Comment 20 Edwin Sharp 2013-08-01 17:42:53 UTC
*** Issue 122930 has been marked as a duplicate of this issue. ***
Comment 21 Rainer Bielefeld 2013-08-01 18:25:35 UTC
*** Issue 122801 has been marked as a duplicate of this issue. ***
Comment 22 Rainer Bielefeld 2013-08-03 09:42:34 UTC
Some clarification:
Currently I do not see any evidence that the root of the problem is a bug in the AutoCalculate arey. I only added that to the summary because AutoCalculate seemed to be a reliable precondition to make the problem reproducible. 

Kirill's Comment 24 in "Bug 122801 - Redraw causes damaged Viewing with active AutoCalculate" indicates that there also might be additional conditions what make visible the problem.

Severity of this problem should not be underrated. Original report shows some smaller blemishes, but during my tests I also saw appearances of the problem making the sheet unreadable / unusable until next redraw, what might cause some panic for unexperienced users.
Comment 23 sevalav 2013-08-04 00:14:49 UTC
I do not know what exactly cause the problem. I posted only what I saw how program works. What I can see, the most frequent of this kind problems are occur in win7 64. I am not an programer. That is job for someone who have this skills to find solution.
3.4.1. have not this problems. Well, somebody must compare code of 3.4.1. and 4.0. Also, managing in AOO 4.0 with heavy picture in Draw is very  slow.
Comment 24 Rainer Bielefeld 2013-08-05 06:00:37 UTC
I tried to use  4.0.0 CALC for normal work, but it's impossible because of this issue. Seems to work more or less for small simple sheets, but big sheets with lots of formatting, conditional formatting, formulas look horrible after only few scrolls, completely unusable.

So MAJOR, and I think this one is a shownstopper for 4.0.1

I was not able to reproduce the problem with AutoCalculate = OFF, but I don't think that that observation is important.
Comment 25 Rainer Bielefeld 2013-08-05 06:30:52 UTC
I was wrong in my Comment 24, I AM able to reproduce the problem also with AutoCalculate = OFF, but for me the hassle is less with that setting.
Comment 26 K.Ritter 2013-08-05 08:45:34 UTC
This is such a severe bug, that it makes Openoffice v4 useless for Win7 users who need Calc.
Could we provide additional informations, tests, etc. to the developers so that they can fix the bug?
Comment 27 K.Ritter 2013-08-05 12:01:30 UTC
The redraw problem also happens on Windows XP Professional (32bit) with Openoffice v4.
So it looks like it's NOT Windows 7 specific.
Comment 29 Edwin Sharp 2013-08-06 06:49:05 UTC
*** Issue 122929 has been marked as a duplicate of this issue. ***
Comment 30 Rainer Bielefeld 2013-08-08 12:56:20 UTC
*** Issue 122977 has been marked as a duplicate of this issue. ***
Comment 31 Rainer Bielefeld 2013-08-08 12:57:48 UTC
Drop worrying AutoCalculate hint
Comment 32 Regina Henschel 2013-08-08 15:46:59 UTC
I have tried again and could not reproduce the problem any longer. It is difficult for me, to remember all what I have done in between. On thing has been changing dpi and font in Windows 7 desktop settings.
Comment 33 sevalav 2013-08-08 17:47:43 UTC
(In reply to Regina Henschel from comment #32)
> I have tried again and could not reproduce the problem any longer. It is
> difficult for me, to remember all what I have done in between. On thing has
> been changing dpi and font in Windows 7 desktop settings.

Please, what dpi you have now? Or fonts?
Comment 34 Rainer Bielefeld 2013-08-08 18:07:52 UTC
Yes, big progress with "AOO 4.0.0-Dev – English UI / German locale -  [AOO400m3(Build:9702)  -  Rev. 1511231  2013-08-08]" on German WIN7 Home Premium (64bit)", own separate user profile: some quick tests showed that some price calculating work with my own spreadsheets, what was more or less impossible with 4.0.0 final, now works like a charm.

But still a problem with Bug 122801, what might indicate that at least some of the problems there are independent from this bug here?
Comment 35 Regina Henschel 2013-08-08 18:27:37 UTC
(In reply to sevalav from comment #33)
> (In reply to Regina Henschel from comment #32)
> > I have tried again and could not reproduce the problem any longer. It is
> > difficult for me, to remember all what I have done in between. On thing has
> > been changing dpi and font in Windows 7 desktop settings.
> 
> Please, what dpi you have now? Or fonts?

I have now 125% and font "Segoe UI".
Comment 36 sevalav 2013-08-08 20:03:39 UTC
Please, what is the path for this changes?
Comment 37 mattdeany 2013-08-08 20:13:51 UTC
I have this problem with more than spreadsheet, I am a constant user of Calc, on Vista 32. It happens reliably from the moment I start scrolling the screen and is continuous. It does not affect functionality except that I can't see what's going on reliably. I have not experienced anything like this before up to OO 3.2. Is there a fix or should I revert to 3.2 for the time being?
Comment 38 sevalav 2013-08-08 20:21:45 UTC
There is no fix for this yet. I am now using AOO 3.4. because AOO 4.0 make me the same problem as yours. So, go back to your 3.2 version if you have problems.
Comment 39 Armin Le Grand 2013-08-09 11:43:17 UTC
ALG: Grepping and taking a look.
Comment 40 Armin Le Grand 2013-08-09 11:44:04 UTC
ALG: Can not always reproduce, seems some numerical stuff.
Comment 41 Armin Le Grand 2013-08-09 11:49:27 UTC
ALG: Tracked down to a numerical problem in PolyPolygon clipping. The clipping works in principle and uses 'unsharp' comparisons in the process. The result in the Region for visual clipping in the paint process then uses sharp comparisons which may lead to errors when the contained polygons still overlap (what they should not do anymore after clipping).
There are various possibilities to fix this, starting from better fallback to use RegionBands if these exist for Region processing, looking where the small numerical diff is produced (in my debug example it's 8129.0000000000000 comared to 8128.9999999999991 e.g.), correcting the problem in the clip process.
A combination will be necessary, starting with correcting unsharp-equal positions in the clip process in the clip results...
Comment 42 Armin Le Grand 2013-08-09 15:17:56 UTC
ALG: Corrected ClipResults by snapping same pixels. Next question is why are there Regions with PolyPolygons used at all? Seems to come into play by a call in ScGridWindow::UpdateFormulas us9ing GetChangedArea() which - without any need - works on PolyPolygon. What is new though is that it *stays* a PolyPolygon in Region since this is supported, was converted to RegionBand in older versions on pixel base what is pretty expensive...
Comment 43 sevalav 2013-08-09 21:59:57 UTC
If this is any help for you...
http://www.openoffice.org/gsl/canvas/api/rendering/XCanvas.html
Comment 44 efa 2013-08-11 21:37:01 UTC
confirmed on WinXP 32bit
Comment 45 sevalav 2013-08-11 21:50:23 UTC
The same happens with the output picture when we close the document.
See here:
http://youtu.be/p8dbI_0LSGQ
Comment 46 sevalav 2013-08-11 22:03:16 UTC
In that video you can see that part of the image moves up. Perhaps that is not so important because we want to close document, but that telling us that something are not working properly in AOO 4.0
Comment 47 Armin Le Grand 2013-08-12 10:23:39 UTC
ALG: Thanks sevalav, I can now stable reproduce, thus I'm getting forward. It has to do with some reworks in the Region logic and with the fact that Calc for some reason starts to use PolyPolygons as Regions after changing that value (as part of UpdateFormulas call).
PolyPolygons numerical error corrected, works in principle. Looking why still a line less is updated than in RegionBand version...
Comment 48 Armin Le Grand 2013-08-12 12:10:43 UTC
ALG: Added a point corrector to solver::getB2DPolyPolygon which uses found and remembered unsharp-equal points in the polygon and corrects these when no change was done in the original before returning these. This works in principle, but fails on setB2DPoint since this internally also checks on unsharp-equal and thus will not really correct the value. Changing this...
Comment 49 Armin Le Grand 2013-08-12 14:33:10 UTC
ALG: Working as expected. Comparing Region ranges between poly- and non-poly processing, no difference to see but the repaint still misses a line when using polygon version. Looking deeper...
Comment 50 Armin Le Grand 2013-08-12 18:01:19 UTC
ALG: After some search I found a difference: WinSalGraphics::setClipRegion itself seems to work different/do different thigs with polygons; of course setting a Polygon as clip region is different, but setting a rectangle or the corresponding polygon seems to make a difference. Forcing jumping there from one case to the other cures the problem. Need to dig into GDI/GDI+ region setting on windows...
Comment 51 Tony Patriarche 2013-08-13 01:54:44 UTC
Similar problems with Calc on XP Pro SP3 after installing 4.0.0
Not sure if all of these symptoms were noted by users, so here's my list:

1. Happens when I use mouse to scroll down 1 page using slider bar, then return to top.
2. Does not happen with PgDn-PgUp
3. On returning to top of page: random black line stubs at right edge of screen
4. Grid lines are incorrectly painted, with row gaps.
5. On one occasion, the displayed data was incorrect:  several columns of times, 24-hr format, were listed incorrectly, i.e. out of sequence
6. A forced refresh e.g. going to another tab/worksheet & back fixed the error

I can provide screen shots of these errors if needed.
Comment 52 mattdeany 2013-08-13 07:10:45 UTC
(In reply to Tony Patriarche from comment #51)
> Similar problems with Calc on XP Pro SP3 after installing 4.0.0
> Not sure if all of these symptoms were noted by users, so here's my list:
> 
> 1. Happens when I use mouse to scroll down 1 page using slider bar, then
> return to top.
> 2. Does not happen with PgDn-PgUp
> 3. On returning to top of page: random black line stubs at right edge of
> screen
> 4. Grid lines are incorrectly painted, with row gaps.
> 5. On one occasion, the displayed data was incorrect:  several columns of
> times, 24-hr format, were listed incorrectly, i.e. out of sequence
> 6. A forced refresh e.g. going to another tab/worksheet & back fixed the
> error
> 
> I can provide screen shots of these errors if needed.

Great summary of behaviour Calc in Vista 32.
Comment 53 mattdeany 2013-08-13 07:13:20 UTC
(In reply to Armin Le Grand from comment #50)
Thanks Armin, your work is appreciated.
:-)
Comment 54 Armin Le Grand 2013-08-13 09:25:40 UTC
ALG: asking for release blocker
Comment 55 Armin Le Grand 2013-08-13 09:29:31 UTC
ALG: For AOO401 it will be safest to just correct ScOutputData::GetChangedArea to Rectangle/Region usage with RegionBans, this will already hinder usages of PolyPlygon-based regions.
For trunk I will do some more to make that case work, too. Going on with taking a deeper look at GDI region handling stuff...
Comment 56 Armin Le Grand 2013-08-13 11:54:05 UTC
ALG: To detect 'simple', PolyPolygons which do not need a polygon-based clip region I added and use basegfx::tools::containsOnlyHorizontalAndVerticalEdges; when true, fallback to use the RegionBand stuff. Also added test code to scale the polygon-based region by 1 in X and Y, also works as expected. Thus:

- Avoid using polygon-based regions in SC
- Corrected some clipping and snap of unsharp-equal points
- Detect 'simple' polygons and fallback to RegionBand
- Correct polygon-based clip region setting by scaling it as needed for target system

All this steps make the non-polygon and the polygon-based Regions work identical; only the first change already fixes the task and thus only that one will be targeted to AOO401, the rest goes to trunk.
Comment 57 jsc 2013-08-13 11:55:36 UTC
approve showstopper request
Comment 58 Armin Le Grand 2013-08-13 12:54:22 UTC
ALG: Added some comments, removed conditional test stuff, re-checked, preparing commits.
BTW: This shows one more reason why it is necessary to drive forward the changes to primitives; when the whole Calc app would use this these repaint stuff would be simpler, faster and more uniform to handle...
Comment 59 Armin Le Grand 2013-08-13 15:09:46 UTC
ALG: Got branches/AOO401, built, checked, applied fix in SC, built re-checked that it is fixed, comitted, done for AOO401.
Comitted full stuff for trunk, done.
Comment 60 SVN Robot 2013-08-13 15:10:28 UTC
"alg" committed SVN revision 1513538 into branches/AOO401:
i122149 Do use RegionBand Regions in Calc after recalculation
Comment 61 SVN Robot 2013-08-13 15:10:34 UTC
"alg" committed SVN revision 1513541 into trunk:
i122149 Corrected stuff around polygon-based clip regions, do not use them wh...
Comment 62 sevalav 2013-08-16 13:25:01 UTC
Armin Le Grand, big thanks to you in the name of all user! Your corrections works great. I am using now Rev. 1514218  and finally, I can use AOo 4.0...
BTW is there some limitations of these corrections, or you fix everything in that area?

Again, thanks!
Comment 63 Edwin Sharp 2013-08-16 14:07:20 UTC
(In reply to sevalav from comment #62)
> Armin Le Grand, big thanks to you in the name of all user!

+1
Comment 64 mattdeany 2013-08-16 15:11:27 UTC
(In reply to Edwin Sharp from comment #63)
> (In reply to sevalav from comment #62)
> > Armin Le Grand, big thanks to you in the name of all user!
> 
> +2
Comment 65 sevalav 2013-08-18 12:47:03 UTC
But it still happens something with the output picture after we pressed button for closing the document.
(See comment 45 and 46.)
Comment 66 Rainer Bielefeld 2013-08-26 03:57:03 UTC
*** Issue 123104 has been marked as a duplicate of this issue. ***
Comment 67 Armin Le Grand 2013-08-26 12:36:13 UTC
ALG: @sevalav: That short change probably happens because the toolbars get closed first, thus the document content gets scrolled, but there will be no more repaint (due to the document closing). Besides this being a little ugly, do you see a problem with it?
Comment 68 sevalav 2013-08-26 12:57:08 UTC
> Besides this being a little
> ugly, do you see a problem with it?

Yes, it is only a little ugly. But also, it gives impression that something is wrong with this program. That is all.
Comment 69 bart 2013-08-27 01:16:06 UTC
Good work on everyone's part to resolve the issue!

How do I apply those fixes to my machine.

I am just a user. None of that made a bit of sense to me.

Thanks
Comment 70 fanyuzhen 2013-08-30 03:02:16 UTC
It's verified fixed in build AOO401m1(Build:9710)  -  Rev. 1516414
Comment 71 Armin Le Grand 2013-09-04 14:37:04 UTC
*** Issue 122962 has been marked as a duplicate of this issue. ***
Comment 72 Rainer Bielefeld 2013-09-16 14:36:02 UTC
*** Issue 123265 has been marked as a duplicate of this issue. ***
Comment 73 Rainer Bielefeld 2013-09-16 14:36:47 UTC
OS = ALL due to DUP Bug 123265 (Mac)
Comment 74 Jeff 2013-09-17 15:28:42 UTC
I am going round in circles trying to get some help with a problem I logged and was assigned 123265. I find the help system or bug system very difficult to understand. 
Very simply put I have a problem which I am told should be resolved by version 4.0.1. I was asked to comment if this release fixed my problem on my mac as it apparently worked for windows environments. Problem is version 4.0.1 has not been released, so I ask for link to this release. Eventually I get a link but it is not obvious what link I should select. Could somebody in plain English answer the following:
I am not technical so would appreciate help in which download to select.

English UK  Mac OS intel seems an obvious choice for me. But then I am given four options which are meaningless to me.
1. Snapshot - I tried this and it was not found on the server so I am not sure which I should click as I do not know what options 2 -4 mean.
Is it 2. ASC
or 3. MD5
or 4. SHA256
Comment 75 sevalav 2013-09-17 20:04:22 UTC
If it is urgent, here is Development Snapshot page:
https://cwiki.apache.org/confluence/display/OOOUSERS/Development+Snapshot+Builds

Find colunmn "MacOS Intel" and row  "English United Kingdom (en-GB)".
Click on SNAPSHOTS.
Comment 76 sevalav 2013-09-19 22:46:46 UTC
Repaint error is still here. Look video here:
https://docs.google.com/uc?export=download&id=0B_xv-Bc9VISwcksyaFVWS2hDakU
Comment 77 sevalav 2013-09-19 22:49:09 UTC
(In reply to sevalav from comment #76)
> Repaint error is still here. Look video here:
> https://docs.google.com/uc?export=download&id=0B_xv-Bc9VISwcksyaFVWS2hDakU

I sorry, I posted on wrong bug address.
Comment 78 Rainer Bielefeld 2013-09-20 04:15:14 UTC
@Jeff:
Like real life creation of an office suite IS complex, and sometimes a normal user has to wait until official version has been published. It whould be great if you could test with 4.0.1 final when it will be available.
Comment 79 Ariel Constenla-Haile 2013-09-21 17:49:19 UTC
*** Issue 123319 has been marked as a duplicate of this issue. ***
Comment 80 Edwin Sharp 2013-09-22 11:36:47 UTC
*** Issue 123322 has been marked as a duplicate of this issue. ***
Comment 81 Rainer Bielefeld 2013-09-25 05:43:20 UTC
*** Issue 123335 has been marked as a duplicate of this issue. ***
Comment 82 Rainer Bielefeld 2013-09-25 05:46:44 UTC
*** Issue 123343 has been marked as a duplicate of this issue. ***