https://bugs.documentfoundation.org/show_bug.cgi?id=159961
Bug ID: 159961
Summary: LibreOffice becomes unresponsive and crashes,
accompanied by a significant increase in memory usage,
when attempting to declare a new object instance of a
class module ("UserClass"), leading to severe data
loss.
Product: LibreOffice
Version: 7.6.5.2 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
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.
Additional steps to reproduce the crash in different module.
5. Create a new Basic module within the same library as the "UserClass" module.
6. Add the following Basic subroutine:
```basic
Option Explicit
REM Uncommenting the following line causes LibreOffice to become unresponsive
REM Public Example As New UserClass
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`
7. Uncomment the line `Public Example As New UserClass` as well as comment out
the line `Dim Example As New UserClass`.
8. Compile and execute the "TestRun" subroutine.
Actual Results:
LibreOffice becomes unresponsive, with an observed increase in memory usage. No
crash report or recovery attempt is initiated. All LibreOffice instances
terminate abruptly, leading to data loss.
Expected Results:
LibreOffice should handle the declaration of a new object instance without
becoming unresponsive. The software should not terminate abruptly, and users
should not experience data loss.
Reproducible: Always
User Profile Reset: Yes
Additional Info:
Version: 7.6.5.2 (X86_64) / LibreOffice Community
Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b
CPU threads: 20; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded Jumbo
--
You are receiving this mail because:
You are the assignee for the bug.