Bug 157650 - Unhelpful (almost to the point of being useless) error when XML in content.xml is malformed
Summary: Unhelpful (almost to the point of being useless) error when XML in content.xm...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Error-Messages
  Show dependency treegraph
 
Reported: 2023-10-07 02:50 UTC by Jambunathan K
Modified: 2023-10-09 20:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
This ODS file has malformed content.xml (23.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-10-07 02:50 UTC, Jambunathan K
Details
Error reported by LO 24.2 when the malformed ODS will opened (66.05 KB, image/png)
2023-10-07 02:51 UTC, Jambunathan K
Details
Screenshot of what Emacs' XML parser / validator does ... Compare this with what LO does (264.80 KB, image/png)
2023-10-07 03:00 UTC, Jambunathan K
Details
Screnshoot with the message v 24.02 (16.04 KB, image/png)
2023-10-07 13:55 UTC, m_a_riosv
Details
lo 7.6 screenshot (Good) (22.73 KB, image/png)
2023-10-08 02:05 UTC, Jambunathan K
Details
lo 7.5 screenshot (Good) (21.94 KB, image/png)
2023-10-08 02:06 UTC, Jambunathan K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jambunathan K 2023-10-07 02:50:35 UTC
Created attachment 190075 [details]
This ODS file has malformed content.xml

Open the attacehd ODS file ...

ODS file has malformed XML ... and on open LO reports an unhelpful (almost to the point of being useless)

Please assess if the error report could be improved ... See screenshot for comments.

You either report line and colnames at which error happens, or if the input XML file is totally pathetic, just say malformed content.xml or some such thing.

I don't want to see what looks like variable names in your C or C++ code.  (That is what the error report sounds like)



Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2a217a80bf383ddab0a5e0959ab2fd907dfd3406
CPU threads: 4; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded
Comment 1 Jambunathan K 2023-10-07 02:51:50 UTC
Created attachment 190076 [details]
Error reported by LO 24.2 when the malformed ODS will opened
Comment 2 Jambunathan K 2023-10-07 03:00:54 UTC
Created attachment 190077 [details]
Screenshot of what Emacs' XML parser / validator does ... Compare this with what LO does
Comment 3 m_a_riosv 2023-10-07 13:55:24 UTC
Created attachment 190082 [details]
Screnshoot with the message v 24.02

For me, it shows the number line/row.
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9eb419b0b0f019f5fbc48ff1a11977e8b041edee
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo

There is the ODF validator, that shows a bit more information.
https://odfvalidator.org/
Comment 4 Jambunathan K 2023-10-08 02:03:35 UTC
(In reply to m.a.riosv from comment #3)
> Created attachment 190082 [details]
> Screnshoot with the message v 24.02
> 
> For me, it shows the number line/row.
> Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 9eb419b0b0f019f5fbc48ff1a11977e8b041edee
> CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL:
> win
> Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
> 
> There is the ODF validator, that shows a bit more information.
> https://odfvalidator.org/



I don't have a windows machine.  So, I can't confirm with Windows.


On linux side, I have mutiple builds installed, and I confirm that there 
this is a regression between 2 builds 4bcf6d9c905e7b5558ee8d9f7f616ce61eadb8f8 (ok) and  2a217a80bf383ddab0a5e0959ab2fd907dfd3406 (not ok)

Should be easy to spot the offending commit with simple change log tracking or bisection ....


Doesn't work with 

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2a217a80bf383ddab0a5e0959ab2fd907dfd3406
CPU threads: 4; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded


Works with the following two versions of LO

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4bcf6d9c905e7b5558ee8d9f7f616ce61eadb8f8
CPU threads: 4; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 4; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Debian package version: 4:7.5.5-4
Calc: threaded
Comment 5 Jambunathan K 2023-10-08 02:05:55 UTC
Created attachment 190086 [details]
lo 7.6 screenshot (Good)
Comment 6 Jambunathan K 2023-10-08 02:06:46 UTC
Created attachment 190087 [details]
lo 7.5 screenshot (Good)
Comment 7 Jambunathan K 2023-10-08 02:09:42 UTC
Since the bug is a regression, I am marking the bug with a `bibisect request`
Comment 8 m_a_riosv 2023-10-08 02:14:08 UTC
I think bibisect should wait for someone else confirmation.
Comment 9 BogdanB 2023-10-08 15:54:53 UTC
Confirm in 24.2.

I added Noel Grandin.

I don't know if it is a bug or not, but I bibisected it.
 14338104ecf1e2739c5a477f0ce6f1fe761c1791 is the first bad commit
commit 14338104ecf1e2739c5a477f0ce6f1fe761c1791
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Tue Oct 3 18:16:02 2023 +0200

    source d9e322d60f65ff20631dab87baa5a2c7c71daaa2
    
    source d9e322d60f65ff20631dab87baa5a2c7c71daaa2

 instdir/program/libPresentationMinimizerlo.so | Bin 378712 -> 378720 bytes
 instdir/program/libbasctllo.so                | Bin 2311008 -> 2311016 bytes
 instdir/program/libcomphelper.so              | Bin 2849704 -> 2849232 bytes
 instdir/program/libcuilo.so                   | Bin 5571696 -> 5571528 bytes
 instdir/program/libdbaxmllo.so                | Bin 528576 -> 528584 bytes
 instdir/program/libeditenglo.so               | Bin 3547336 -> 3547168 bytes
 instdir/program/libfps_officelo.so            | Bin 669144 -> 673328 bytes
 instdir/program/libfrmlo.so                   | Bin 4763968 -> 4763968 bytes
 instdir/program/libmswordlo.so                | Bin 3585328 -> 3589424 bytes
 instdir/program/libooxlo.so                   | Bin 7241920 -> 7241928 bytes
 instdir/program/libpdffilterlo.so             | Bin 454328 -> 454336 bytes
 instdir/program/librptxmllo.so                | Bin 596032 -> 596040 bytes
 instdir/program/libsblo.so                    | Bin 2531336 -> 2535560 bytes
 instdir/program/libscfiltlo.so                | Bin 6935536 -> 6935632 bytes
 instdir/program/libsclo.so                    | Bin 24550968 -> 24557448 bytes
 instdir/program/libscuilo.so                  | Bin 1084168 -> 1084176 bytes
 instdir/program/libsdlo.so                    | Bin 11321672 -> 11321064 bytes
 instdir/program/libsfxlo.so                   | Bin 8544232 -> 8560616 bytes
 instdir/program/libsmlo.so                    | Bin 2494544 -> 2494552 bytes
 instdir/program/libsvtlo.so                   | Bin 3240064 -> 3239792 bytes
 instdir/program/libsvxcorelo.so               | Bin 13321720 -> 13321720 bytes
 instdir/program/libsvxlo.so                   | Bin 5992832 -> 5996936 bytes
 instdir/program/libswlo.so                    | Bin 27865864 -> 27873960 bytes
 instdir/program/libswuilo.so                  | Bin 3533824 -> 3533832 bytes
 instdir/program/libuuilo.so                   | Bin 404680 -> 404784 bytes
 instdir/program/libvcllo.so                   | Bin 20925944 -> 20919944 bytes
 instdir/program/setuprc                       |   2 +-
 instdir/program/versionrc                     |   2 +-
 28 files changed, 2 insertions(+), 2 deletions(-)




author	Noel Grandin <noelgrandin@gmail.com>	2023-09-30 20:47:46 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2023-10-03 10:12:41 +0200
commit d9e322d60f65ff20631dab87baa5a2c7c71daaa2 (patch)
tree d481e5a4728363b3866b5b5f6dbe64a2780b04a6
parent 64fc701388d1dcf8ae36ba2cc73eb5416a7c3374 (diff)
replace ErrorInfo with simpler mechanism
Instead of returning ErrCode class everywhere, return a new
class ErrrCodeMsg, which combines an ErrCode with the other
parameters that are used to control the error reporting.

I do not change everything that uses ErrCode here, I started
from SfxBaseController/SfxMedium and worked outwards.

This change serves two purposes

(1) Replace the extremely whacky ErrorInfo mechanism we were
using to smuggle information into the error handler reporting
mechanism with a very straightforward approach of just combining it
into the error class.
(2) Allow us to capture the source location that produced the error,
which makes debugging the source of a problem soooo much easier.

Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Comment 10 Ezinne 2023-10-08 16:32:43 UTC
Reproducible in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7ef3d937415185ef66e32dd3043783eddcd03db5
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 11 Commit Notification 2023-10-09 20:13:36 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/dd009cffc38a280d3b072ae4dc9ee9cda2e1f13f

tdf#157650 Unhelpful error when XML in content.xml is malformed

It will be available in 24.2.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.