Bug 95173 - Progress Bar Dialog not working correctly
Summary: Progress Bar Dialog not working correctly
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.4.0 target:6.3.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: RenderContext File-Progress-Bar Macro-UNOAPI
  Show dependency treegraph
 
Reported: 2015-10-19 09:48 UTC by kiloran.public+bugzilla
Modified: 2022-04-08 07:11 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo of problem with Progress Bar (15.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-10-19 09:48 UTC, kiloran.public+bugzilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kiloran.public+bugzilla 2015-10-19 09:48:39 UTC
Created attachment 119742 [details]
Demo of problem with Progress Bar

The attachment ProgressBarTest.ods contains a Progress Bar dialog (dialog1). This can be called by an embedded Basic macro and also an embedded Python script.

There are two problems with LibreOffice 5.0
Using the basic macro, the progress bar essentially works, but it only shows the progress bar AT the current value. Previous versions of LibreOffice (and OpenOffice) show the progress bar filled in FROM zero TO the current value.

Using the Python script, the progress bar does not show at all, although the dialog does display. Previous versions of LibreOffice and OpenOffice do display the progress bar.

I wonder if this bug is related to a similar bug I reported recently with the Status Bar: https://bugs.documentfoundation.org/show_bug.cgi?id=94856

There is an additional problem with the Python script which is evident with all versions of LibreOffice and OpenOffice.... the background of the dialog/progressbar is transparent. Using the Basic macro, the background is correctly shown as light blue.

The Python script is shown here:

import time
import uno
import unohelper

def PythonProgressBar():
	oDoc = XSCRIPTCONTEXT.getDocument()
	psm = uno.getComponentContext().ServiceManager
	dp = psm.createInstanceWithArguments("com.sun.star.awt.DialogProvider", (oDoc,) )
	oDlg = dp.createDialog("vnd.sun.star.script:Standard.Dialog1?location=document")
	
	oProgressBarModel = oDlg.getModel().getByName("ProgressBar1")
	oProgressBarModel.setPropertyValue("ProgressValueMin", 0)
	oProgressBarModel.setPropertyValue("ProgressValueMax", 100)

	oDlg.setVisible(True)
	
	
	for i in range(0,100,10):
		oDlg.Title = "Progress Bar " + str(i)
		oProgressBarModel.setPropertyValue("ProgressValue", i)
		time.sleep(1)
		
	oDlg.dispose()
Comment 1 Buovjaga 2015-10-21 05:52:57 UTC
Confirmed.

4.3 works like described.

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)

4.3.0.1
Comment 2 raal 2015-11-11 07:01:44 UTC
bibisecting : Using the Python script, the progress bar does not show at all, although the dialog does display. Previous versions of LibreOffice and OpenOffice do display the progress bar.

This seems to have begun at the below commit.
Adding Cc: to Tomaž Vajngerl ; Could you possibly take a look at this one?
Thanks

There are only 'skip'ped commits left to test.
The first bad commit could be any of: f94c3dc930c090202b42cdae47e184331f087643 0d3becec432f8a91e4bef7deb4273ccb7f7d00f3
We cannot bisect more!

author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-04-29 02:49:47 (GMT)
committer	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-04-29 02:53:11 (GMT)
commit 969d833e7927f099de35b87d225a9e9dd9f08661 (patch)
Also add RenderContext parameter to updatecheckui

author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-04-28 03:53:27 (GMT)
committer	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-04-29 00:24:20 (GMT)
commit 9905a8b953953b9ec5e123a17997d5931978acfe (patch)
replace Paint calls to Invalidate + fix compilation

