Created attachment 63250 [details] Crasher This bug is not 100% reproducible so you may have to try multiple times. To reproduce: 1. Open crash.ods 2. Modify a cell from the second row in table 1. 3. Save.
What is happening ? According to our investigation, saving a Calc file is done in two steps: 1. For each table, if the table has not been modified, the previous save of the "Styles" of the table is used, else the new "Styles" are computed. 2. For each table, if the table has not been modified, the previous save of the "Content" is used else the new "Content" is computed. Whit track-changes enabled, the content is computed by replaying all the changes. It seems that, in some case, replying the file to compute the "content" may be interpreted as "content has changed". But if the table was not modified, "Styles" were not computed but instead copied from the last save. This means that an inconsistency between Styles and Content appear and lead to a crash. A straightforward solution would be to not allow the direct copy optimisation when track-change is enabled.
Created attachment 63261 [details] Patch disallowing usage of stream copy when "Changes Record" is enabled > A straightforward solution would be to not allow the direct copy optimisation > when track-change is enabled. This is short patch is an implementation of this, and is enough to prevent the bug. I'm not sure it's 100% correct though, as I'm not much familiar with this part of the code.
Good catch :-) I could reproduce, and with the patch it seems fixed. The change track replay modifying the document during save in between is awkward.. but as things are the patch is a reasonable workaround.
Pierre-Eric Pelloux-Prayer committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d212cbd96e648c10d875161b8ab1fc67ae509bd7 fdo#51249 Disable stream copy when saving a file with 'Changes Record' active
Pierre-Eric Pelloux-Prayer committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d62646cf5509b45e664b21fd7896ff9dc2f83b82&g=libreoffice-3-6 fdo#51249 Disable stream copy when saving a file with 'Changes Record' active It will be available in LibreOffice 3.6.
Pierre-Eric Pelloux-Prayer committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=17c85c9a5c447f9db6f3b91e6840709df8542345&g=libreoffice-3-5 fdo#51249 Disable stream copy when saving a file with 'Changes Record' active It will be available in LibreOffice 3.5.6.
Pierre-Eric Pelloux-Prayer committed a patch related to this issue. It has been pushed to "libreoffice-3-5-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3e6d34e4afa67d01a40804e93b6d3f94b09dcc5e&g=libreoffice-3-5-5 fdo#51249 Disable stream copy when saving a file with 'Changes Record' active It will be available already in LibreOffice 3.5.5.