Bug 165658 - Data Provider: freeze when unable to import CSV file
Summary: Data Provider: freeze when unable to import CSV file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: Data-Provider
  Show dependency treegraph
 
Reported: 2025-03-09 23:10 UTC by Rafael Lima
Modified: 2025-03-31 12:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
CSV file where the freeze happens (759 bytes, text/csv)
2025-03-09 23:10 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2025-03-09 23:10:12 UTC
Created attachment 199713 [details]
CSV file where the freeze happens

When the Data Provider fails to import a CSV file, it freezes instead of showing an error message to the user.

Steps to reproduce:
1) Open the Data Provider dialog
2) Select CSV in "Data Format"
3) Click "Browse" and select the file attached to this bug
4) Click "Apply"
5) Freeze

Note that in the terminal, we get the following exception:

terminate called after throwing an instance of 'orcus::parse_error'
  what():  expected a delimiter (offset=9)

We should be able to detect such exceptions and show an error message to the user instead of letting Calc freeze.

Note 1: This file is generated by a Time Study app used in industrial applications.

Note 2: This CSV file is valid; it should not have caused any freeze in the first place. I guess it is because of the quotes used in strings.

System info

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 81cbe4a2cb19dd2b552d83772075267cc64c3f01
CPU threads: 16; OS: Linux 6.11; UI render: default; VCL: kf6 (cairo+wayland)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 1 m_a_riosv 2025-03-09 23:24:29 UTC
For me crash (LO is closed)
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 894563ee0e4032019623a97c313af3d833863b1f
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (es_ES); UI: en-GB
Calc: CL threaded
Comment 2 Rafael Lima 2025-03-11 18:28:03 UTC
Proposed patch here:
https://gerrit.libreoffice.org/c/core/+/182791
Comment 3 Commit Notification 2025-03-28 07:40:42 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6b5d160e836772e2ebb536da10329c1d29eb4a0b

tdf#165658 Data Provider: Catch exception when importing CSV

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.