Description: When I try to create a table in Writer from a tabulation-separated text, and deselect the option "Equal width for all columns", LibreOffice crashes. Steps to Reproduce: 1. Open a new document 2. Create a new field by going to INSERT > FIELD > MORE FIELDS > Variables > Number Range ; enter "NumEx" in the "Name" field, then click "Insert" 3. Place cursor after the inserted number, press "Tab", enter some word, press "Tab", enter some word 4. Select the created text with the mouse 5. Chose TABLE > CONVERT > TEXT TO TABLE 6. In the pop-up menu, click "OK" Actual Results: LibreOffice crashes Expected Results: A table is created where each word is in a cell Reproducible: Always User Profile Reset: Yes Additional Info: In safe mode, if I deselect the "Equal width for all columns" option, LibreOffice does not crash. In normal mode, LibreOffice crashes only if the "Equal width for all columns" option is selected. Without the field variable, the table is created without any problem, and LibreOffice does not crash. Version: 7.4.7.2 / LibreOffice Community Build ID: 40(Build:2) CPU threads: 12; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb) Locale: de-DE (de_DE.UTF-8); UI: en-US 7.4.7-5 Calc: threaded
Created attachment 188430 [details] Minimal document to reproduce the bug To reproduce the bug: 1. Select the text with the mouse 2. TABLE > CONVERT > TEXT TO TABLE 3. Click OK
Just to be clear: LibreOffice Writer can crash in both safe and normal mode. The only difference is that in one condition, Writer crashes when "Equal width for all columns" is selected; in the other, Writer crashes when "Equal width for all columns" is DEselected.
Created attachment 188434 [details] gdb bt On pc Debian x86-64 with master sources updated today, I could reproduce this.
Michael: noticing 9dc6e2c9062725ef1f9d7e321cae5f4dbe8ca749 sw: fix expansion of SetGetExpField in headers with split table rows thought you might be interested in this one.
I got the crash report https://crashreport.libreoffice.org/stats/crash_details/b6ecde21-c74a-4367-937a-5d89c9df6ddb with: Version: 7.4.7.2 / LibreOffice Community Build ID: 723314e595e8007d3cf785c16538505a1c878ca5 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded The setting "Equal width for all columns" does not matter, I was able to reproduce regardless of it with: 1. open attachment 188430 [details] 2. Table > convert > text to table > OK 3. Ctrl + z 4. Table > convert > text to table > OK Also happens in: Version: 7.3.7.2 / LibreOffice Community Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Regression as not reproduced in: Version: 7.2.7.2 / LibreOffice Community Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.5$. Adding Cc: to Samuel Mehrbrodt ; Could you possibly take a look at this one? Thanks ae083ec6a3ce351a0fd8884d8c5e762ddd4b6c37 is the first bad commit commit ae083ec6a3ce351a0fd8884d8c5e762ddd4b6c37 Author: Jenkins Build User <tdf@pollux.tdf> Date: Mon Apr 3 08:28:14 2023 +0200 source c8e9df0b583e8a61a0570f72c0a476a5102f1fe9 148957: Always update fields when loading document | https://gerrit.libreoffice.org/c/core/+/148957
Thanks raal, but you bibisected to 7.5 when we could reproduce in 7.3. Which steps did you use?
(In reply to Stéphane Guillou (stragu) from comment #7) > Thanks raal, but you bibisected to 7.5 when we could reproduce in 7.3. > Which steps did you use? Steps from comment 1
Bibisected with comment 5 steps with linux-64-7.3 repo to first bad commit e22741875593ab5feeec486c916f03780e05ad81 which points to core commit 855e2af1bf6eb216d63ca7baeb9161c7cd501a42 which is a cherrypick of: commit 9dc6e2c9062725ef1f9d7e321cae5f4dbe8ca749 author Michael Stahl Tue Apr 05 18:27:35 2022 +0200 committer Michael Stahl Wed Apr 06 19:51:19 2022 +0200 sw: fix expansion of SetGetExpField in headers with split table rows Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132641 ... which confirms what Julien suspected in comment 4. Even quicker steps: 1. open attachment 188430 [details] 2. Ctrl + A 3. Table > convert > text to table > OK 4. Ctrl + Z 5. Ctrl + Y Michael, can you please have a look?
(In reply to Stéphane Guillou (stragu) from comment #9) > 1. open attachment 188430 [details] > 2. Ctrl + A > 3. Table > convert > text to table > OK > 4. Ctrl + Z > 5. Ctrl + Y > > Michael, can you please have a look? I had another look, and as raal mentioned already, 7.5, 7.6 and 24.2 now all crash on step 3. Thanks raal for that! I can confirm the start of that with the linux-64-7.5 repo to first bad commit ae083ec6a3ce351a0fd8884d8c5e762ddd4b6c37 which points to core commit c8e9df0b583e8a61a0570f72c0a476a5102f1fe9 which is a cherrypick of: commit c132a1abd57c109331191c3b3fbd14e1c5e46631 author Samuel Mehrbrodt Mon Mar 06 17:00:10 2023 +0100 committer Samuel Mehrbrodt Mon Mar 13 20:12:52 2023 +0000 Always update fields when loading document Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148355 Not sure if this should be reported separately. Michael and Samuel, can you please have a look? Happy to open a separate report if needed.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b5967157b37904219865fd847b20938b3ccfbd72 tdf#156348 sw: fix crash on converting text to table with SwSetExpField It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/a306549cd72c8a3d0435d08d81b1588c8bb7eb41 tdf#156348 sw: fix crash on converting text to table with SwSetExpField It will be available in 25.2.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/23d225dac8f717bea8e960e4c2130963db7f3920 tdf#156348 sw: fix crash on converting text to table with SwSetExpField It will be available in 24.8.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.