Created attachment 122274 [details] Test database When a breakpoint is set in a BAsic Macro, the first time the routine is executed the breakpoint is ignored. This can be baffling at times. Open the attached database. Open the macros: Tools, Macros, Organise Macros, LibreOffice Basic Under testbreakpoint.odb, Standard, Module1 select the TestBreakpoint macro and Edit. Put a breakpoint on the line: oCodeRun.Text = "Code Run" Leave the Macro page open and go back to the BASE home page for this database and open the Table1 Form. Press the button marked 'Press'. Look at the Macro page - the breakpoint has not been executed, but the code has been, and the field below the Press button contains 'Code Run', proving that the macro has been executed without a breakpoint. Now press the button marked 'Press' again. Look at the Macro page - the breakpoint has been executed this time and code is halted.
I can confirm Version: 4.2.0.0.alpha1+ and Version: 5.2.0.0.alpha0+ Build ID: d1a49df6833ff16f5cbaf98534eaae62693e520b CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-29_02:01:58
*** Bug 104947 has been marked as a duplicate of this bug. ***
I see it already in OOo3.2.1
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
It still happens in: Version: 5.4.4.2 Build ID: 1:5.4.4~rc2-0ubuntu0.17.10.1~lo1 CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk2; Locale: en-GB (en_GB.UTF-8); Calc: group
The problem still exists in: Version: 6.1.4.2 Build ID: 1:6.1.4-0ubuntu0.18.10.1~lo1 CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: x11; Locale: en-GB (en_GB.UTF-8); Calc: group threaded I have retested both the example I provided, and another database. It's an irritating but small niggle.
https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=f853ec31#4220 Somehow static_cast<int>(nFlags) is 0 when the code fails to break, while in successful cases it's 1.
What I learned from I created with my own debug build, it seems: https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1160 https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/baside2.cxx?r=62f3f3d9#1297 https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/breakpoint.cxx?r=16da5e2c#73 https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1537 SbiRuntime is initialized here and set to pRun https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1010 https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1029 RunGuard's only use is as below https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1168 and at least to me, the following code is never run https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1538 ====== Mystery still remains in my mind, though. Why the breakpoints worked in the second run?
further logging suggested that this line creates pThisCopy(INSTANCE-1,just for later explanation) as another instance than *this(INSTANCE-2) https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#2100 Then pThisCopy is given to SbxHint constructor https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#2112 Later, at some point I cannot tell when, SbMethod::SetDebugFlags is called ,with static_cast<int>(n) being 1. https://opengrok.libreoffice.org/xref/core/include/basic/sbmeth.hxx?r=c02c4df9#60 probably *this in SetDebugFlags is referencing INSTANCE-1, not INSTANCE-2. mpBroadcaster = std::move(pSaveBroadcaster); mpBroadcaster->Broadcast( SbxHint( nHintId, pThisCopy ) ); SAL_INFO("basic",static_cast<int>(GetDebugFlags())); // INSTANCE-2 SAL_INFO("basic",static_cast<int>(pThisCopy->GetDebugFlags())); // INSTANCE-1 gave me 0 1 https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1160 this pMeth after the SbMethod::Broadcast call is , as the same as the one before the call, INSTANCE-2. INSTANCE-2 is used to initialize SbRuntime here as I mentioned in the previous post. https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=91937535#1168 I think this is somewhat related to this bug. Any thoughts?
Dear tim, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
I tried it, and the bug is, unfortunately, still present. Quite baffling. Version: 7.3.5.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-GB (en_GB.UTF-8); UI: en-GB Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1 Calc: threaded
I also tried it - it's still there. Version: 7.3.5.2 (x64) / LibreOffice Community Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01 CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: en-GB (en_GB); UI: en-GB Calc: threaded
The bug is still there in: Version: 24.2.5.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 12; OS: Linux 6.8; UI render: default; VCL: gtk3 Locale: en-GB (en_GB.UTF-8); UI: en-GB Ubuntu package version: 4:24.2.5~rc2-0ubuntu0.22.04.1~lo1 Calc: threaded