Bug 124948 - Calc EDITING: Frequent "Fatal Error: Invalid child index" while editing long multi-line comments in cells crashing LibreOffice Calc
Summary: Calc EDITING: Frequent "Fatal Error: Invalid child index" while editing long ...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All Mac OS X (All)
: medium normal
Assignee: Not Assigned
: 124949 (view as bug list)
Depends on:
Reported: 2019-04-25 09:37 UTC by t0rt1e
Modified: 2019-08-14 10:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Anonymised generic grades table as test case (15.90 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-05-10 12:17 UTC, t0rt1e

Note You need to log in before you can comment on or make changes to this bug.
Description t0rt1e 2019-04-25 09:37:51 UTC
I have a table in a LibreOffice Calc document, which calculates the final grade and some statistics for student projects of a course I give. Besides the points, there is a column for comments, in which I note down my observations of the work of the individual groups. Each cell in the column holds typically a multi-line text, where the first character of each line is either '+' (positive), '-' (negative), or '*' (neutral) followed by a short note text. I enter this text live during the project presentation so that the current cell is in mode editing for several minutes. This has been working fine for me since 2015 and LibreOffice Calc would run reliably without crashes as far as I can remember.

Since LibreOffice, I am observing frequent crashes (approx. 3 to 5 times per 90 minute session) while editing these multi-line comments. The comment cells have no particular assigned cell format. However, it may be relevant for the bug to trigger, that I copy the multi-line comment using a formula to other lines of the comment column using a cell formula, e.g., "=G6". The error message preceding the crash is always the same "Fatal Error: Invalid child index". After confirming it, LibreOffice Calc crashes and needs to be restarted. The file recovery succeeded so far each time, however entered comments were losts: at least the one I was actively editing and sometimes also previously edited comments (depending on the last moment of saving the document).

So far, I was able to reproduce this error on LibreOffice as well as, which were always running on macOS High Sierra 10.13.16 of a MacBook Pro 15 inch 2017 model.

Steps to Reproduce:
1. Repeatedly edit multi-line comments, where the lines start with '+', '-', or '*'
2. Have these comments copied to other cells using a cell formula, e.g., "=G6"
3. Don't assign any particular cell format such as "Text"

Actual Results:
Application crashes while editing multi-line comments containing characters, which may be treated as mathematical operators

Expected Results:
Application does not crash due to editing multi-line comments containing characters, which may be treated as mathematical operators

Reproducible: Always

User Profile Reset: No

Additional Info:
Build-ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d
CPU-Threads: 8; BS: Mac OS X 10.13.6; UI-Render: Standard; VCL: osx; 
Gebietsschema: de-CH (de_CH.UTF-8); UI-Sprache: de-DE
Calc: threaded
Comment 1 Xisco Faulí 2019-04-25 10:05:22 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(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.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 Julien Nabet 2019-04-25 12:44:28 UTC
*** Bug 124949 has been marked as a duplicate of this bug. ***
Comment 3 t0rt1e 2019-05-10 12:17:44 UTC
Created attachment 151291 [details]
Anonymised generic grades table as test case

Sorry, that it took so long to provide the requested test case. I just now managed to find some time to anonymise fully the grades table. I observed the repeated crashes of Libreoffice Calc while editing the cells in the "Feedback" column of table "Project". Thanks you for looking into this bug report! I hope that you can localise and fix the source of the crashes!
Comment 4 Xisco Faulí 2019-08-14 10:17:44 UTC
Thanks for providing the file.
So, how do you reproduce the crash? You double click on many cells in column P until it crashes ?
Comment 5 t0rt1e 2019-08-14 10:34:13 UTC
The crash happens while editing the feedback comments entered into the cells of column P. I do this primarily using the keyboard (F2, arrow keys, various editing shortcuts, CMD-Return to enter a newline in the cell, etc.). I hardly use the mouse / touchpad for navigating the table. I was not able to narrow the crashes to a particular sequence of key strokes. However, it happens very frequently for me while repeatedly adding/editing the multi-line comments, where the lines start with '+', '-', or '*'. As I do write down the comments during the project presentation and evaluation of its report, editing a cell may take several minutes. To reduce the risk of loosing notes, I try to remember to save the cell entry frequently by pushing Return after entering a longer sequence of notes. Sometimes, I save the whole document at this moment and other times, I will simply continue adding notes to a cell by pressing F2 again.