Bug 144183 - Basic IDE hangs after several error messages
Summary: Basic IDE hangs after several error messages
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.3.0 target:7.2.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-08-30 12:22 UTC by Mike Kaganski
Modified: 2021-08-31 13:22 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test file with a sub calling another module's method (9.21 KB, application/vnd.oasis.opendocument.text)
2021-08-30 12:22 UTC, Mike Kaganski
Details
Screencast of slowing down error message (2.11 MB, image/gif)
2021-08-30 12:36 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-08-30 12:22:32 UTC
Created attachment 174638 [details]
Test file with a sub calling another module's method

In 7.2 and master, the following sequence fails:

1. Define a module in a Basic shared library, containing a sub with an error:

Library "Standard" under "My Macros and Dialogs", Module "TestGlobalShared"

  Option Explicit

  Sub TestGlobalSub
    MsgBox UndefinedVar
  End Sub

2. In a document, define a Basic sub calling the said sub with error:

Document "TestGlobalSub.ODT">Library "Standard">Module "Module1"

  Option Explicit

  Sub Main
    TestGlobalShared.TestGlobalSub
  End Sub

3. Repeat this:
3.1. Double-click on "Main" under the document's "Module1";
3.2. Press F5;
3.2. Close the error message in the shared library's sub with error.

Repeating step 3 starts slowing down after several cycles; it depends on the could of modules shown in the IDE, but in the simplest case, when there are only a few modules, I see *some* delay after 7-8 repeats; significant delay on the next repeat; and huge delay on the next repeat. Repeating after that would hang.

It looks like some quadratic algorithm in place. It is a regression after commit https://git.libreoffice.org/core/+/d47ac2ebdb495b025eb26e17cbbe2509797c31f0 (Noel: could you please take a look? Maybe somewhere a typo crept in?).

Also in debug build, the second repeat brings an assertion failed at TabBar::InsertPage ("TabBar::InsertPage(): Page already exists").
Comment 1 Mike Kaganski 2021-08-30 12:36:40 UTC
Created attachment 174640 [details]
Screencast of slowing down error message
Comment 2 Mike Kaganski 2021-08-30 14:43:24 UTC
https://gerrit.libreoffice.org/c/core/+/121282
Comment 3 Commit Notification 2021-08-31 02:37:57 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/638acd81979f24262c29dc12e0289d7fc38fcd8b

tdf#144183: restore 'erase' that was accidentally dropped

It will be available in 7.3.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 4 Commit Notification 2021-08-31 06:12:50 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#144183: restore 'erase' that was accidentally dropped

It will be available in 7.2.2.

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 5 Commit Notification 2021-08-31 13:19:41 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-2-1":

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

tdf#144183: restore 'erase' that was accidentally dropped

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