Bug 141307 - Crash in: SvtBroadcaster::Add (probably a basic macro issue)
Summary: Crash in: SvtBroadcaster::Add (probably a basic macro issue)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.1.2 release
Hardware: All All
: medium minor
Assignee: Björn Michaelsen
URL:
Whiteboard: target:7.2.0 target:7.1.4
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-28 21:40 UTC by hugotrip@free.fr
Modified: 2021-05-17 23:00 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["SvtBroadcaster::Add"]


Attachments
the "faulty" macro (1.01 KB, text/html)
2021-03-28 21:40 UTC, hugotrip@free.fr
Details
A sample documents with fonts needed (427.41 KB, application/x-xz)
2021-03-29 20:31 UTC, hugotrip@free.fr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hugotrip@free.fr 2021-03-28 21:40:31 UTC
Created attachment 170798 [details]
the "faulty" macro

This bug was filed from the crash reporting server and is br-33ed96ed-3b13-48f2-93d2-e18c54fef244.
=========================================

I made a Basic macro to hide/unhide some texts selected by their style, and now running it frequently crash LibreOffice, but not always.

It works fine with LibreOffice 6.3.6

I attach the macro for the record.

(this crash was on a fresh parallel install of LibreOffice 7.1.1 - following instructions from https://wiki.documentfoundation.org/Installing_in_parallel, with just the macro copy/pasted.

And if you need context, I'm a teacher, and I use this macro to allow me to produce from a same document a student version and a (enhanced) teacher one.
Comment 1 Xisco Faulí 2021-03-29 09:17:43 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 Tony 2021-03-29 20:29:23 UTC Comment hidden (spam)
Comment 3 hugotrip@free.fr 2021-03-29 20:31:37 UTC
Created attachment 170816 [details]
A sample documents with fonts needed

I added a crashing document and the fonts used in the styles within it.
Comment 4 hugotrip@free.fr 2021-03-29 20:45:41 UTC
As I was looking for a sample document, I found out that it seems it's not the macro itself that makes Libreoffice 7 crashing, but the attribute hidden to the paragraph style 'Prof' : more precisely it's when I check this attribute that the crash occurs (you may need to scroll within the document, once the change is done to see the crash) :
Indeed, I have another style in my macro that doesn't crash at all, and I tried to  open the sample document with the attribute hidden already given (done by using a 6.3.6 version of LibreOffice) to the style 'Prof' and it doesn't make LibreOffice 7 crash, neither then unhiding the style (but re hiding it will make a crash again)
Comment 5 Commit Notification 2021-05-12 15:19:50 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "master":

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

tdf#141307: adapt null-check

It will be available in 7.2.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 Commit Notification 2021-05-12 16:34:46 UTC
Bjoern Michaelsen committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#141307: adapt null-check

It will be available in 7.1.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 7 hugotrip@free.fr 2021-05-13 14:10:49 UTC
Hello there,

I've just tried the daily build, and so far, it seems fixed to me (testing on two documents crashing otherwise)

So I thank you now :)
Comment 8 Adolfo Jayme Barrientos 2021-05-17 23:00:17 UTC
Thanks for testing! Setting to Verified then