Bug 112730 - The different palette files (soc, sog, sob) are read everytime when opening the page dialog (since 5.1.0.0alpha+)
Summary: The different palette files (soc, sog, sob) are read everytime when opening t...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Too-Much-File-Access
  Show dependency treegraph
 
Reported: 2017-09-28 20:32 UTC by Telesto
Modified: 2023-10-10 08:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-09-28 20:32:10 UTC
Description:
The different palette files (soc, sog, sob) are read:
* every time when opening the page dialog 
* and the file read count has doubled 
since commit d5016b013672056f89f908b6cde38183fad145bb (standard.soc was accessed only 8 times before the commit and after 16 times after).

Steps to Reproduce:
1. Open Writer
2. Launch Process Monitor with filter set to Path Contains \standard.soc
3. Start the capture
4. Open Format -> Page menu
5. Stop the capture


Actual Results:  
The different palette files (soc, sog, sob) are read
* each time when opening the page dialog.
* the read count has doubled to 16x

Expected Results:
* Should happen only the first time (as before) 
* and probably only 8 times


Reproducible: Always

User Profile Reset: No

Additional Info:
~/bibisect-win32-5.1
$ git bisect good b2f23bdb2325c09994a75c2f50eb329b524fea61 is the first bad commit
commit b2f23bdb2325c09994a75c2f50eb329b524fea61
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat Nov 14 03:24:27 2015 -0800

    source d5016b013672056f89f908b6cde38183fad145bb

    source d5016b013672056f89f908b6cde38183fad145bb

:040000 040000 0281ea694e8e0c8bc632e7658c1d21564c103b4a d6111d57fdc7f91d5c8e4a5ebd18809d1bc83085 M      instdir

~/bibisect-win32-5.1
$ git bisect log
# bad: [05d11632892a322664fb52bac90b2598b7fb7544] source 5616d22b57a9a5e57d545e912e029162a230829b
# good: [c1efd324c6ad448ac9edb030dc9738b9e6899e4d] source ab465b90f6c6da5595393a0ba73f33a1e71a2b65
git bisect start 'origin/master' 'oldest'
# good: [97526ab777da7e58ce283c05498262ecdd4d6f7f] source 4ea70f87f7a2b61eda6e5ab1f48debf6fcfadc1f
git bisect good 97526ab777da7e58ce283c05498262ecdd4d6f7f
# good: [86fee7ded76d9c2756ccab6aef160a2d7fab0ab6] source 1b62841b1859ae3443e2bf1ebe99ec3d6afb6cc2
git bisect good 86fee7ded76d9c2756ccab6aef160a2d7fab0ab6
# good: [11864a7db429a57aeea021e0b3f1fb1412282d32] source e5b721a14c1c8e5261a70588b30353cbb5bd55c6
git bisect good 11864a7db429a57aeea021e0b3f1fb1412282d32
# bad: [7d52a87c0aa24498584ec522705cfae3a3a5a038] source 479df22d0b4b0e0393fcf621e7380b38415bcef8
git bisect bad 7d52a87c0aa24498584ec522705cfae3a3a5a038
# bad: [24f34e7d5452bbbda3ab10f38dffd8330bd3356a] source 5140fe150b2962f2973bd07e770df46fee7ab25d
git bisect bad 24f34e7d5452bbbda3ab10f38dffd8330bd3356a
# good: [5c46c3cd0a5a5a62b016e818b4edda69bfedfe68] source 318c3a48c66dd4ceba801ef410f89b8bf900d5c7
git bisect good 5c46c3cd0a5a5a62b016e818b4edda69bfedfe68
# good: [c5c69ccfd093e2fc54caed8f0a19634da970d5df] source 1266429e91a56bcce59a7b98523e8edb8b22ed18
git bisect good c5c69ccfd093e2fc54caed8f0a19634da970d5df
# good: [30efef4f23a1eef8f6241d18ebebd235420b8d04] source 58d8fa1105f5a259111c1cbafc54ff1586d2e24c
git bisect good 30efef4f23a1eef8f6241d18ebebd235420b8d04
# good: [4121cb5f569c8201f194814beea05efeb7786edf] source 0bf24b19c7618ee83f88aa9364f68a4db1d2c04d
git bisect good 4121cb5f569c8201f194814beea05efeb7786edf
# good: [6d4829ca8ba586b22610cff9f018d0363e9cce17] source e3a8d361f71cad0b8a0344f9525b62119fdf1004
git bisect good 6d4829ca8ba586b22610cff9f018d0363e9cce17
# good: [436b8c29f25109e02a0459cef89b5f397fbc80a7] source 0ab6b1fc6e84b4f5f3a9c0b93b999aa320a70a0e
git bisect good 436b8c29f25109e02a0459cef89b5f397fbc80a7
# good: [84262bdc425cb6104cf126ce3ad9b2adf855deb8] source f723a62cb5e0e37e56f341f4641ab3fd05bbc8dd
git bisect good 84262bdc425cb6104cf126ce3ad9b2adf855deb8
# bad: [b2f23bdb2325c09994a75c2f50eb329b524fea61] source d5016b013672056f89f908b6cde38183fad145bb
git bisect bad b2f23bdb2325c09994a75c2f50eb329b524fea61
# good: [d1084a4bae80a6ad1cc597c4ea971b5c1cdc286d] source cc77a2a8f3447b02d33a224df627f6500adc158f
git bisect good d1084a4bae80a6ad1cc597c4ea971b5c1cdc286d
# first bad commit: [b2f23bdb2325c09994a75c2f50eb329b524fea61] source d5016b013672056f89f908b6cde38183fad145bb


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Aron Budea 2017-09-29 01:01:50 UTC
I can confirm with LO 5.4.2.2, and also checked the bibisect result commit. The number of standard.soc accesses also increased between the two, I assume because of bug 112532.
Comment 2 Telesto 2017-09-30 08:08:41 UTC
Regression introduced by:

