Bug 147708 - Writer crashes trying to open file with 3000 pages
Summary: Writer crashes trying to open file with 3000 pages
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.5
Keywords: bibisected, bisected, regression
: 147707 (view as bug list)
Depends on:
Blocks: GDI-Limit
  Show dependency treegraph
 
Reported: 2022-03-01 09:40 UTC by John Watts
Modified: 2022-08-03 07:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Database of songs (7.14 MB, application/msword)
2022-03-01 10:38 UTC, John Watts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Watts 2022-03-01 09:40:07 UTC
I cannot open a document with over 3000 pages which was ok with the previous version.
Comment 1 Xisco Faulí 2022-03-01 10:19:18 UTC
*** Bug 147707 has been marked as a duplicate of this bug. ***
Comment 2 Xisco Faulí 2022-03-01 10:19:36 UTC Comment hidden (obsolete)
Comment 3 John Watts 2022-03-01 10:38:00 UTC
Created attachment 178591 [details]
Database of songs

This file opens in previous versions. 
Many thanks for your reply.
Comment 4 Xisco Faulí 2022-03-01 10:41:07 UTC
I can't reproduce it in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: c97a3592c78ce276a353f95ce68c70a8a39174a0
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 5 Xisco Faulí 2022-03-01 10:42:13 UTC
Could you please paste the info from Help - about LibreOffice ?
Comment 6 Mike Kaganski 2022-03-14 07:11:46 UTC
No repro using Version: 7.3.1.3 / LibreOffice Community
Build ID: 30(Build:3)
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.1~rc3-0ubuntu0.20.04.1~lo1
Calc: threaded

Repro using Version: 7.3.1.3 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

and using Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 69656132a00491b96da3a898c350f11e9619da64
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (ru_RU); UI: en-US
Calc: CL

Caused by GDI objects limit (tries to create more than 10 000 GDI objects, mostly bitmaps and DC - about 50/50% each). The problem is each page break being manual, and each manual page break trying to draw its own bitmap creating the control (see SwPageBreakWin). Another problem is creating two GDI objects per each control, halving maximal total object count.

No repro using Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

which means something changed (maybe a little bit, like a difference between 9999 and 10001; or maybe much - needs a bibisect).
Comment 7 Mike Kaganski 2022-03-14 07:53:12 UTC
Regression after https://git.libreoffice.org/core/+/51379fb3d46e5891bdaea0122bd62b0753663da3

Author Caolán McNamara <caolanm@redhat.com>
Date   Thu Dec 03 15:54:45 2020 +0000

  weld writer's FrameControl MenuButtons

which changed PageBreakWin-related stuff.
Comment 8 Commit Notification 2022-05-30 15:58:00 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9104861a41e0edd07e4d74da47acb4e9d92b1ddd

tdf#147708 create floating menubutton on demand

It will be available in 7.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 9 Caolán McNamara 2022-05-30 16:19:09 UTC
that should do it, done in trunk, backport to 7-3 in gerrit
Comment 10 Commit Notification 2022-06-06 11:36:07 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/44bbe7dd3ca3dc924395eb9aa5ef7aa9ccac25bc

tdf#147708 create floating menubutton on demand

It will be available in 7.3.5.

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.