Bug 145283 - Impress crashes upon mouseclick + large zoom
Summary: Impress crashes upon mouseclick + large zoom
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-23 15:00 UTC by Mateusz Łącki
Modified: 2022-04-26 08:16 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
backtrace (101.14 KB, text/plain)
2021-10-23 15:01 UTC, Mateusz Łącki
Details
test file (131.20 KB, application/vnd.oasis.opendocument.presentation)
2021-12-02 22:33 UTC, Mateusz Łącki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Łącki 2021-10-23 15:00:32 UTC
Description:
I have an presentation where I have pasted a screenshot generated with Ubuntu 21.10 screenshot tool.  I am able to trigger a crash (3 times already), by zooming in to the figure (zoom level 750% will do - didn't test much other values). Then clicking on the pasted figure 2-5 times impress quits. 
I have captured the backtrace using the "coredumpctl gdb" tool.

Turning off "use hardware acceleration if available" changes nothing.
I have restarted in safe mode, clicked both fields in "restoore to factory settings" - changes nothing.


Steps to Reproduce:
1. Paste figure from screenshot tool
2. Apply 750% zoom (at this maginification single pixels clearly visible and large)
3. Click on the figure a few times, trying to drag it.

Actual Results:
Impress Crashes

Expected Results:
Figure moved


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:


Version: 7.2.2.2 / LibreOffice Community
Build ID: 20(Build:2)
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.2.2-0ubuntu0.21.10.1
Calc: threaded
Comment 1 Mateusz Łącki 2021-10-23 15:01:35 UTC
Created attachment 175888 [details]
backtrace

this is gdb backtrace with libreoffice-*-dbgsym installed
Comment 2 Akshit 2021-11-16 05:11:34 UTC
Hello Mateusz Łącki,

I'm on the exact same distro but following your steps did not result in a crash for me. 
Perhaps a sample document with this issue present might help.

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 3 Mateusz Łącki 2021-12-02 22:33:23 UTC
Created attachment 176660 [details]
test file
Comment 4 Mateusz Łącki 2021-12-02 22:38:23 UTC
I have attached the test file. To trigger the crash one has to zoom in (maximal zoom selectable by mouse wheel is sufficient) to make the figure visible almost at pixel-level (the pixels will be blurred and ugly), then one should click a few times  4-6 times in rapid succession, slightly moving the mouse and dragging the picture.

I am not sure if this is relevant:  I am using multi-monitor setup with fractional scaling turned on, as one monitor is 4K, and two are 1920x1200, I am using nvidia graphics driver (newest available in Ubuntu: 495.44).

My current version: 

Version: 7.2.3.2 / LibreOffice Community
Build ID: 20(Build:2)
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.2.3-0ubuntu0.21.10.1
Calc: threaded
Comment 5 Mateusz Łącki 2021-12-02 23:00:57 UTC
My graphics card it Nvidia GTX 970
I have changed the video driver to nouveau, and the issue no longer appears.
I then went back to nvidia drivers version 470, and the issue reappeared.

I did all that, as right before answering I was trying to repeat the reported issue once again. I succeeded, but one of the attempts killed not only impress but entire xorg  (with no backtrace, as the xorg crash, again triggered by mouseclicking on the presentation enters the nvidia code for which there are no debug symbols).

But it was a single occurrence, since the all the times the crash was in libreoffice.
Comment 6 Caolán McNamara 2022-04-26 08:16:33 UTC
The backtrace has SvpSalVirtualDevice::CreateSurface nNewDX=16494, nNewDY=16638 and goes on to call INT_cairo_surface_create_similar_image width=32988, height=33276, so hidpi with a 200% scale.

32988 is > SHRT_MAX (which is a limit causing trouble with X pixbufs in the past). But its not crashing in LibreOffice itself. I think this one should go to the distro/vendor to at least not crash in the system cairo under this circumstance and fail more gracefully to return a failure instead.

I could imagine that using cairo_surface_create_similar_image instead of cairo_surface_create_similar for large images might avoid this crash, but doing it blindly without being able to reproduce probably just push the crash around a bit.

I suggest to try reporting this against your distro.