author	Michael Stahl <mstahl@redhat.com>	2015-11-12 21:02:20 (GMT)
committer	Michael Stahl <mstahl@redhat.com>	2015-11-13 10:03:09 (GMT)
commit d5016b013672056f89f908b6cde38183fad145bb (patch)
tree 584efcdf260fc38ba5348ba40521fadb1b3cc9ac
parent cc77a2a8f3447b02d33a224df627f6500adc158f (diff)
svx: loplugin:badstatics
Change-Id: Ief31d8153fdbf91cdd29df5ac7801bd88a98542e

Adding Cc: to Michael Stahl
Comment 3 Julien Nabet 2017-12-17 15:35:45 UTC
Michael: just for curiosity what are criteria for lo:badstatics? Is there some doc (even just some lines)?
In the case of this bugtracker, what may be done here? (put something else static, a singleton, other?)

BTW, digging on the stack of callers, I noticed that XPropertyList::CreatePropertyList is declared static (see https://opengrok.libreoffice.org/xref/core/include/svx/xtable.hxx#228) but implemented not static, (see https://opengrok.libreoffice.org/xref/core/svx/source/xoutdev/xtable.cxx#331), is it ok?
Comment 4 Aron Budea 2017-12-25 06:44:03 UTC
Found this note:
"wrote a "badstatics" clang plugin to find problematic global variables referencing VCL objects that may cause crashes on shutdown and fixed a bunch of those"
https://wiki.documentfoundation.org/UnderTheHood/5.1

I still don't understand, though.

(In reply to Julien Nabet from comment #3)
> BTW, digging on the stack of callers, I noticed that
> XPropertyList::CreatePropertyList is declared static (see
> https://opengrok.libreoffice.org/xref/core/include/svx/xtable.hxx#228) but
> implemented not static, (see
> https://opengrok.libreoffice.org/xref/core/svx/source/xoutdev/xtable.
> cxx#331), is it ok?

Seems to be fine, the static keyword is only required at declaration.
Comment 5 Aron Budea 2018-01-08 14:42:01 UTC
Let me add Michael's comments from IRC here:
<mst_> bearon: XColorList derives from XPropertyList which has std::vector< std::unique_ptr<XPropertyEntry> > and XPropertyEntry has "Bitmap   maUiBitmap;"
<mst_>: bearon: btw badstatics is currently far too lenient, it should really flag anything with a user-defined dtor, but ENOTIME

Maybe the solution would be to use a different structure for color lists?
Comment 6 QA Administrators 2019-01-09 03:45:02 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2021-01-09 03:49:48 UTC Comment hidden (obsolete)
Comment 8 Gabor Kelemen (allotropia) 2022-02-10 07:43:33 UTC
Still observable in

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ccbd2b0c663fa19be5301f0ea8ac74caa055fe47
CPU threads: 14; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded
Comment 9 Michael Stahl (allotropia) 2023-10-10 08:37:29 UTC
the practical impact of this for real users is in doubt, likely there are a lot of more important problems...