/bibisect-win32-5.0
$ git bisect log
# bad: [575cd25f0560684895018d8fcfb1818dd4dd1c9b] source sha:ab465b90f6c6da5595393a0ba73f33a1e71a2b6                                                5
# good: [f449493ae11ac76cc7396bddeaa624a60c565936] source sha:57d6b92b69a31260dea0d84fcd1fc5866ada7a                                                db
git bisect start 'libreoffice-5-0-branch-point' 'oldest'
# good: [da12357c491a0dce5acc0bd1f00c26f89d8f20e6] source sha:c1b9402d49a7cd4bec383f28d397d9d89541f0                                                e0
git bisect good da12357c491a0dce5acc0bd1f00c26f89d8f20e6
# good: [da12357c491a0dce5acc0bd1f00c26f89d8f20e6] source sha:c1b9402d49a7cd4bec383f28d397d9d89541f0                                                e0
git bisect good da12357c491a0dce5acc0bd1f00c26f89d8f20e6
# good: [2783cac5d1f18f44ce31f52eb7ae2f0ea17d0c96] source sha:5d7a203bdae1940e4846c4c42f5d733e4ffa41                                                60
git bisect good 2783cac5d1f18f44ce31f52eb7ae2f0ea17d0c96
# good: [2783cac5d1f18f44ce31f52eb7ae2f0ea17d0c96] source sha:5d7a203bdae1940e4846c4c42f5d733e4ffa41                                                60
git bisect good 2783cac5d1f18f44ce31f52eb7ae2f0ea17d0c96
# bad: [c6b55917df3df447007dbb29dd84f24d1203cfb3] source sha:5b8acf459e4a6728ea656e7abd5dfb08ad2ae34                                                5
git bisect bad c6b55917df3df447007dbb29dd84f24d1203cfb3
# bad: [c6b55917df3df447007dbb29dd84f24d1203cfb3] source sha:5b8acf459e4a6728ea656e7abd5dfb08ad2ae34                                                5
git bisect bad c6b55917df3df447007dbb29dd84f24d1203cfb3
# good: [f3cd4f9fed8d6054c5112732a412cce67ac90ce1] source sha:0bdb8eda1272596301391d9620ccec28666429                                                75
git bisect good f3cd4f9fed8d6054c5112732a412cce67ac90ce1
# good: [9c89ac023456f41259dca96ecbee34d9c41dc11b] source sha:a390d178b0440f5ecc151427c9d05f52c54e8c                                                45
git bisect good 9c89ac023456f41259dca96ecbee34d9c41dc11b
# good: [feaf5ecccd61a411c22c709cfc9e05e800a13679] source sha:433fb8c055ff93a9bb3567310d2dda6bbcc9d6                                                35
git bisect good feaf5ecccd61a411c22c709cfc9e05e800a13679
# bad: [9a231ed536024baadca8536923889128758c703b] source sha:0cd88d27ecd87c8c5791418bcac6ab1684ece74                                                a
git bisect bad 9a231ed536024baadca8536923889128758c703b
# bad: [8857b2e421310c1f3fa01d54226dc933ee8d73b8] source sha:1ebffd4011b7e6ccf9f3eafdc7a88aa4bc77fd4                                                f
git bisect bad 8857b2e421310c1f3fa01d54226dc933ee8d73b8
# good: [194df729cec157dd9eac68c9cd95e3b6474a04e1] source sha:d798ee8f82dcbdada49ef0c745ff234d936bb3                                                f6
git bisect good 194df729cec157dd9eac68c9cd95e3b6474a04e1
# skip: [f94c3dc930c090202b42cdae47e184331f087643] source sha:9905a8b953953b9ec5e123a17997d5931978ac                                                fe
git bisect skip f94c3dc930c090202b42cdae47e184331f087643
# bad: [0d3becec432f8a91e4bef7deb4273ccb7f7d00f3] source sha:969d833e7927f099de35b87d225a9e9dd9f0866                                                1
git bisect bad 0d3becec432f8a91e4bef7deb4273ccb7f7d00f3
# good: [65d31ab28dcfc50043508d7b795b8868a5cd2042] source sha:d3ba96e37ec4681b9b7cb1ffac5e34060e47a4                                                ee
git bisect good 65d31ab28dcfc50043508d7b795b8868a5cd2042
# good: [959e021ca4b6d38d286c75527c182738e4b98db7] source sha:d36da8c19378f4772c896ca4df94117077e823                                                d6
git bisect good 959e021ca4b6d38d286c75527c182738e4b98db7
# only skipped commits left to test
# possible first bad commit: [0d3becec432f8a91e4bef7deb4273ccb7f7d00f3] 
source 969d833e7927f099de35b87d225a9e9dd9f08661
# possible first bad commit: [f94c3dc930c090202b42cdae47e184331f087643] 
source 9905a8b953953b9ec5e123a17997d5931978acfe
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:14:19 UTC Comment hidden (obsolete)
Comment 4 Luis 2017-05-08 11:36:31 UTC
I need to use the latest version of the application due to other bugs and I wanted to use this control, but I have encountered this problem.

