Bug 130272 - QR-Code Generator crashes when text too long
Summary: QR-Code Generator crashes when text too long
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: shubhamgoyal
URL:
Whiteboard: target:7.0.0 target:7.1.0 target:7.0.0.1
Keywords: haveBacktrace
: 130781 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-30 00:55 UTC by jochen.sollermann
Modified: 2020-06-16 07:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (7.55 KB, text/plain)
2020-01-30 08:37 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jochen.sollermann 2020-01-30 00:55:39 UTC
Description:
When trying to create a QR-Code which exceeds the maximum bits for the chosen error correction, Libre Office crashes completely.

Steps to Reproduce:
1. Open QR-Code Generator in any Libre Office component
2. Input a long text exceeding the max bit for chosen error correction (e.g. 10208 for high
3. Click OK

Actual Results:
Error message pops up. E.g "Data length = 62956 bits, Max capacity = 10208 bits". If one closes that pop up, Libre Office crashes completely

Expected Results:
Said error message should remain but not crashing the whole Libre Office Suite.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 6.4.0.3 (x64)
Build-ID: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8
CPU-Threads: 6; BS: Windows 10.0 Build 18363; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL
Comment 1 Julien Nabet 2020-01-30 08:37:55 UTC
Created attachment 157522 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I put "catch throw" just before the test and got this bt.
Comment 2 Julien Nabet 2020-01-30 08:42:07 UTC
Shubham: one for you?
Comment 3 shubhamgoyal 2020-01-30 08:59:59 UTC
I will take this one
Comment 4 Julien Nabet 2020-02-19 20:43:51 UTC
*** Bug 130781 has been marked as a duplicate of this bug. ***
Comment 5 Julien Nabet 2020-02-19 20:44:14 UTC
Shubham: any update here?
Comment 6 shubhamgoyal 2020-02-22 08:29:33 UTC
Julien,
The exception handling should be done at the Library level or at the LibreOffice level?
Comment 7 Julien Nabet 2020-02-22 08:32:58 UTC
(In reply to shubhamgoyal from comment #6)
> Julien,
> The exception handling should be done at the Library level or at the
> LibreOffice level?

No idea. I think you should ask on LO dev forum or directly on IRC on dev channel.
Comment 8 shubhamgoyal 2020-02-22 08:56:35 UTC
okay
Comment 9 Commit Notification 2020-02-28 17:51:25 UTC
22shubh22 committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/93fe47e113628925b3caf33502326c7b136263a1

tdf#130272 A warning is now shown and LO do not crash

It will be available in 7.0.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.
Comment 10 Ming Hua 2020-03-01 21:58:30 UTC
(In reply to Commit Notification from comment #9)
> 22shubh22 committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> 93fe47e113628925b3caf33502326c7b136263a1
> 
> tdf#130272 A warning is now shown and LO do not crash
Although I'm not a native speaker, I feel the error message in this patch

> "RID_SVXSTR_QRCODEDATALONG", "Text exceeds the maximum bits for Error Correction, Enter shorter text"

has some room for improvement.  "Bits" feels too technical for ordinary users, and suggestion of using lower level of error correction should be given in additional to shortening the text.

I would propose something like "URL/Text is too long for the current Error Correction level, please enter shorter text or decrease Error Correction."

Or should I move these comments to a new bug report?
Comment 11 Commit Notification 2020-06-13 22:52:57 UTC
Adolfo Jayme Barrientos committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3c0511b6b6cfda1fdb675fe9cfbb7199860cf522

Related: tdf#130272 Improve English in error message

It will be available in 7.1.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.
Comment 12 Commit Notification 2020-06-16 07:21:36 UTC
Adolfo Jayme Barrientos committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

Related: tdf#130272 Improve English in error message

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