Bug 145546 - Crash in: libc-2.31.so (while using Zotero and with track changes enabled)
Summary: Crash in: libc-2.31.so (while using Zotero and with track changes enabled)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Track-Changes Crash
  Show dependency treegraph
 
Reported: 2021-11-05 02:24 UTC by Christopher J Poor
Modified: 2023-07-12 11:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["libc-2.31.so","SwXTextRange::SetPositions"]


Attachments
Crash backtrace log file (39.30 KB, text/plain)
2021-11-20 04:30 UTC, Christopher J Poor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher J Poor 2021-11-05 02:24:18 UTC
This bug was filed from the crash reporting server and is br-58ae3780-b204-4fec-96ff-e2e7abe86192.
=========================================
While
EDITING 
while using
Zotero Add Citation
Writer crashed and system froze.
Zotero version 5.0.97-beta.51+6206209ed

Upon reboot of system:
Recovery was about to FINISH and Writer crashed again.
The next Recovery completed successfully with no apparent loss of data.

Hence there are two crash reports:

https://crashreport.libreoffice.org/stats/crash_details/58ae3780-b204-4fec-96ff-e2e7abe86192
https://crashreport.libreoffice.org/stats/crash_details/7a0f4fc3-1697-4965-93d8-edefcf1af68a
Comment 1 Christopher J Poor 2021-11-20 04:30:05 UTC
Created attachment 176371 [details]
Crash backtrace log file

Sorry for the wall of text previously.
Backtrace log file attached.
Comment 2 Dieter 2021-11-20 08:48:15 UTC
I can't confirm it with

Version: 7.2.3.1 (x64) / LibreOffice Community
Build ID: 1d5dee817bde88d78dbcc0d00f88492568e131d5
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

and Zotero 5.0.93

My steps:
1. Open an new docment
2. Open Zotero toolbar
3. Presse "Add/Edit Citation" button
4. Add a citation

Actual result: No crash.

Christopher, please
a) Please try in SafeMode, if you haven't tried (Help -> Restart in SafeMode)
b) update to the latest version of LO
c) provide some detailed steps, if they are different from mine (if crash still appears in latest version)

Does this solve your problems? => NEEDINFO
Comment 3 Christopher J Poor 2021-11-21 04:31:30 UTC
Did you have "Track Changes" "Record" checked?

Did you try to add a citation in a footnote?

That is what the situation is when I get a crash.

I have installed 7.2.2.2 and it still crashes.

I will send you a backtrace.
Comment 4 Christopher J Poor 2021-11-21 04:43:42 UTC
Unfortunately, 7.2.2.2 crashes while trying to recover the document. I will try to install 7.1.7
Comment 5 Christopher J Poor 2021-11-21 05:36:21 UTC
7.1.7 does not crash on the first insertion but crashed on the second

Version: 7.1.7.2 / LibreOffice Community
Build ID: c6a4e3954236145e2acb0b65f68614365aeee33f
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-NZ (en_NZ.UTF-8); UI: en-US
Calc: threaded

This could not be reproduced in safe-mode because Zotero extension does not load in safe-mode.

In version 7.1.7.2 (which is the latest stable version) 

These are the steps:

(1) Load my document with approx. 700 footnotes and >1000 citations.
(2) Turn on Edit > Track changes > Record
(3) Click in citation in footnote (to add another citation to the footnote).
(4) Use Ctrl+A to insert citation from Zotero
(5) Choose citation and press Enter

LibreOffice crashes.

Crash report:
https://crashreport.libreoffice.org/stats/crash_details/7ab6f884-90a3-4670-b160-d698dab2bc8c

(6) Recover document
(7) Close LibreOffice
(8) run $libreoffice --backtrace
(9) Attempt to open document

LibreOffice crashes
No backtrace produced
 
(10) Run LibreOffice 7.0.6.2
(11) Check that Track changes > Record is on.
(12) Click in footnote with citation
(13) Click on Zotero buttone "Add/Edit citation"