Tested today in Windows 7. The problem is present.

Versión: 5.3.2.2
Id. de compilación: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1
Subproc. CPU: 2; SO: Windows 6.1; Repr. de IU: predet.; Motor de trazado: HarfBuzz; 
Configuración regional: es-ES (es_ES); Calc: group
Comment 5 Luis 2018-05-15 12:59:06 UTC
Tested in Windows 7 with LO 6.0
The problem persist.

Versión: 6.0.4.2
Id. de compilación: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
Subprocs. CPU: 2; SO: Windows 6.1; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: group
Comment 6 QA Administrators 2019-05-16 03:13:09 UTC Comment hidden (obsolete)
Comment 7 kiloran.public+bugzilla 2019-05-23 12:05:02 UTC
When the bug was reported, I was using Windows 7. I now have a new laptop with Windows 10. I have retested the bugs using various portable versions of LibreOffice and also the current desktop version. I also tested using Linux Mint.

Reported Bug: Using the basic macro, the progress bar essentially works, but it only shows the progress bar AT the current value. Previous versions of LibreOffice (and OpenOffice) show the progress bar filled in FROM zero TO the current value.
Results:
4.0.2.2 portable, Windows 10: Works OK, no problem
4.3.4.1 portable, Windows 10: Works OK, no problem
5.3.1.2 portable, Windows 10: Works OK, no problem
5.3.2.2 portable, Windows 10: Works OK, no problem
5.3.4.2 portable, Windows 10: Works OK, no problem
5.4.3.2 portable, Windows 10: Works OK, no problem
6.0.0.3 portable, Windows 10: Works OK, no problem
6.1.4.2 portable, Windows 10: Works OK, no problem
6.2.2.2 portable, Windows 10: Works OK, no problem
6.2.2.2 Desktop App x64, Windows 10: Works OK, no problem
6.2.4.2 Desktop App x64, Windows 10: Works OK, no problem
5.1.6.2 Linux Mint: Works OK, no problem

Reported Bug: Using the Python script, the progress bar does not show at all, although the dialog does display. Previous versions of LibreOffice and OpenOffice do display the progress bar.
Results:
4.0.2.2 portable, Windows 10: Works OK, no problem
4.3.4.1 portable, Windows 10: Works OK, no problem
5.3.1.2 portable, Windows 10: Problem still exists
5.3.2.2 portable, Windows 10: Problem still exists
5.3.4.2 portable, Windows 10: Problem still exists
5.4.3.2 portable, Windows 10: Problem still exists
6.0.0.3 portable, Windows 10: Problem still exists
6.1.4.2 portable, Windows 10: Problem still exists
6.2.2.2 portable, Windows 10: Problem still exists
6.2.2.2 Desktop App x64, Windows 10: Problem still exists
6.2.4.2 Desktop App x64, Windows 10: Problem still exists
5.1.6.2 Linux Mint: Macro runs but the progress bar window is not shown at all

