Bug 153818 - Removed tables reappear after loading of document
Summary: Removed tables reappear after loading of document
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard:
Keywords:
: 154195 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-25 12:09 UTC by Marcin Juszkiewicz
Modified: 2023-03-21 12:53 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Page when I save document (content masked) (64.85 KB, image/jpeg)
2023-02-25 12:09 UTC, Marcin Juszkiewicz
Details
Same page when I load document after saving (content masked) (60.04 KB, image/jpeg)
2023-02-25 12:10 UTC, Marcin Juszkiewicz
Details
Document to reproduce bugs 153818, 153816, 153817 (192.28 KB, application/vnd.oasis.opendocument.text)
2023-02-27 09:56 UTC, Marcin Juszkiewicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Juszkiewicz 2023-02-25 12:09:55 UTC
Created attachment 185580 [details]
Page when I save document (content masked)

I have 25 tables in document, remove one of them, save document. Then I quit LO Writer.

Next time I load document I have to scroll through whole document and check did any table reappeared in document. As EMPTY one. 

Then I have to remove them. And check whole document layout again.

And repeat on each document load. Or copy/paste everything to fresh one.
Comment 1 Marcin Juszkiewicz 2023-02-25 12:10:22 UTC
Created attachment 185581 [details]
Same page when I load document after saving (content masked)
Comment 2 Marcin Juszkiewicz 2023-02-25 12:14:51 UTC
I have spent half a day on copying text from one file to another just to have document without removed tables.

And then had to remove one. Which made my attempt to have working file worthless.
Comment 3 Buovjaga 2023-02-25 12:34:46 UTC
Please attach an example document.
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 4 Roman Kuznetsov 2023-02-25 12:42:54 UTC
Please provide every step how did you delete your table?

Like

1. Select all table using icon on the Table toolbar
2. Press Delete key on the keyboard

or

1. Select all table using holded Shift key and cursor keys on the keyboard
2. Delete table using icon on the Table toolbar
Comment 5 Marcin Juszkiewicz 2023-02-25 13:04:25 UTC
(In reply to Roman Kuznetsov from comment #4)
> Please provide every step how did you delete your table?
> 
> Like
> 
> 1. Select all table using icon on the Table toolbar
> 2. Press Delete key on the keyboard
> 
> or
> 
> 1. Select all table using holded Shift key and cursor keys on the keyboard
> 2. Delete table using icon on the Table toolbar

LMB click on table, RMB to open context menu, Remove->Table option clears table, second Remove->Table removes it.
Comment 6 Marcin Juszkiewicz 2023-02-25 13:05:20 UTC
(In reply to Buovjaga from comment #3)
> Please attach an example document.
> Set to NEEDINFO.
> Change back to UNCONFIRMED after you have provided the document.

Sanitized version of document does not reproduce. I suspect that my bugs are connected with changes tracking enabled.
Comment 7 QA Administrators 2023-02-26 03:21:41 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2023-02-26 07:51:05 UTC
László has been making many fixes and improvements to change tracking regularly, so would be interesting to hear, if you reproduce the problem with the latest unstable https://dev-builds.libreoffice.org/daily/master/current.html

If the bug still exists, then the next step would be to check, if a code change causing it can be found: https://wiki.documentfoundation.org/QA/Bibisect
Unfortunately it can take dozens of gigabytes of disk space in order to investigate.

I am available for helping with the process via screensharing.
Comment 9 Marcin Juszkiewicz 2023-02-27 09:56:19 UTC
Created attachment 185602 [details]
Document to reproduce bugs 153818, 153816, 153817

This document reproduces bugs #153816, #153817, #153818

Information how it was created are inside of document. Changes tracking is enabled so you can check how it went.
Comment 10 Marcin Juszkiewicz 2023-02-27 17:30:52 UTC
sorry, forgot to unmark NEEDINFO
Comment 11 Buovjaga 2023-02-27 18:15:35 UTC
(In reply to Marcin Juszkiewicz from comment #9)
> Created attachment 185602 [details]
> Document to reproduce bugs 153818, 153816, 153817
> 
> This document reproduces bugs #153816, #153817, #153818
> 
> Information how it was created are inside of document. Changes tracking is
> enabled so you can check how it went.

What I'm seeing in this document currently is that

- If I delete the first table, it is not deleted completely, but it leaves behind one row and I have to delete again
- After saving and reloading, the table does not reappear. However, it is shown in the Navigator.

This change of behaviour happened in 7.4 with 794fd10af7361d5a64a0f8bfbe5c8b5f308617a5, tdf#147347 sw: hide deleted table at deletion in Hide Changes. The previous commit crashes when trying to delete the remainder of the first table. I had to do lots of 'git bisect skip' due to this and a state, where it refused to delete it at all. I finally looked at the results of 'git bisect visualize' and did a range query in cgit.freedesktop.org and eyeballed interesting commits (from about 150 commits).

Let's ask László what he thinks. I won't change the status as I'm unsure of what is going on here.
Comment 12 Stéphane Guillou (stragu) 2023-03-15 09:54:14 UTC
*** Bug 154195 has been marked as a duplicate of this bug. ***
Comment 13 László Németh 2023-03-21 12:53:52 UTC
The problem, which resulted by the transition to tracked table and table row deletion and insertion, fixed in the newer versions.

A workaround for the affected versions is to disable change tracking temporarily during table deletion.

I will check the last 7.4 bug fix release, which are the remaining problems there.