[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

Patrick (volunteer)  changed:

   What|Removed |Added

   Assignee|[email protected] |[email protected]
   |desktop.org |
 Status|NEW |ASSIGNED

--- Comment #16 from Patrick (volunteer)  ---
Found a better solution than the one I linked to in comment #15:

https://gerrit.libreoffice.org/c/core/+/187761

It still needs to be reviewed. But I will post steps for testing once it has
been committed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #15 from Patrick (volunteer)  ---
Created attachment 201760
  --> https://bugs.documentfoundation.org/attachment.cgi?id=201760&action=edit
Instruments memory usage profile with
https://gerrit.libreoffice.org/c/core/+/187736

I have submitted the following fix for this bug:

https://gerrit.libreoffice.org/c/core/+/187736

Interestingly, it also lowers memory usage due to cached font tables
significantly. With the above fix, memory usage due to cached font tables is
around 180 MB after scrolling through the entire font listbox.

Previously, in my original patch that caused this bug, memory usage was 550 MB.
Without my original patch or the above fix, memory was 750 MB. So, the above
fix drops memory usage by nearly 400 MB vs my original patch and 600 MB without
any of my patches.

I admit that I am suprised how much cached memory my original patch missed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

Commit Notification  changed:

   What|Removed |Added

 Whiteboard||target:25.2.6

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #13 from Patrick (volunteer)  ---
(In reply to Patrick (volunteer) from comment #12)
> Anyway, I think we have 2 choices here:
> 1. Revert my patch and watch memory usage explode for *all* macOS users
> (like an extra GB or two)
> 2. I must write another "dangerous" modification to HarfBuzz to force a font
> to repopulate its glyph cache after it has been flushed.

It is kind of ironic that the developer who caused the HarfBuzz memory problems
on macOS (and which I have been trying to clean up) thinks my patch is
dangerous. Yet, HarfBuzz has no public API for flushing a font's glyph cache
and since @Khaled's code holds onto a HarfBuzz font instance of every system
font until LibreOffice is quit, holding all those font instances without
flushing their glyph caches is not a reasonable approach on macOS.

Sure, I could rewrite @Khaled's vcl implementation and continually delete a
HarfBuzz font immediately after accessing its glyphs but I really don't have
any spare time to implement font swapping in vcl.

So it looks like another "dangerous" patch is our only option.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #12 from Patrick (volunteer)  ---
(In reply to Xisco Faulí from comment #11)
> (In reply to Xisco Faulí from comment #9)
> > Issue reported on harfbuzz's side:
> > https://github.com/harfbuzz/harfbuzz/issues/5386
> 
> @Patrick, I thought you might be interested in this issue since it's a mix
> of the upgrade to 11.2.0 and your patch for tdf#159529:
> https://git.libreoffice.org/core/commit/
> af47a78e11d4819bb4b1ae1a1277babd10d815b7

I got a chuckle with the "that patch dangerously modifies HarfBuzz internals".
Yes, because HarfBuzz catches every font's glyphs in memory which, on macOS,
means several gigabytes of data due to the large size of emoji and CJK fonts.
This makes HarfBuzz fast but overwhelms your average Mac.

HarfBuzz used to have a flushable cache for a font's glyphs to that
automatically repopulate its glyph cache when used again. So I am guessing
HarfBuzz now just expects  "font glyphs remain in memory for the life of the
font". Bad idea on macOS IMHO but maybe Windows and Linux fonts aren't very
large so the HarfBuzz developers don't see the memory usage as a problem.

Anyway, I think we have 2 choices here:
1. Revert my patch and watch memory usage explode for *all* macOS users (like
an extra GB or two)
2. I must write another "dangerous" modification to HarfBuzz to force a font to
repopulate its glyph cache after it has been flushed.

Thoughts?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

Xisco Faulí  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #11 from Xisco Faulí  ---
(In reply to Xisco Faulí from comment #9)
> Issue reported on harfbuzz's side:
> https://github.com/harfbuzz/harfbuzz/issues/5386

@Patrick, I thought you might be interested in this issue since it's a mix of
the upgrade to 11.2.0 and your patch for tdf#159529:
https://git.libreoffice.org/core/commit/af47a78e11d4819bb4b1ae1a1277babd10d815b7

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #10 from Xisco Faulí  ---
(In reply to Xisco Faulí from comment #9)
> Issue reported on harfbuzz's side:
> https://github.com/harfbuzz/harfbuzz/issues/5386

@Patrick, I thought you might be interested in this issue since it's a mix of
the upgrade to 11.2.0 and your patch for tdf#159529:
https://git.libreoffice.org/core/commit/af47a78e11d4819bb4b1ae1a1277babd10d815b7

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

Xisco Faulí  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=15
   ||9529

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #9 from Xisco Faulí  ---
Issue reported on harfbuzz's side:
https://github.com/harfbuzz/harfbuzz/issues/5386

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

Xisco Faulí  changed:

   What|Removed |Added

   Severity|normal  |major
   Priority|medium  |high
   Keywords||bibisected, bisected,
   ||regression

--- Comment #8 from Xisco Faulí  ---
Regression introduced by

commit  477689c58d842c718940c568616890179f5aac06[log]
author  Xisco Fauli Tue Apr 29 13:21:44
2025 +0200
committer   Xisco Fauli Tue Apr 29
15:05:45 2025 +0200
tree95c924bb3e385817ab3a9a151e042a4f828a174f
parent  b4965d0a7875384d1fedc7d43762c94b30e5e90f [diff]

harfbuzz: upgrade to 11.2.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #7 from Xisco Faulí  ---
Created attachment 201751
  --> https://bugs.documentfoundation.org/attachment.cgi?id=201751&action=edit
simplified document

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-11 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

Xisco Faulí  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #6 from Xisco Faulí  ---
Reproduced with 

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 10850b9ea91807c4f8464e42fee7f33b7c389a77
CPU threads: 8; OS: macOS 15.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_ES.UTF-8); UI: en-US
Calc: threaded

with a non signed build

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #5 from Xisco Faulí  ---
I can reproduce it on mac though with a local build

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

Xisco Faulí  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #4 from Xisco Faulí  ---
Not reproducible in

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 20667acbca5df17771a3581632a672d5db4e751b
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #3 from Iandol  ---
The same document works for me in 25.2.4

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #2 from Iandol  ---
Created attachment 201744
  --> https://bugs.documentfoundation.org/attachment.cgi?id=201744&action=edit
maccOS crash log

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 167455] Crash with a simple document in 25.8 RC1

2025-07-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=167455

--- Comment #1 from Iandol  ---
Created attachment 201743
  --> https://bugs.documentfoundation.org/attachment.cgi?id=201743&action=edit
File causing crash

-- 
You are receiving this mail because:
You are the assignee for the bug.