Bug 150291 - Macro-collection-management crashes when no macro-container is selected (gtk3 specific)
Summary: Macro-collection-management crashes when no macro-container is selected (gtk3...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0 target:7.4.1 target:7.3....
Keywords: haveBacktrace
: 150425 150585 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-07 00:07 UTC by MikeGebirge
Modified: 2023-02-07 19:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Clicking "Verwalten…" here will crash LibreOffice (27.29 KB, image/png)
2022-08-07 00:08 UTC, MikeGebirge
Details
bt with debug symbols (11.31 KB, text/plain)
2022-08-07 08:11 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MikeGebirge 2022-08-07 00:07:19 UTC
Description:
Crash when I open the "BASIC-Makros" window and click the "Verwalten…" (probably "Manage…") button.

Workaround: Just make sure you select something before clicking "Verwalten…".

Steps to Reproduce:
(The names are slightly off because I use the German locale. I'll add the German names in parentheses.)
1. Open a new LibreOffice Calc workbook.
2. Go to the menu entry "Extras" > "Macros" > "Edit Macros…" ("Makros bearbeiten…")
3. In the new window "My Macros and Dialogs", go to the menu entry "Extras" > "Manage Macros" ("Makros verwalten") > "Basic…"
4. In the new window "BASIC Macros", click the button "Manage…" ("Verwalten…"), without selecting anything first.

The screenshot was made just before the final button click.

Actual Results:
LibreOffice immediately and always crashes.

Expected Results:
LibreOffice should not crash. I don't yet understand how this dialog is supposed to work, but maybe that button was supposed to be disabled?


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: BasicIDE
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 MikeGebirge 2022-08-07 00:08:06 UTC
Created attachment 181647 [details]
Clicking "Verwalten…" here will crash LibreOffice
Comment 2 Julien Nabet 2022-08-07 08:11:42 UTC
Created attachment 181649 [details]
bt with debug symbols

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

I noticed this on console:
warn:sfx.control:10939:10939:sfx2/source/control/dispatch.cxx:1206: Childwindow slot missing: 26190

(soffice:10939): Gtk-CRITICAL **: 10:05:22.555: gtk_tree_store_get_path: assertion 'iter->user_data != NULL' failed

(soffice:10939): Gtk-CRITICAL **: 10:05:22.555: gtk_tree_path_get_depth: assertion 'path != NULL' failed

(soffice:10939): Gtk-CRITICAL **: 10:05:22.555: gtk_tree_store_get_value: assertion 'VALID_ITER (iter, tree_store)' failed

(soffice:10939): GLib-GObject-WARNING **: 10:05:22.555: ../../../gobject/gtype.c:4333: type id '0' is invalid

(soffice:10939): GLib-GObject-WARNING **: 10:05:22.555: can't peek value table for type '<invalid>' which is not currently referenced

Also, I don't reproduce this with kf5 or gen rendering so specific to gtk.
Comment 3 Julien Nabet 2022-08-07 08:13:39 UTC
Caolán: thought you might be interested in this one since it's gtk specific.

Steps to reproduce this:
- open brand new Calc file
- Tools/Macros/Edit Macros

Then in the Macro window:
- Tools/Organize Macros/Basic
- Organizer...
=> crash
Comment 4 Commit Notification 2022-08-07 13:38:07 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/42a32f375a2641e6e82ee685efa3573c0dcaf001

tdf#150291 crash on macro organizer with no macro selected

It will be available in 7.5.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 5 Commit Notification 2022-08-07 13:41:15 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6e2bd11251afbe64f9889ede36b28b00f47aaff5

tdf#150291 Revert "Fix crash when no valid EntryDescriptor found"

It will be available in 7.5.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 6 Caolán McNamara 2022-08-07 13:42:34 UTC
I think this problem began at

commit 499ecbf3a36990c29dc7e1fb9b0ecb1d297c2848
Date:   Mon Jun 20 10:27:26 2022 +0200

    Fix crash when no valid EntryDescriptor found
    
    When opening macro run dlg, the last selected entry is displayed again.
    When no entry was found, a crash occured in some situations
    (GetLastEntryDescriptor() returned garbage).

crash fix in gerrit for 7-4 and 7-3 also
Comment 7 Julien Nabet 2022-08-07 18:31:41 UTC
I confirm it doesn't crash with master updated today with Caolán's patch.
Thank you!
Comment 8 Commit Notification 2022-08-08 09:00:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#150291 crash on macro organizer with no macro selected

It will be available in 7.4.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.
Comment 9 Commit Notification 2022-08-08 09:01:49 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#150291 crash on macro organizer with no macro selected

It will be available in 7.3.6.

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 Commit Notification 2022-08-10 09:49:24 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4-0":

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

tdf#150291 crash on macro organizer with no macro selected

It will be available in 7.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 11 Xisco Faulí 2022-08-15 14:14:13 UTC
*** Bug 150425 has been marked as a duplicate of this bug. ***
Comment 12 Andreas Säger 2022-08-15 14:28:22 UTC
(In reply to Julien Nabet from comment #2)
> Also, I don't reproduce this with kf5 or gen rendering so specific to gtk.

I always use gen and get the crash anyway.
Comment 13 Julien Nabet 2022-08-25 09:06:52 UTC
*** Bug 150585 has been marked as a duplicate of this bug. ***
Comment 14 Buovjaga 2023-02-02 12:58:42 UTC Comment hidden (obsolete)