Bug 127645 - LibreOffice Crashes or Freezes, if an Update of an Extension is Available
Summary: LibreOffice Crashes or Freezes, if an Update of an Extension is Available
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0 target:6.3.3 target:6.3.4
Keywords: haveBacktrace
: 128592 (view as bug list)
Depends on:
Blocks: Extension-Manager
  Show dependency treegraph
 
Reported: 2019-09-19 14:32 UTC by Harald Koester
Modified: 2019-11-05 11:27 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["com::sun::star::configuration::theDefaultProvider::get(com::sun::star::uno::Reference%3Ccom::sun::star::uno::XComponentContext%3E%20const%20&)", "dp_gui::TheExtensionManager::isVisible()"]


Attachments
Backtrace of crash (10.33 KB, text/plain)
2019-09-24 21:42 UTC, Harald Koester
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Koester 2019-09-19 14:32:20 UTC
In order to reproduce the bug:

[1] Start LibreOffice.
[2] Install an extension, that is not current. I used version 4.2 of the Language Tool. You can get this version from this site: https://languagetool.org/download/. Don't close the Extension Manager.
[3] Click the button 'Check for Updates'. The dialogue “Extension Update” is displayed: A more up to date version of the Language Tool is available.
[4] Close dialogues 'Check for Updates' and 'Extension Manager'. Don't restart LibreOffice here, i.e. click 'Restart Later'. The icon 'Updates for Extensions available' appears on the right side of the menu bar.
[5] Click the icon 'Updates for Extensions available'. LibreOffice crashes. The recovery dialogue is displayed. Expected: No crash.
[6] Click OK. LibreOffice is restarted.
[7] Wait until the icon 'Updates for Extensions available' appears on the right side of the menu bar.
[8] Click the icon 'Updates for Extensions available' again. The dialogue “Extension Update” is displayed: A more up to date version of the Language Tool is available.
[9] Click Close. LibreOffice freezes. You have to end LibreOffice with the task manager. Expected: No freeze.
Comment 1 Julien Nabet 2019-09-19 18:57:39 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.
But I must recognize I don't see any "icon 'Updates for Extensions available' appears on the right side of the menu bar".

However, I noticed this trace on console:
warn:legacy.osl:28866:28954:desktop/source/deployment/gui/dp_gui_updatedialog.cxx:549: OSL_ASSERT: false
Comment 2 Julien Nabet 2019-09-19 20:28:49 UTC
Caolán: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=4c3e0b2400c6b101a89f21e2268d5b696770fb9c, thought you might be interested in this one.

I think OSL_ASSERT should be a real assert here.
This line seems a bit weird:
m_xUpdates->set_id(nEntry, OUString::number(reinterpret_cast<sal_Int64>(pEntry)));

shouldn't we use pEntry->m_nIndex in a way?

Also, even if this line was before the quoted commit:
sal_uInt16 nIndex = sal::static_int_cast< sal_uInt16 >( m_enabledUpdates.size() );
can't we do more simple with:
sal_uInt16 nIndex(m_enabledUpdates.size());
?

Here's the small bt from this part:
#0  0x00007fff272a4d71 in dp_gui::UpdateDialog::insertItem(dp_gui::UpdateDialog::Index*, bool) (this=0x7fffe51ba5c0, pEntry=0x55555ba05410, bEnabledCheckBox=true)
    at /home/julien/lo/libreoffice/desktop/source/deployment/gui/dp_gui_updatedialog.cxx:549
#1  0x00007fff272a5043 in dp_gui::UpdateDialog::addEnabledUpdate(rtl::OUString const&, dp_gui::UpdateData const&) (this=0x7fffe51ba5c0, name="LanguageTool Version 4.6", data=...)
    at /home/julien/lo/libreoffice/desktop/source/deployment/gui/dp_gui_updatedialog.cxx:577
#2  0x00007fff272a354e in dp_gui::UpdateDialog::Thread::update(dp_gui::UpdateDialog::DisabledUpdate const&, dp_gui::UpdateData const&) const (this=0x55555c581cb0, du=..., data=...)
    at /home/julien/lo/libreoffice/desktop/source/deployment/gui/dp_gui_updatedialog.cxx:437
#3  0x00007fff272a2804 in dp_gui::UpdateDialog::Thread::execute() (this=0x55555c581cb0) at /home/julien/lo/libreoffice/desktop/source/deployment/gui/dp_gui_updatedialog.cxx:324
#4  0x00007ffff64a058e in salhelper::Thread::run() (this=0x55555c581cb0) at /home/julien/lo/libreoffice/salhelper/source/thread.cxx:40
Comment 3 Caolán McNamara 2019-09-20 08:12:04 UTC
yeah, the return value there is wrong. Though luckily the return is unused so we can just remove that https://gerrit.libreoffice.org/#/c/79270/
Comment 4 Xisco Faulí 2019-09-20 10:02:02 UTC
Moving to ASSIGNED
Comment 5 Caolán McNamara 2019-09-20 11:13:52 UTC
A few problems. The above patch is just cosmetic as the bad return value isn't used.

