Bug 137460 - Wrong AdditionsTag crashes LibreOffice
Summary: Wrong AdditionsTag crashes LibreOffice
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Muhammet Kara
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: Extension-Tight-Integration
  Show dependency treegraph
 
Reported: 2020-10-13 16:04 UTC by Heiko Tietze
Modified: 2020-10-19 11:53 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2020-10-13 16:04:33 UTC
css::uno::Sequence<css::beans::PropertyValue> aArgs(1);
    aArgs[0].Name = "AdditionsTag";
    aArgs[0].Value <<= OUString("Foo"); <= this is wrong
    comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
Comment 1 Muhammet Kara 2020-10-17 22:40:59 UTC
Confirmed on:

Version: 7.1.0.0.alpha0+
Build ID: 49ba005c111b50c2d7b6c8c68d0a09d4eafa7288
CPU threads: 16; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

It is not only specific to incorrect AdditionsTag, in fact. Caused by HTTP 404 Not Found error.
Comment 2 Commit Notification 2020-10-17 23:20:41 UTC
Muhammet Kara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3371e11d23635c69f242507a33b60daf2c21b433

tdf#137460: Additions: Fix crash on error 404

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 3 Heiko Tietze 2020-10-19 10:00:37 UTC
If I read the code correctly it silently just doesn't work. The SAL_WARN() thing needs to show up somewhere in the UI.
Comment 4 Muhammet Kara 2020-10-19 10:15:01 UTC
(In reply to Heiko Tietze from comment #3)
> If I read the code correctly it silently just doesn't work. The SAL_WARN()
> thing needs to show up somewhere in the UI.

It works as intended. A wrong tag or url is not supposed to work anyway. This is not just silencing an issue, but fixes the crash reported. 

Regarding informing the user about what's going on, we already have another report for that: https://bugs.documentfoundation.org/show_bug.cgi?id=136291
Comment 5 Heiko Tietze 2020-10-19 11:53:39 UTC
(In reply to Muhammet Kara from comment #4)
> It works as intended. A wrong tag or url is not supposed to work anyway.
> This is not just silencing an issue, but fixes the crash reported. 

404 is page not found, also happening when the server is down. Shouldn't happen, sure.