@Ratslinger Thank you for looking into this.
The listener I was using was com.sun.star.view.XSelectionChangeListener invoked from com.sun.star.sheet.Spreadsheetview.
I’m going to test it some more over the weekend, when I get a little bit of free time. As a matter of fact I’ll try the XModifyListener for a specific cell as well, so that we are comparing apples to apples. For now, unfortunately I have to abide by house rules, otherwise I may end up being a subject of a selection change myself ;-).
Nevertheless, I noticed this already on several occasions in the last few weeks. It was consistently the same type of behavior; once I walked away for an extended period of time and then came back to a computer in suspended state, the listener still worked after “waking it back up” and logging back in, but I could not address the global variable when attempting to disable it. Whereas, otherwise I could engage it and disengage it as I pleased.
My current configuration is as follows:
Version: 7.3.0.3 (x64) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 16; OS: Windows 10.0 Build 22000; UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-US
Calc: threaded