Bug 157912 - Libreoffice Draw crashes when i open a large PDF
Summary: Libreoffice Draw crashes when i open a large PDF
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2023-10-25 06:27 UTC by zarifahnaf
Modified: 2024-03-19 15:04 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Video showcasing the issue (3.84 MB, video/webm)
2023-10-25 06:30 UTC, zarifahnaf
Details
Windbg (2.66 KB, text/plain)
2023-10-28 06:53 UTC, zarifahnaf
Details
procdump (1.09 KB, text/plain)
2023-10-28 06:53 UTC, zarifahnaf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zarifahnaf 2023-10-25 06:27:38 UTC
Description:
So If i open this pdf in impress, the entire thing crashes

Steps to Reproduce:
1. Click the PDF

Actual Results:
The pdf doesn't open

Expected Results:
The pdf should open


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 zarifahnaf 2023-10-25 06:29:10 UTC
I cant seem to add the pdf ( which is 115 MB )
Comment 2 zarifahnaf 2023-10-25 06:30:18 UTC
Created attachment 190404 [details]
Video showcasing the issue
Comment 4 zarifahnaf 2023-10-25 06:33:09 UTC
The entire system also freezes during the opening phase
Comment 5 Roman Kuznetsov 2023-10-26 14:07:18 UTC
No crash and LO opened the PDF by the link in Comment 3 (but it didn't show the PDF correctly)

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b5aaf194866c5e416167cb54d37f9f04dabc5375
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded
Comment 6 zarifahnaf 2023-10-27 15:28:44 UTC
(In reply to Roman Kuznetsov from comment #5)
> No crash and LO opened the PDF by the link in Comment 3 (but it didn't show
> the PDF correctly)
> 
> Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: b5aaf194866c5e416167cb54d37f9f04dabc5375
> CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL:
> win
> Locale: ru-RU (ru_RU); UI: ru-RU
> Calc: threaded

Hi, Thanks for your input on this issue, but i can reproduce the issue on my system. 

I have attached a video to showcase what i faced.

If you guys need want me to debug ( with a bit of direction of course ) i can get into the depth of what's causing this issue.
Comment 7 raal 2023-10-27 17:04:51 UTC
I can reproduce crash with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 97b6b6b16c4b623f8a34393a906272439a7f0314
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

but not in Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3
Calc: threaded

I tried to reproduce with bibisect repositories, but in version linux-64-7.4_master issue didn't occurs and in linux-64-7.5_oldest occurs.
Comment 8 Kira Tubo 2023-10-28 05:57:42 UTC
I wasn't able to reproduce on Windows. Takes about 40 seconds to load, and when it does, the PDF displays correctly for me. Although, it is a bit slow to scroll through the file (likely due to the size of the file). 

@zarifahnaf, does this occur for you on safe mode? (Help > Restart in safe mode).

Also, here are some instructions on how to get a backtrace on Windows: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:_How_to_get_a_backtrace

----------------------

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 676e0527d2f31556eccae314fbb12ce204f02ec7
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 9 zarifahnaf 2023-10-28 06:53:19 UTC
(In reply to Kira Tubo from comment #8)
> I wasn't able to reproduce on Windows. Takes about 40 seconds to load, and
> when it does, the PDF displays correctly for me. Although, it is a bit slow
> to scroll through the file (likely due to the size of the file). 
> 
> @zarifahnaf, does this occur for you on safe mode? (Help > Restart in safe
> mode).
> 
> Also, here are some instructions on how to get a backtrace on Windows:
> https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:
> _How_to_get_a_backtrace
> 
> ----------------------
> 
> Version: 7.6.2.1 (X86_64) / LibreOffice Community
> Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
> CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL:
> win
> Locale: en-US (en_US); UI: en-US
> Calc: CL threaded
> 
> Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 676e0527d2f31556eccae314fbb12ce204f02ec7
> CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL:
> win
> Locale: en-US (en_US); UI: en-US
> Calc: CL threaded


Interestingly, No it does not crash in safe mode. I can scroll through and do everything
Comment 10 zarifahnaf 2023-10-28 06:53:38 UTC
Created attachment 190463 [details]
Windbg
Comment 11 zarifahnaf 2023-10-28 06:53:50 UTC
Created attachment 190464 [details]
procdump
Comment 12 zarifahnaf 2023-10-28 06:54:56 UTC
I have attached windbg and procdump,

ALthough i dont know what is causing this issue, running in safe mode does seem to render the pdf just fine.
Comment 13 zarifahnaf 2023-10-28 15:03:51 UTC
For anyone who wants a more permanent link : https://drive.google.com/file/d/1RuIqDHjbLtFKvPcwQ7ioHEcfwBckk7fM/view?usp=drive_link
Comment 14 Kira Tubo 2023-11-03 00:06:19 UTC
(In reply to zarifahnaf from comment #9)
 
> Interestingly, No it does not crash in safe mode. I can scroll through and
> do everything

Thanks for checking! Have you tried resetting your profile to see if it would fix the issue (be sure to create a backup of your profile first)? You can do this through the safe mode screen.  https://wiki.documentfoundation.org/UserProfile
Comment 15 zarifahnaf 2023-11-09 15:08:03 UTC
(In reply to Kira Tubo from comment #14)
> (In reply to zarifahnaf from comment #9)
>  

> Thanks for checking! Have you tried resetting your profile to see if it
> would fix the issue (be sure to create a backup of your profile first)? You
> can do this through the safe mode screen. 
> https://wiki.documentfoundation.org/UserProfile

Yep i did. 

On a side note:
I also noticed that the ram would be released by libreoffice when the freezing happens. ( if that helps in any way )
Comment 16 Steven Casey 2023-11-28 04:19:30 UTC
To add some more info to this report from some things I noticed while attempting a bibisect:

I get a "general input/output error" while attempting to bibisect using win32-5.0 repo and get an instant crash while using repo win32-6.1. I suspect this error has to do with 32bit vs 64bit memory constraints which is why this error doesn't happen in the 64bit versions. That is just a wild guess though.

It does open while using the win64-7.0 repo albeit pretty slow and jumping to 11GB RAM usage while loading on the master build. Weirdly enough, using the oldest build on win64-7.0 results in half the RAM being used when loading. Hitting a max of 5.5GB and usually sitting around 4.8GB on my system. The commit that causes it to double is commit 5dca5309207b6b3cd5bed68da47223e08a3ac3f8 (win64-7.0 repo) but I am definitely not comfortable formally blaming this commit as the cause, especially since this issue seems larger. Also, it looks like when using the win64-6.4 repo, the master and the oldest both have high RAM usage (~11GB) which leads me to believe the low memory usage in win64-7.0 was a coincidence or related to something else. Regardless, scrolling causes massive lag and RAM usage on all of the versions I have tested.

While opening on a newer version of LO I can observe LO using up to 15GB of RAM while opening the pdf which is worse than on the 7.0 master version. While scrolling I observed LO using a whopping 24GB of RAM before ultimately crashing. That is on this version:

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

My system is using 32GB RAM for all of these tests.

Hopefully someone with better bibisecting experience can pinpoint the cause and issue :)
Comment 17 Tex2002ans 2024-03-03 03:38:28 UTC
I was able to successfully load comment 13's PDF in:

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

I have 32 GBs of RAM in my system.

- - -

But there were some oddities.

While loading, LO Draw quickly took up to:

- ~15 GBs of RAM

After loading, Draw settled on:

- 4,588 MBs

Changing to page 2:

- 5,409 MBs (+821 MBs)

Changing to page 6:

- 7,104 MBs (+1,695 MBs)

Changing to page 8:

- 7,406 MBs (+302 MBs)

So it seems like there's some HUGE leaps in RAM usage:

- as the PDF is loading.
- as each page is clicked/loaded.

- - -

Opening up the same PDF in my normal PDF Reader hovered around:

SumatraPDF (v3.5.2)

- ~250 MBs of RAM

- - -

Note: Seems like this PDF has some extremely unoptimized, 1200 DPI, images from a scanner:

- 9,924 x 14,027 px each
Comment 18 zarifahnaf 2024-03-19 15:04:21 UTC
This statement about 1200DPI scan is actually true, as i scanned them using epson l3250's scanner