Reported bug: There is an additional problem with the Python script which is evident with all versions of LibreOffice and OpenOffice.... the background of the dialog/progressbar is transparent. Using the Basic macro, the background is correctly shown as light blue.
Results:
4.0.2.2 portable, Windows 10: Works OK, no problem
4.3.4.1 portable, Windows 10: Works OK, no problem
5.3.1.2 portable, Windows 10: Works OK, no problem
5.3.2.2 portable, Windows 10: Works OK, no problem
5.3.4.2 portable, Windows 10: Works OK, no problem
5.4.3.2 portable, Windows 10: Works OK, no problem
6.0.0.3 portable, Windows 10: Works OK, no problem
6.1.4.2 portable, Windows 10: Works OK, no problem
6.2.2.2 portable, Windows 10: Works OK, no problem
6.2.2.2 Desktop App x64, Windows 10: Works OK, no problem
6.2.4.2 Desktop App x64, Windows 10: Works OK, no problem
5.1.6.2 Linux Mint: Macro runs but the progress bar window is not shown at all
Comment 8 Buovjaga 2019-05-23 12:37:21 UTC
(In reply to kiloran.public+bugzilla from comment #7)
> When the bug was reported, I was using Windows 7. I now have a new laptop
> with Windows 10. I have retested the bugs using various portable versions of
> LibreOffice and also the current desktop version. I also tested using Linux
> Mint.

Thanks for you effort, but raal already pinpointed the cause of the problem back in 2015 (comment 2).
Comment 9 kiloran.public+bugzilla 2019-05-23 13:58:29 UTC
(In reply to Buovjaga from comment #8)
> (In reply to kiloran.public+bugzilla from comment #7)
> > When the bug was reported, I was using Windows 7. I now have a new laptop
> > with Windows 10. I have retested the bugs using various portable versions of
> > LibreOffice and also the current desktop version. I also tested using Linux
> > Mint.
> 
> Thanks for you effort, but raal already pinpointed the cause of the problem
> back in 2015 (comment 2).

I'm a bit confused! I got an email asking me to check if the problem still existed, which I did. I'm then told that this was not necessary since the cause was identified over 3 years ago.... yet the python problem still exists!
Comment 10 Buovjaga 2019-05-23 14:19:36 UTC
(In reply to kiloran.public+bugzilla from comment #9)
> (In reply to Buovjaga from comment #8)
> > (In reply to kiloran.public+bugzilla from comment #7)
> > > When the bug was reported, I was using Windows 7. I now have a new laptop
> > > with Windows 10. I have retested the bugs using various portable versions of
> > > LibreOffice and also the current desktop version. I also tested using Linux
> > > Mint.
> > 
> > Thanks for you effort, but raal already pinpointed the cause of the problem
> > back in 2015 (comment 2).
> 
> I'm a bit confused! I got an email asking me to check if the problem still
> existed, which I did. I'm then told that this was not necessary since the
> cause was identified over 3 years ago.... yet the python problem still
> exists!

"I have retested the bugs using various portable versions" <- it was necessary to only test with the very latest version. If a bug is bisected, it does not need to be retested with old versions anymore.
Comment 11 Miklos Vajna 2019-06-12 09:42:18 UTC
The basic (i.e. not the python) problem is a regression from commit e6c2951f1957224aa0e7dc97b33b0450c41f92f7 (delegate RenderContext, invalidate - prgsbar, scrbar, 2015-04-29). I'll try to see what's happening here.
Comment 12 Commit Notification 2019-06-12 18:14:00 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/6fd3eb533998c8f63430a43767b2a52aa5e71e3f%5E%21

tdf#95173 vcl: fix partially drawn progressbar widget

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Miklos Vajna 2019-06-13 07:18:41 UTC
The python part is still unresolved, so not yet closing.
Comment 14 Commit Notification 2019-06-13 08:27:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/60f2fa03cfd2fee08430a4d502c9d47ed2a89db7%5E%21

tdf#95173 vcl: fix partially drawn progressbar widget

It will be available in 6.3.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2019-06-13 09:38:25 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/f7157f04fab298423e2c4f6a7e5f8e361164b15f%5E%21

tdf#95173 vcl: fix not drawn progressbar widget from UNO

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2019-06-13 12:18:46 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/66bfaa01486891627b0748c4ba7b8d86e0fdc439%5E%21

tdf#95173 vcl: fix not drawn progressbar widget from UNO

It will be available in 6.3.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Xisco Faulí 2019-06-25 15:53:59 UTC
At least the python part was also problematic on Linux.

Verified in

Version: 6.4.0.0.alpha0+
Build ID: 52800731baf9fcb88e54d60de5585640c8f97f7b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!!