Normally this update dialog is a sub dialog of the extension manager. In this case it is a toplevel, but still creates the extension manager window, but doesn't execute it. So its there but not running. The assumption was that if the window existed it was executing. https://gerrit.libreoffice.org/#/c/79281/ fixes that assumption. Which is the crash problem I believe.

https://gerrit.libreoffice.org/#/c/79282/ fixes the locked ui, where there is one more lock than unlock around the update dialog. The presence of the tooltip-alike window is the problem there, treating FloatingWindows like Tooltips solves that for me.

These cases where there is a modeless dialog (extension manager, whether visible or not) which has modal child dialogs which want to be modal to the entire application are a pain.
Comment 6 Commit Notification 2019-09-20 11:22:58 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9b231713790c6e94eb64c3fc108ce99ebd2b90af

Related: tdf#127645 return value is unused

It will be available in 6.4.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 7 Commit Notification 2019-09-20 12:04:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/243db6880cf1337de237e258fad1524413db848c

Resolves: tdf#127645 ignore floating windows like we do tooltips

It will be available in 6.4.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 8 Commit Notification 2019-09-20 13:08:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5110beb7f0821b7c63f9947a6df7256da559b6c9

Related: tdf#127645 update dialog has a slave extension dialog

It will be available in 6.4.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 9 Caolán McNamara 2019-09-20 13:35:27 UTC
Looks right for me in master now, backports to 6-3 in gerrit
Comment 10 Harald Koester 2019-09-24 14:43:31 UTC
Checked with: 

Version: 6.4.0.0.alpha0+ (x64)
Build ID: b2d8093b19642038631dfb8f1ab6745a380a652c
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-09-23_22:42:37
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

LibreOffice still crashes if you perform the steps 1 to 5 of original description. At step 9 LibreOffice does not freeze any longer. 

LibreOffice also still crashes if you perform these steps:

[1] Start LibreOffice.
[2] Install an extension, that is not current.
[3] Close Extension dialogue and restart LibreOffice.
[4] Wait until the icon 'Updates for Extensions available' appears on the right side of the menu bar.
[5] Open Extension Manager and click Check for Updates. The dialogue “Extension Update” is displayed: A more up to date version of the extension is available.
[6] Close dialogues 'Extension Update' and 'Extension Manager'.
[7] Click the icon 'Updates for Extensions available' in the menu bar. LibreOffice crashes. Expected: No crash.

Set status back to UNCONFIRMED, because the bug has not been confirmed yet.
Comment 11 Julien Nabet 2019-09-24 15:53:40 UTC
Harald: would it be possible you attach a backtrace? (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:_How_to_get_a_backtrace)
Comment 12 Harald Koester 2019-09-24 21:01:31 UTC
(In reply to Julien Nabet from comment #11)
> Harald: would it be possible you attach a backtrace? (see
> https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:
> _How_to_get_a_backtrace)

Yes, I will try to do this but it may take some time, because I have not done this yet.

Meanwhile I produced a crash report with version 6.3.1.2:

crashreport.libreoffice.org/stats/crash_details/f81445af-6a20-4e4d-8ffb-a3a05c558f5b

This report was created at step 6 of the original report. With version 6.4.0.0.alpha0+ there was no request for sending a crash report.
Comment 13 Harald Koester 2019-09-24 21:42:00 UTC
Created attachment 154459 [details]
Backtrace of crash
Comment 14 Julien Nabet 2019-09-26 08:39:33 UTC
Thank you Harald for your feedback.
I must recognize I've got no clue here about the culprit.
Comment 15 Xisco Faulí 2019-10-03 10:35:21 UTC
(In reply to Harald Koester from comment #13)
> Created attachment 154459 [details]
> Backtrace of crash

Hi Caolán,
Does the backtrace ring a bell for you ?
Comment 16 Commit Notification 2019-10-08 09:43:49 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/00aaada667af4d7138e3ddca153c37afd5f61f23

Resolves: tdf#127645 ignore floating windows like we do tooltips

It will be available in 6.3.3.

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 17 Commit Notification 2019-10-08 09:45:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

Related: tdf#127645 update dialog has a slave extension dialog

It will be available in 6.3.3.

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 18 Caolán McNamara 2019-10-29 15:45:17 UTC
I can reproduce this under gen
Comment 19 Xisco Faulí 2019-10-29 16:18:24 UTC
in

Versión: 6.3.3.1 (x86)
Id. de compilación: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded

I get this crash: http://crashreport.libreoffice.org/stats/signature/com::sun::star::configuration::theDefaultProvider::get(com::sun::star::uno::Reference%3Ccom::sun::star::uno::XComponentContext%3E%20const%20&)

if I do:
1. Install LanguageTool 4.2.
2. Right after installing it -> Check for updates
3. Close the check for updated dialog

-> Crash
Comment 20 Commit Notification 2019-10-29 19:56:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#127645 fix crash on revisit to check updates

It will be available in 6.4.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 21 Commit Notification 2019-10-30 11:12:50 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

Resolves: tdf#127645 fix crash on revisit to check updates

It will be available in 6.3.4.

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 22 Xisco Faulí 2019-11-05 10:23:03 UTC
*** Bug 128592 has been marked as a duplicate of this bug. ***
Comment 23 Xisco Faulí 2019-11-05 11:27:52 UTC
Let close this issue as RESOLVED FIXED