Bug 151375

Summary: Crash when running insertDocumentFromURL with certain document
Product: LibreOffice Reporter: Samuel Mehrbrodt (allotropia) <samuel.mehrbrodt>
Component: WriterAssignee: Michael Stahl (allotropia) <michael.stahl>
Status: RESOLVED FIXED    
Severity: normal CC: samuel.mehrbrodt, telesto
Priority: medium Keywords: bisected, regression
Version: 7.1.0.3 release   
Hardware: All   
OS: All   
Whiteboard: target:7.5.0 target:7.4.3
Crash report or crash signature: Regression By:
Attachments: Backtrace
Bugdoc

Description Samuel Mehrbrodt (allotropia) 2022-10-06 11:37:12 UTC
Run this macro (document is attached).

Sub insertDoc
	Dim oUrl as String
	Dim oPropertyValue(0) as New com.sun.star.beans.PropertyValue
	oUrl = "file:///path/to/kurzmitteilung.ott"
	ThisComponent.Text.createTextCursor().insertDocumentFromURL(oURL, oPropertyValue())
End Sub

-> LO crashes
Comment 1 Samuel Mehrbrodt (allotropia) 2022-10-06 11:37:36 UTC
Created attachment 182863 [details]
Backtrace
Comment 2 Samuel Mehrbrodt (allotropia) 2022-10-06 11:39:47 UTC
Created attachment 182865 [details]
Bugdoc
Comment 3 Commit Notification 2022-10-07 15:45:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#151375 sw: ODF import: delete any layout frames before ...

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 4 Michael Stahl (allotropia) 2022-10-07 15:49:19 UTC
fixed on master
was another problem from commit e366c928819c44b5c253c45dca6dae40b71c9808
Comment 5 Commit Notification 2022-10-08 15:38:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#151375 sw: ODF import: delete any layout frames before ...

It will be available in 7.4.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 6 Commit Notification 2022-10-13 10:15:00 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/06f990a50d211564b89420af184edcf6145c0ce8

tdf#151375: sw_odfimport: Add unittest

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.