Bug 164045 - Writer crashes when moving a picture
Summary: Writer crashes when moving a picture
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.3.2 release
Hardware: x86-64 (AMD64) All
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2024-11-25 16:05 UTC by Wungsten
Modified: 2024-12-02 17:06 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Frozen startup (150.18 KB, image/png)
2024-11-25 16:13 UTC, Wungsten
Details
Test example (741.31 KB, application/Writer)
2024-11-25 17:10 UTC, Wungsten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wungsten 2024-11-25 16:05:22 UTC
Description:
It's always seemed difficult to move a picture in Writer. My technique is:
Cut (ctrl-X) the picture, sometimes I can only select the image, without the outer frame and caption.
Paste it at the new location.
Add a caption on the new location.
Go back to the old location in order to delete the first caption.

At this point, the program crashes. The recovery does not 'get' the new picture location.

Steps to Reproduce:
1.Cut an image from a document and paste it in a different location
2.Add a caption to the new image
3.Attempt to delete the old caption, which was left behind when the image was cut.

Actual Results:
Crashed instantly. Crash report at https://crashreport.libreoffice.org/stats/crash_details/5642c9e5-b2e0-4a96-a3e7-87a483d88599 and others.

Expected Results:
Old caption deleted and the space reclaimed (i.e. text moves into the vacated space).


Reproducible: Always


User Profile Reset: No

Additional Info:
1. Not crash
2. Easier way of rearranging pictures
3. I would like to propose an 'intelligent anchor option'. By this I mean something to avoid this problem:

If I anchor a figure to the page, then add more text, the picture 'moves away' from the relevant text. If I use anchor to paragraph or character, I may get half a page of empty space, where the pagination moves it close to a page boundary. Intelligent anchoring would still allow the text to flow naturally
Comment 1 Wungsten 2024-11-25 16:13:04 UTC
Created attachment 197786 [details]
Frozen startup

Now my system is unusable. The recovery has frozen on the splash screen.
Comment 2 Buovjaga 2024-11-25 16:33:50 UTC
Not reproduced. So can you reproduce this even by trying from scratch or does this happen with a specific document only? If specific, would be good to have an example file.

Arch Linux 64-bit
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
24.8.3-1
Calc: threaded

Arch Linux 64-bit
Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: afa42fcd26d9d8677b246fcc4485a11c50d5d67d
CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 25 November 2024
Comment 3 Wungsten 2024-11-25 17:10:42 UTC
Created attachment 197788 [details]
Test example

I agree, the situation is not entirely reproduceable, but this example shows something is wrong. I created a 9-page document, with a few images. I successfully moved an image to a different page, but when I deleted the first caption, I was left with a big, blank space. There is a paragraph mark that I cannot select, delete, or move past with the arrow keys.

The document I have trouble with is rather large: 81 MB, 237 pages, 106,000 words and 55 photographs. I am frequently adding to it.

Can you access the crash reports? I have submitted several today.
Comment 4 Wungsten 2024-11-25 20:32:08 UTC
I've made some progress with my test case. The blank space is due to the presence of a frame. The frame is difficult to locate - you have to click on EXACTLY the right pR. I can't work out how to define the right space, it seems to vary each time. Toggling formatting marks does not help.Arrows or ctrl-Arrow just skips over it.

If I could locate the 'outer' frame (i.e. the one that contains the image and the caption), I could maybe move them both together.
Comment 5 Wungsten 2024-11-25 20:45:26 UTC
Correcting previous comment.

I've made some progress with my test case. The blank space is due to the presence of a frame. The frame is difficult to locate - you have to click on EXACTLY the right part of the page. I can't work out how to define the right space, it seems to vary each time. Toggling formatting marks does not help. Arrows or ctrl-Arrow just skip over it.

If I could reliably locate the 'outer' frame (i.e. the one that contains the image and the caption), I could maybe move them both together. I have experimented with items on the View menu, but nothing helped.

Is there a way to always display frame boundaries?

