Bug 160153 - c.s.s.util.PathSettings: WrappedTargetRuntimeException with attribute "Storage"
Summary: c.s.s.util.PathSettings: WrappedTargetRuntimeException with attribute "Storage"
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: Macro-StarBasic
  Show dependency treegraph
 
Reported: 2024-03-11 14:54 UTC by Oliver Brinzing
Modified: 2024-05-02 08:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample ODS with macro (9.12 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-27 03:40 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2024-03-11 14:54:24 UTC
OPTION EXPLICIT
Sub Main
  Dim oPath
  oPath = createUnoService("com.sun.star.util.PathSettings")
'https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1util_1_1XPathSettings.html#a3ee6a14892709eb7acdf56afb3a18c77
'string Storage: Mail, News files and other information (for example, about FTP Server) are stored here.

  msgbox oPath.Storage
End Sub

should return a path like:

file:///C:/Users/[MY_User]/AppData/Roaming/LibreOffice/4/user/store

but LO 24.2.1 throws an Exception:

BASIC-Laufzeitfehler.
Es ist eine Ausnahme aufgetreten 
Type: com.sun.star.lang.WrappedTargetRuntimeException
Message: non-RuntimeException occurred when accessing an interface type attribute at C:/cygwin64/home/buildslave/source/libo-core/stoc/source/corereflection/criface.cxx:263.
Comment 1 Stéphane Guillou (stragu) 2024-03-27 03:39:27 UTC
Thanks for the report.

Not reproduced in 7.6.5

Reproduced in:

Version: 24.2.2.1 (X86_64) / LibreOffice Community
Build ID: bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Error message in English:

BASIC runtime error.
An exception occurred
Type: com.sun.star.lang.WrappedTargetRuntimeException
Message: non-RuntimeException occurred when accessing an interface type attribute at /home/buildslave/source/libo-core/stoc/source/corereflection/criface.cxx:266

The config key was deprecated on purpose in 24.2 (checked with linux-64-24.2 bibisect repo):

commit 3cee7edeb31ac64e078159c7a63ebf4f54793da7
author	Samuel Mehrbrodt 	Mon Oct 02 12:38:24 2023 +0200
committer	Samuel Mehrbrodt 	Mon Nov 13 15:59:35 2023 +0100
[API CHANGE] Remove deprecated Storage config item
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157486

Documented in the release notes: https://wiki.documentfoundation.org/ReleaseNotes/24.2#Configuration_Changes

Samuel, what was the reason for deprecating?
Comment 2 Stéphane Guillou (stragu) 2024-03-27 03:40:24 UTC
Created attachment 193332 [details]
sample ODS with macro

Can be run with: 

soffice /path/to/macro_criface.ods macro://./Standard.Module1.Main
Comment 3 Samuel Mehrbrodt (allotropia) 2024-05-02 08:28:13 UTC
(In reply to Stéphane Guillou (stragu) from comment #1)
> 
> The config key was deprecated on purpose in 24.2 (checked with linux-64-24.2
> bibisect repo):
> 
> commit 3cee7edeb31ac64e078159c7a63ebf4f54793da7
> author	Samuel Mehrbrodt 	Mon Oct 02 12:38:24 2023 +0200
> committer	Samuel Mehrbrodt 	Mon Nov 13 15:59:35 2023 +0100
> [API CHANGE] Remove deprecated Storage config item
> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157486
> 
> Documented in the release notes:
> https://wiki.documentfoundation.org/ReleaseNotes/24.2#Configuration_Changes
> 
> Samuel, what was the reason for deprecating?

I don't know the reason for deprecating. The property was added with the deprecation notice back in 52dfefe2e3dfc49f5c57d72e4f0cb5634edcefdc .

Will revert and remove the deprecation notice.