LibreOffice/Calc crashing

Debugging Help.

For starters
Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.4
Calc: threaded

i’m refactoring some existing code. it’s several thousands lines long, and spans several class modules. Part of my rework, was to set some global variables in a class that is executed from an ‘openDocument’ event. And likewise, a set of ‘set to nothing’ statements on ‘documentisbeingclosed’ event.

Once the workbook renders, im running ‘process’ macros manually, at this point, but the final intention is to assign them to a button.

So at the moment, im at the tail end of code / execute phase.
my problem is LibreOffice, keeps aborting. i get one run at the code, maybe two, before LibreOffice disappears, taking Calc and the Basic IDE with it. It restarts ok, well at least to the last backup, not necessarily the last export of code.

Thus, my topic, of help with debugging. Im assuming if a index was out of bounds, or a reference outside of a range, i would get a runtime error. But for the whole suite to disappear, it sounds more serious.

im not so worried about debugging my basic code, that i can do. Thinking more about debugging / tracing / logging libreoffice activity.

first question, are there any libreoffice logs that my offer some insight. is there something i can turn on, to capture the underlying cause.

as usual, thanks in advance.
-cw

https://wiki.documentfoundation.org/Development/How_to_debug

1 Like

Can’t really help, but added some more tags than only “calc”.

So your code runs one or two times? No errorros/no problems?
The next run uses the same data? Or can the crashing run use a part of the code not run before? As Basic is interpreted some code may only be used on special cases, but then always crash…
.
So I’d try to start to narrow down, where in your Basic-cade you crash, as you seem

This may be exactly what i’m looking for. I knew there would have to be something at the o/s that would help. i haven’t tried it yet. But definitely in the direction i was asking. Thanks

So your code runs one or two times? Correct.

No error/no problems? also correct. run to completion 1or 2 time. 3rd time it all disappears.

The next run uses the same data? predominately formatting. 10 uniquely formatted worksheet, within the same workbook. Each sheet have a date. the date in used to determine the financial year it belongs. that, is the most complex operation.

Or can the crashing run use a part of the code not run before? No. except for code introduced to fix bugs.

if i had to put money on where the issue is, each time i change the codes, i export it out to a git directory. usually followed by a 'save (green arrow in the IDE). 9 out of 10 times, its one of these operations, where things crash. The recovery works, but refreshed to last ‘auto backup’ state. Not always the 'export’ed equivalent.

As Basic is interpreted some code may only be used on special cases, but then always crash…
.
So I’d try to start to narrow down, where in your Basic-cade you crash, as you seem