Bug 152333 - Crash opening saved spreadsheet which was modified with macro
Summary: Crash opening saved spreadsheet which was modified with macro
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2022-12-01 06:11 UTC by Jim Avera
Modified: 2024-01-21 06:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["void rtl::str::release<_rtl_uString>(_rtl_uString*)"]


Attachments
Spredsheet needed to reproduce bug (t.ods) (83.03 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-12-01 06:12 UTC, Jim Avera
Details
tickers.csv data file which MUST be in /tmp to reproduce the bug (723 bytes, text/csv)
2022-12-01 06:12 UTC, Jim Avera
Details
gdbtrace.log from new hang (see comment #4) (10.13 KB, text/x-log)
2022-12-16 19:01 UTC, Jim Avera
Details
strace.log from new hang (see comment #4) (7.09 MB, text/x-log)
2022-12-16 19:01 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2022-12-01 06:11:03 UTC
Description:
A specific sequence of operations results in a Crash dialog when LO is started again after saving a spreadsheet and exiting.   The problem seems to depend on the details of how the spreadsheet was modified before it was saved (the modification happens in Basic macros which delete and re-create a sheet).

No crash report opens after I click "Send Crash Report".  This might be a problem where LO can not make my browser open the crash report page.  While I am using a non-standard browser (firefox-esr) I think I have configured my desktop system to use it correctly: The command "xdg-open <url>" works.  

FWIW I'm running xubuntu 22.04.1 LTS; the desktop uses xfce, not gnome.

STEPS TO REPRODUCE:

1. Download both the "t.ods" and "tickers.csv" files and place them in the /tmp directory (tickers.csv *must* be in /tmp -- the test macro is hard-coded to look for /tmp/*.csv)

Note: Macro security should be set to "Medium" (prompt each time).

2. /path/to/lo t.ods
   Enable macros when prompted.

3. Click the yellow "Reload csv" button
   (the tickers.csv file *must* be in /tmp and no other .csv files in /tmp)

4. File->Save
5. File->Exit

6. /path/to/lo t.ods
(crash dialog appears)

Note: After clicking through the crash dialogs the spreadsheet opens anyway, so this is odd.

Steps to Reproduce:
.

Actual Results:
.

Expected Results:
.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
I did delete $HOME/.config/libreoffice/r/user which is supposed to have profile data (the 'util' directory never re-appeared, so I suspect dev builds store profile somewhere else).   I also entered "safe" mode and did "reset to defaults".
Comment 1 Jim Avera 2022-12-01 06:12:04 UTC
Created attachment 183931 [details]
Spredsheet needed to reproduce bug (t.ods)
Comment 2 Jim Avera 2022-12-01 06:12:39 UTC
Created attachment 183932 [details]
tickers.csv data file which MUST be in /tmp to reproduce the bug
Comment 3 Jim Avera 2022-12-01 06:18:19 UTC
Is the crash dialog supposed to display a "crash signature"?  It did not seem to show anything specific.  The second "Crash Report" window only shows this:

<<Please check the report and if no bug report is connected to the crash report yet, open a new bug report at bugs.documentfoundation.org.
Add detailed instructions on how to reproduce the crash and the shown crash ID into the crash report field.
Thank you for your help in improving LibreOfficeDev.>>

---

Also: The crash only occurs the *first* time LO is started after the spreadsheet is saved.  After clicking through the crash dialog and exiting LO, a subsequent start does not cause a crash.

It is necessary to click the yellow "Reload csv" button and do Save + Exit, then start again to see another crash.
Comment 4 Jim Avera 2022-12-16 18:59:41 UTC
I downloaded today's "master" build and it always hangs at exit, with a thread blocked in futex_wait.  I'll attach backtrace and strace logs.  \

Until this is worked out it's hard to investigate the earlier problem.

STEPS TO REPRODUCE HANG:

$ /path/to/instdir/program/soffice   # no arguments
File->Exit
(hangs)

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4e4a31ac7d920c71e26ca4acd18c11ec2bd015bb
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Jim Avera 2022-12-16 19:01:02 UTC
Created attachment 184196 [details]
gdbtrace.log from new hang (see comment #4)
Comment 6 Jim Avera 2022-12-16 19:01:39 UTC
Created attachment 184197 [details]
strace.log from new hang (see comment #4)
Comment 7 Buovjaga 2023-03-09 12:53:31 UTC
(In reply to Jim Avera from comment #0)
> 3. Click the yellow "Reload csv" button
>    (the tickers.csv file *must* be in /tmp and no other .csv files in /tmp)

I get

Inadmissible value or data type.
Data type mismatch.

Pointing to line 429 in LoadCSV

dim BidVal as double : BidVal = CDbl(bid)

and specifically highlighting: BidVal = CDbl(bid)
Comment 8 Stéphane Guillou (stragu) 2023-10-25 10:03:33 UTC
(In reply to Buovjaga from comment #7)
> I get
> 
> Inadmissible value or data type.
> Data type mismatch.

Same, but it points to line 259 for me, in Standard > Functions > NICKELDIME:

    OptionExpDt = Left(Expiry,3) & " " & Mid(Expiry,4,2) & ", 20" & Mid(Expiry,7,2)

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

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

(In reply to Jim Avera from comment #3)
> Is the crash dialog supposed to display a "crash signature"?  It did not
> seem to show anything specific.

If you are using a daily build, the dialog does not send crash reports.
Can you please re-test with a release, e.g. 7.6.2.1, which would allow you to end one?
Comment 9 Jim Avera 2024-01-20 22:48:25 UTC
Hi, Best wishes for the new year!   I re-ran the demo using 7.6.2.1 per Stéphane's request.  No hangs.  After clicking yellow button, save, exit, restart, the crash dialog appeared and I could send a Crash Report.  
The URL it showed was

https://crashreport.libreoffice.org/stats/crash_details/acc00046-4f7a-4b44-8f47-08586d4368a1

which shows a SEGV fault in some hash table code.

---

BTW, when I clicked the "Reload CSV" (yellow button) to run the macro, the terminal displayed:

** (soffice:146163): WARNING **: 14:39:52.134: Exception caught processing focus events

Note: The macro may well be buggy or the test data incorrect.  However user data should not be able to crash LO.
Comment 10 QA Administrators 2024-01-21 03:14:06 UTC Comment hidden (obsolete)