https://bugs.documentfoundation.org/show_bug.cgi?id=159961

Buovjaga <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Whiteboard| QA:needsComment            |
                 CC|                            |ilmari.lauhakangas@libreoff
                   |                            |ice.org

--- Comment #3 from Buovjaga <[email protected]> ---
(In reply to Henrry John from comment #0)
> Description:
> Note to Developers:
> The code for reproducing the crash is provided in the "Steps to Reproduce"
> section. Please be aware of the potential data corruption and loss due to
> the abrupt termination of all LibreOffice instances. Exercise with caution
> when testing and reproducing this issue, and ensure that no critical or
> unsaved work is present to avoid unintended data loss.
> 
> Description:
> After declaring an instance of the class module ('UserClass') using the line
> `Public Example As New UserClass` and executing the provided BASIC code,
> LibreOffice becomes unresponsive and crashes. The crash is accompanied by a
> significant increase in memory usage, resulting in LibreOffice freezing and
> abrupt termination of all instances. Notably, no crash report is generated,
> and there is no attempt at recovery, which raises concerns about potential
> data loss.
> 
> The issue persists regardless of the declaration scope (public, private, or
> global). This indicates that the problem is not limited to a specific
> declaration context. Moreover, whether the declaration is within the class
> module itself or in a separate module, the crash occurs consistently. This
> would suggest that the problem might not be specific to the class module
> itself but rather it might be related to the instantiation of objects from
> the class.
> 
> Steps to Reproduce:
> 1. Open LibreOffice and create a new Basic module named "UserClass"
> 2. Add the following Basic subroutine
> ```basic
> Option Explicit
> Option Compatible
> Option ClassModule '''UserClass'''
> REM Uncommenting the following line causes LibreOffice to become unresponsive
> REM Public Example As New UserClass
> Property Get ExampleProperty As String
>     ExampleProperty = "Example String"
> End Property
> Sub TestRun
>     REM Include the below code to ensure the entire class functions properly.
>     REM Comment it out as well as uncommented the above problematic code to
> reproduce the crash.
>     Dim Example As New UserClass
>     MsgBox Example.ExampleProperty
> End Sub`
> 3. Uncomment the line `Public Example As New UserClass` as well as comment
> out the line `Dim Example As New UserClass`
> 4. Compile and execute the "TestRun" method.

For me it says

BASIC runtime error.
Variable not defined

and points to the line

MsgBox Example.ExampleProperty

For ease of testing, could you attach a document containing the macro?

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d5d4e1334957abc29c5c4f543a8cd15a5aaf8748
CPU threads: 2; OS: Windows 11 X86_64 (10.0 build 22621); UI render:
Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-GB
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to