Bug 165382 - When I select the preferences pane it now only on occasion will open to preferences (I use dark mode on my mac). Usually it just opens to a blank window.
Summary: When I select the preferences pane it now only on occasion will open to prefe...
Status: RESOLVED DUPLICATE of bug 165438
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: ARM macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.2
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-22 00:36 UTC by Mike S
Modified: 2025-03-04 13:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screen recording of blank window and window lag (8.70 MB, video/mp4)
2025-02-25 23:46 UTC, Sahil Gautam (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike S 2025-02-22 00:36:13 UTC
Description:
Libreoffice 25.2.0.3

Mac Mini M4 Pro 64 Gb

Sequoia 15.3.1

When I select the preferences pane it now only on occasion will open to preferences (I use dark mode on my mac). Usually it just opens to a blank window.

I have reloaded LO, rebooted etc.

Steps to Reproduce:
1.Select preference
2.
3.

Actual Results:
When I select the preferences pane it now only on occasion will open to preferences (I use dark mode on my mac). Usually it just opens to a blank window.

Expected Results:
Opens to a blank page


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Preference pane should open to settings
Comment 1 Mike S 2025-02-22 00:54:23 UTC
It is more pronounced when a calc sheet is open...
Comment 2 Mike S 2025-02-23 17:01:22 UTC
Edit 1: I just made a bug report, with with a calc sheet open preferences never opens and LO hangs...

Edit 2: Like others I am also experiencing that nearly all of the UI is pure black, since I cannot get into the preference pane, I cannot attempt to fix it.

I think the issues are related to Sequoia 15.3.1, it appears that the problems started occurring with that OS update.

I tried rolling LO back to 24.8.5 (after a complete uninstall, I scrubbed every piece of LO from my system) but the behavior was the same as 25.2.0.3. I am going to try LO (MacOS Intel) and see if it is better in Rosetta, but for now I am dead in the water and limping by on Numbers and Pages

Edit 3: Same behavior with the MacOS Intel version, I am convinced it is Sequoia 15.3.1 causing the issues...
Comment 3 Patrick (volunteer) 2025-02-23 21:08:36 UTC
I cannot reproduce this on my Silicon Mac laptop running macOS Sequoia 15.3.1:

Version: 25.2.0.3 (AARCH64) / LibreOffice Community
Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069
CPU threads: 8; OS: macOS 15.3.1; UI render: Skia/Metal; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded

So the next thing to try is to delete your LibreOffice preference files using the following steps:

1. Quit LibreOffice
2. Go to the Finder and select the Go > Go to Folder menu item
3. Paste the following path in the dialog that appears and press the Enter key:
   ~/Library/Application Support/LibreOffice
4. There should be a subfolder in the above folder named "4". Move that folder
   to the Trash.
5. Restart LibreOffice

Do you see any change after doing the above steps?
Comment 4 Mike S 2025-02-23 21:54:32 UTC
Patrick,

That was the first thing that I tried.  No joy...

There are a number of people on Reddit experiencing the same problem (there are several threads about the issue).

I have booted to safe mode, same problem.

Completely delete all remnants of LO and reinstalled (25.2.0 Intel version, 24.8.5, and the 25.2.1 Beta  version). 

All exhibit the same problem, you can launch preferences once and after that it hangs LO. 

I have used LO for years and have never seen anything like this.  The only variables in my machine are Sequoia 15.3.1 and LO 25.2.0. No other software, no other changes.

So unfortunately I have exported my important files to utilize google docs and sheets, so I have them handy.

If I force quite LO and reboot then I can use LO.  I am only going to do that to get files to a stable platform.

As I indicated, I have used LO for years, but right now I am dead in the water, with a profoundly unstable LO platform.  So I have to, for the time being anyway, switch to a stable platform.  I really hate to do that, I like LO and have contributed money to the cause. But work product is in danger, so must protect that.
Comment 5 Patrick (volunteer) 2025-02-23 23:34:33 UTC
Is anyone else (In reply to Mike S from comment #4)
> There are a number of people on Reddit experiencing the same problem (there
> are several threads about the issue).

My mistake. I saw the following Reddit thread and that post described tdf#165266 very closely so when I saw "blank window" in this bug I wondered if you were seeing a variant of that bug:

https://old.reddit.com/r/libreoffice/comments/1iw92mz/macos_252_dark_mode_all_black/

If anyone else seeing a totally blank window, please post as my next guess is that maybe Skia (Google code that draws directly your machine's GPU drawing code) is failing with the new M4 chip or its GPU and I have a few ideas for disabling Skia without having to use the Preferences dialog.
Comment 6 Patrick (volunteer) 2025-02-24 18:04:12 UTC
OK. I think I finally encountered this bug this morning. I launched LibreOffice 25.2.0.3 and opened a new Calc document.

I have Dark Mode for both my system and LibreOffice preferences so I would normally see a black document background and light gray grid lines but today I saw no gridlines and the document area appeared black. I am guessing that the grid lines are black.

Does that sound like what everyone is seeing? I should've taken a screen snapshot but I didn't and just quit LibreOffice, deleted my entire ~/Library/Application Support folder, and the grid lines were back to light gray when I relaunched LibreOffice.

If what I saw is this bug, I now think there are two different bugs at work here:

1. Wrong system colors - This is definitely a result of recent macOS changes by Apple which I fixed this morning (see my comment https://bugs.documentfoundation.org/show_bug.cgi?id=165266#c10 in tdf#165266).

2. Disabled Customization preferences - This section in the Options dialog's appearance panel is enabled in the lastest LibreOffice code but is disabled in LibreOffice 25.2.0.3. The layout in the lastest code is slightly different than in 25.2.0.3 so maybe the latest changes just need to be copied into the next 25.2 release.

@Sahil: Do you have any ideas as to what is causing the Customization preferences section to be disabled in 25.2 branch but not in the master branch?
Comment 7 Sahil Gautam (allotropia) 2025-02-24 21:01:26 UTC
(In reply to Patrick (volunteer) from comment #6)
> @Sahil: Do you have any ideas as to what is causing the Customization
> preferences section to be disabled in 25.2 branch but not in the master
> branch?

Well that's because I merged a patch which enables the themes by default. I couldn't merge that patch into 25.2 because it had a string change. https://gerrit.libreoffice.org/c/core/+/179406 here's the patch.

I couldn't reproduce this "black window bug".
Comment 8 Patrick (volunteer) 2025-02-24 21:23:48 UTC
(In reply to Sahil Gautam (allotropia) from comment #7)
> Well that's because I merged a patch which enables the themes by default. I
> couldn't merge that patch into 25.2 because it had a string change.
> https://gerrit.libreoffice.org/c/core/+/179406 here's the patch.

No worries. I did a local build with the libreoffice-25-2 branch and found a way to enable the disabled controls in Customization section in the following patch. The patch definitely needs review to make as I am not familiar with that code. But with the patch, I can force the document background to white when I am in dark mode without needing to restart LibreOffice so hopefully that is good news:

https://gerrit.libreoffice.org/c/core/+/182116
Comment 9 Patrick (volunteer) 2025-02-24 21:34:58 UTC
Correction: I posted a link the wrong patch in comment #8. The following is the correct link:

https://gerrit.libreoffice.org/c/core/+/182122
Comment 10 Commit Notification 2025-02-25 03:09:41 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/c22df190a80d6ac8a5a2465e618d9dd814e55ea4

tdf#165382 Don't disable the color customization controls

It will be available in 25.2.2.

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 11 Patrick (volunteer) 2025-02-25 19:29:15 UTC
There has been a breakthrough today. Using the user preferences of the bug filer of tdf#165438, I can now reproduce this bug.

There isn't a fix yet, but I did find a workaround that worked for me:

1. Launch LibreOffice and select the LibreOffice > Settings menu item

2. In the Options dialog that appears, select LibreOffice > Appearance in the left sidebar and then press then the "Reset All" button in the right panel

3. Press the "OK" button to close the Options dialog
Comment 12 Sahil Gautam (allotropia) 2025-02-25 19:44:14 UTC
(In reply to Patrick (volunteer) from comment #11)
> There has been a breakthrough today. Using the user preferences of the bug
> filer of tdf#165438, I can now reproduce this bug.

Can you please mail me the user preferences? It seems like a themes bug.

> 2. In the Options dialog that appears, select LibreOffice > Appearance in
> the left sidebar and then press then the "Reset All" button in the right
> panel

The "Reset All" button doesn't exist in 25.2, it's in the master branch. Now I am 90% sure it's a themes bug.
Comment 13 Sahil Gautam (allotropia) 2025-02-25 23:38:55 UTC
It's not reproducable on my system. I tried 25-2, latest master, and 25-2 (without Patrick's latest patches) and still couldn't reproduce it like Mike suggested.

BUT

I found another issue, one quite similar to this one. So when I open a calc spreadsheet and press mod + , to open the options dialog, the dialog drawing is delayed by quite a lot. If I don't move the mouse, the dialog drawing is delayed even more, and it hangs the application for a second or two.

I thought of running perf and testing which function is taking the longest (it would have been my first time using perf), but homebrew didn't have perf and I couldn't find any simple way of installing it in reasonible amount of time, something @Patrick might be interested in taking a look into.

At this point, I am quite sure that it's not a theming bug. Reason being that there are a lot of checks to block any UI color customizations for automatic theme. From the user complaints, all of them were just playing with the appearance, not the themes.
Comment 14 Sahil Gautam (allotropia) 2025-02-25 23:46:03 UTC
Created attachment 199448 [details]
screen recording of blank window and window lag

as you can see, if I don't move the cursor, the dialog drawing is delayed even more, and when I click on the red button to close the dialog, it is taking a very long time to change the cursor from I to pointed arrow, and takes 1-2 seconds atleast to register the event.
Comment 15 Patrick (volunteer) 2025-02-26 01:27:29 UTC
(In reply to Sahil Gautam (allotropia) from comment #13)
> I thought of running perf and testing which function is taking the longest
> (it would have been my first time using perf), but homebrew didn't have perf
> and I couldn't find any simple way of installing it in reasonible amount of
> time, something @Patrick might be interested in taking a look into.

I don't have much time this week but you have Xcode installed on your Mac, right? If yes, I recommend Apple's Instruments application. It is buried somewhere within the Xcode application so I just use the following Terminal command to launch it:

  open -a Instruments

So with Instruments, you can do CPU profiling or leak analysis on any non-release LibreOffice builds (i.e. local builds and nightly builds). Just launch LibreOffice and Instruments can connect to your running "soffice" process.

It really is a slick tool IMHO.
Comment 16 Patrick (volunteer) 2025-02-26 01:33:50 UTC
I also forgot one other tool: the /Applications/Utilities/Activity Monitor application. This application is a good tool for grabbing a quick snapshot when LibreOffice is hanging or very slow.

Just launch this application and when LibreOffice hangs, go to Activity Monitor, search for LibreOffice, double-click on the LibreOffice entry, and press the "Sample" button in the dialog that appears.

The sample will show a bunch of stack traces. This is my really quick way to see if a hang is due to a deadlock or wait condition without having to use lldb.
Comment 17 Patrick (volunteer) 2025-03-01 19:56:38 UTC
(In reply to Sahil Gautam (allotropia) from comment #13)
> I found another issue, one quite similar to this one. So when I open a calc
> spreadsheet and press mod + , to open the options dialog, the dialog drawing
> is delayed by quite a lot. If I don't move the mouse, the dialog drawing is
> delayed even more, and it hangs the application for a second or two.

This sounds like tdf#165277 for which I just committed a fix to master. Do you still see such big delays in drawing and event processing with master?
Comment 18 Sahil Gautam (allotropia) 2025-03-01 21:30:54 UTC
(In reply to Patrick (volunteer) from comment #17)
> Do you still see such big delays in drawing and event processing with master?

I don't see the issue on master anymore, I click the shortcut and the dialog shows shows up with everything rendered and no delays in event processing either :)
Comment 19 Patrick (volunteer) 2025-03-04 13:35:41 UTC
OK. Now that this bug is fixed and we'll hopefully see the fix in the next LibreOffice releases, closing as duplicate of tdf#165438.

*** This bug has been marked as a duplicate of bug 165438 ***