LibreOffice crashes.
Comment 6 Dieter 2021-11-21 10:43:27 UTC
(In reply to Christopher J Poor from comment #5)

Thank you for detailed steps

> (1) Load my document with approx. 700 footnotes and >1000 citations.
Document is not attached. I can understand, if you don't want to share it in public. If you sent it to my in private, I will test
> (2) Turn on Edit > Track changes > Record
> (3) Click in citation in footnote (to add another citation to the footnote).
> (4) Use Ctrl+A to insert citation from Zotero
At least in Windows Ctrl+A selects the footnote. So I don't know how to insert an citation with this shortcut.


> (11) Check that Track changes > Record is on.
> (12) Click in footnote with citation
> (13) Click on Zotero buttone "Add/Edit citation"
> 
> LibreOffice crashes.
Can't confirm with a small document of mine. So problem might be related to Linux or to your specific document.
Comment 7 Christopher J Poor 2021-11-21 23:51:17 UTC
This is definitely to do with my document(s).
A new document created today has no problems but just one phrase (with a footnote) copied from an old document has this crash problem. Tested with 7.0, 7.1, 7.2.

I have emailed Dieter this problem document: Testdocument6.odt

One odd thing is that, after each crash, the Zotero integration stops working and I have to restart Zotero to get it going again.
Comment 8 Dieter 2021-11-22 07:38:07 UTC
Thank you for the document, but I still don't get a crash. If I undeerstand you secon email correct, it doesn't happen every time. So very strange. If it is not possible to use Zotero in Safode, you can also restart LO with a (temprary) new user profile as described here: https://wiki.documentfoundation.org/UserProfile I don't have further ideas but perhaps somebody else can help.
Comment 9 Christopher J Poor 2021-11-23 00:58:43 UTC
With the old document the crashes happen almost always.
The problem is with the old footnote citations. Adding extra citations to the footnote crashes LibreOffice.
It doesn't happen with a new footnote citation added to text copied from an old document and it almost never happens with footnote citations in a new document.
With track changes off there is no problem.
I will just leave it off for now.
Thanks for looking at the issue.
Comment 10 Christopher J Poor 2021-11-23 02:56:28 UTC
So sorry.

This seems to be a know issue with Zotero.

From their website:

While troubleshooting, disable the Track Changes feature in Word/LibreOffice, as it can have complicated effects when working with Zotero. If Track Changes is enabled when you insert or modify a Zotero citation, it may mark many or all of the Zotero citations in your document as changed or cause field codes to be displayed. On rare occasions, Track Changes may cause Zotero to think a citation is corrupted.
Comment 11 Dieter 2021-11-23 20:51:43 UTC
(In reply to Christopher J Poor from comment #10)
> So sorry.
> 
> This seems to be a know issue with Zotero.

But after reading the message I would say, it might also be a problem of LO, that it can't cope with trackes changes in a citation from Zotero. So let's keep bug report open.
Comment 12 Dieter 2023-02-07 06:05:45 UTC
Christopher, since your reported bug 145709 has been fixed meanwhile, could you please also retest this bug with LO 7.5 and Zotero 6? Thank you.

=> NEEDNFO
Comment 13 Stéphane Guillou (stragu) 2023-07-12 10:25:15 UTC
Looking at the crash stats, we had this signature last in 7.2.0.

https://crashreport.libreoffice.org/stats/signature/libc-2.31.so

I could get a crash with the same signature without Zotero:

1. Type the following in a new Writer document: _bbb_
2. Check that "Tools > AutoCorrect > AutoCorrect Options > Options > Automatic *bold* etc." is turned on (both M and T)
3. Tools > AutoCorrect > Apply and Edit changes

In:

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Crash report:
https://crashreport.libreoffice.org/stats/crash_details/d49879a7-17fb-4c76-b72b-5bdacc4f6661

But not anymore 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

Regarding Zotero, this might be relevant: https://github.com/zotero/zotero-libreoffice-integration/issues/63

I'm marking as "works for me" for now, but please reopen if you can still reproduce with the latest LO and Zotero versions.
Comment 14 Stéphane Guillou (stragu) 2023-07-12 11:33:45 UTC
The crash from comment 13 steps was resolved by Julien's:

commit ce01b5d4a81f1b407522dbdd831900bab8e9ef00
author	Julien Nabet <serval2412@yahoo.fr>	Sun Mar 07 10:22:56 2021 +0100
committer	László Németh <nemeth@numbertext.org>	Tue Mar 09 13:30:32 2021 +0100
Related tdf#140849: "Apply and Edit changes" from AutoCorrect crashes LO writer
Regression from da64ec8c8a91db6a6ec9657898f081d5ee67e739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112118

In the console when it crashes:

(soffice:476005): GLib-GObject-CRITICAL **: 13:07:32.797: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed

Noting that OP also had the crash signature "SwXTextRange::SetPositions" (I added it to the field) but we haven't seen that one since 7.2 either.