I now believe my original crashes occurred when I deleted the last character from inside a frame. Unfortunately, this is not reproduceable in a smaller document.
Comment 6 m_a_riosv 2024-11-26 05:32:35 UTC
Please test in safe mode, Menu/Help/Restart in Safe Mode
Comment 7 Buovjaga 2024-11-26 05:48:15 UTC
(In reply to Wungsten from comment #5)
> Correcting previous comment.
> 
> I've made some progress with my test case. The blank space is due to the
> presence of a frame. The frame is difficult to locate - you have to click on
> EXACTLY the right part of the page. I can't work out how to define the right
> space, it seems to vary each time. Toggling formatting marks does not help.
> Arrows or ctrl-Arrow just skip over it.
> 
> If I could reliably locate the 'outer' frame (i.e. the one that contains the
> image and the caption), I could maybe move them both together. I have
> experimented with items on the View menu, but nothing helped.
> 
> Is there a way to always display frame boundaries?

In 24.8, View - Text Boundaries. In 25.2, View - Boundaries.

You can easily select the invisible frame by opening the Sidebar Navigator deck and double-clicking Frame2.
Comment 8 BogdanB 2024-11-26 05:53:24 UTC
I tried exactly the same, with the image pasted before the cut image, after the cut image. I could not reproduce. Deleting the caption is not a problem.

Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 9 Wungsten 2024-11-26 12:39:06 UTC
I've encountered further crashes, this time trying to add a Table of Figures.

It happens as soon as I click Table of Contents, Index or Bibliography on the Insert Menu → Table of Contents and Index. I have encountered the crash on my original document, the test version I uploaded and even on an 'empty' document (which is not strictly empty because my template includes a title).

This is after using safe mode to repair my profile - restore user configuration and restore state of extensions.

See https://crashreport.libreoffice.org/stats/crash_details/5d9f648f-28e6-4893-92e2-5840f9d38850vfor a crash report.
Comment 10 BogdanB 2024-11-26 12:46:13 UTC
This is the crash report exact address:
https://crashreport.libreoffice.org/stats/crash_details/5d9f648f-28e6-4893-92e2-5840f9d38850
Comment 11 Andrea Jovani 2024-11-28 14:57:23 UTC
Reproduced: 
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded
Comment 12 Buovjaga 2024-11-28 15:32:10 UTC
(In reply to Andrea Jovani from comment #11)
> Reproduced: 
> Version: 24.8.3.2 (X86_64) / LibreOffice Community
> Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
> CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 22631); UI render:
> Skia/Raster; VCL: win
> Locale: it-IT (it_IT); UI: it-IT
> Calc: CL threaded

Is this for comment 0 or comment 9? I can not reproduce comment 9 with 24.8.3 on Linux or Windows. In any case comment 9 should be reported separately.
Comment 13 Telesto 2024-11-28 19:17:13 UTC
@Buovjaga
Why is this bug set to new & high priority? There are no exact steps (or screencast showing what to do).
Comment 14 Buovjaga 2024-11-28 20:00:21 UTC
(In reply to Telesto from comment #13)
> @Buovjaga
> Why is this bug set to new & high priority? There are no exact steps (or
> screencast showing what to do).

Because we have someone who reproduces and we *do* have a crash report. Let's try to work with the ones who can reproduce and maybe lure them into doing a bisect.
Comment 15 Telesto 2024-11-29 08:08:29 UTC
(In reply to BogdanB from comment #10)
> This is the crash report exact address:
> https://crashreport.libreoffice.org/stats/crash_details/5d9f648f-28e6-4893-
> 92e2-5840f9d38850

Crash reporter shows another related bug report: bug 163933; being a duplicate of bug 163325
Comment 16 Buovjaga 2024-12-01 17:29:34 UTC
Could everyone affected please test with a daily build: https://dev-builds.libreoffice.org/daily/master/current.html

On Linux the debug build Linux-rpm_deb-x86_64@tb99-TDF-dbg should be easy to unpack and run.
Comment 17 Wungsten 2024-12-02 15:01:28 UTC
I have tested LibreOfficeDev_25.2.0.0.alpha1_Linux_x86-64_deb with the following observations:

Insert table of figures works

Move an image works with a problem – click on the image, ctrl-C or ctrl-X then ctrl-V. But the image properties are changed (altering the size and alignment), so it is unusable for moving an image. This only applies moving the image only – moving the outer frame seems OK.

Ctrl-X does not work properly, it copies, not cuts. Does not seem reproduceable.

I still cannot select the outer frame (image+caption) with the mouse. I need to use the Navigator, but it is not obvious which frame number is the one I want. I did notice that hovering or selecting a frame causes the corresponding image to change colour – is this deliberate? It’s clever, and very handy, once I got used to it.

The context menu for an image allows the image name to be shown (right click → Properties → Options). I would like similar for a frame.

View → Boundaries helps see the frame edge, but does not help in selecting it.
Comment 18 Buovjaga 2024-12-02 17:06:40 UTC
(In reply to Wungsten from comment #17)
> I still cannot select the outer frame (image+caption) with the mouse. I need
> to use the Navigator, but it is not obvious which frame number is the one I
> want. I did notice that hovering or selecting a frame causes the
> corresponding image to change colour – is this deliberate? It’s clever, and
> very handy, once I got used to it.

Yes, it is a deliberate handy feature thanks to volunteer Jim Raykowsi :) Added in bug 152029

Note that you can name your frames in the Options tab of frame properties dialog.