https://bugs.documentfoundation.org/show_bug.cgi?id=159961
--- Comment #2 from Henrry John <[email protected]> --- **New Information and Steps to Mitigate the Crash:** After in-depth testing and profile resets, I observed a notable behavior related to the crash. Specifically, excluding the "TestRun" method and the problematic instantiation code within the "UserClass" module seems to prevent the crash. This discovery suggests a potential correlation between the crash and the action of declaring an instance of the "UserClass" within the "UserClass" module itself. **Steps to Mitigate the Crash:** 1. Open LibreOffice and navigate to the "UserClass" module. 2. Exclude the "TestRun" method and the problematic instantiation code. 3. Save and compile the modified code. 4. Execute the modified code and observe if the crash still occurs. **Analysis and Insights:** The exclusion of the "TestRun" method appears to be a workaround to mitigate the crash. This aligns with the hypothesis that the crash might be related to the instantiation of the class within its own module. As mentioned in a previous comment, the potential issue could be akin to recursion, where the object creates an instance of the class, and the class itself tries to create an object instance of itself, leading to resource over-utilization and the subsequent crash of LibreOffice instances. Notably, in a new module within the same library as "UserClass," declaring the instance of "UserClass" outside the scope of subs or functions encountered no issues. This could indicate that the problem might be specific to certain instantiation contexts within the same module. **Potential Implications and Future Considerations:** If the hypothesis regarding the recursion-like issue is confirmed, it would be advisable to implement a mechanism preventing users from inadvertently creating such recursion. This could involve introducing safeguards in the BASIC interpreter to detect and handle instances of potential recursion during class instantiation. **Additional Notes:** These steps serve as a temporary mitigation measure and do not address the root cause of the issue. Further analysis of the LibreOffice BASIC interpreter's handling of class instantiation within the same module is necessary for a comprehensive resolution. Reproducible: Yes (Mitigated) -- You are receiving this mail because: You are the assignee for the bug.
