Created attachment 104533 [details] demonstration document Form1 grid macro crash bug - need to enable macros This is a form/subform/grid crash problem when any macro is called when a grid subform column loses focus. In LO Base 1. Create form 2. Create subform 3. Create grid on subform 4. Add columns to grid 5. Add macro/LO Basic call to grid columns on event "when losing focus" 6. Does not matter what the macro actually is. In the attached demonstration, the macro is a single comment 'REM' line. This form (demo attached) will cause applications crashes in the following situations: 1. Open the form in edit mode 2. Click the "design mode on/off" button. Now design mode is off. 3. Put the cursor on one of the grid columns with the macro called "when losing focus" In the sample, that is any of the columns in the grid. 4. Click the "design mode on/off" button. ACTUAL RESULT: Application crash. 1. Change the property of the subform --> Data --> Navigation Bar --> Parent Form (the sample already has this property set) 2. Open the form in regular mode. 2. Put the cursor on one of the grid columns with the macro called "when losing focus" (in the sample, this is any grid colum) 3. Click the parent form navigation arrow to go to the next parent record. ACTUAL RESULT: Application crash As noted, the macro is just a comment 'REM' line, so the crash is the result of simply calling the macro in the LO form. The crash cannot be caused by the LO Basic code, which is just a comment 'REM' line (although I have used other code in the same place, with the same result).
Actually, the application crashes even if security setting prevent macros from running. Crash occurs in OpenSuse/LO 4.1.6.2 and Windows7/LO 4.3.0.4
I could confirm the buggy behavior. Open the document. You could chose "Enable Macros" or "Disable Macros" (Macro-Security Medium): no difference. Open the form. Set the cursor in the tablecontrol (tablecontrol is in the subfrom - no fields of the mainform were shown). Go to the navigationbar, which shows the rows of the mainform. Press an arrow to change the row. LO crashes immediately. Works in LO 330beta2, first appears in LO 330beta3 - so a regression. Tested with OpenSUSE 12.3 64bit rpm Linux. If you remove the connection to the macro in every column of the tablecontrol it works in all other versions. But why should a connection to a macro create a crash, when executing of macros is disabled? Don't know.
Adding Whiteboard:preBibisect If this is a regression from all the way back in 3.3, it unfortunately can't be bibisected. Given the quite narrow range given for its first appearance, possibly reading the commit logs may shed some light
Adding self to CC if not already on
Created attachment 112774 [details] bt with debug symbols On pc Debian x86-64 with master sources updated yesterday (5d47b83cef0b2d0486162989722b23e53eb0cdb1), I could reproduce this. I attached a bt.
Lionel: thought you might be interested in this one (I updated master sources yesterday, see my previous comment).
Migrating Whiteboard tags to Keywords: (preBibisect) [NinjaEdit]
I can't reproduce the crash with LO 5.1.3.0.0+ and the master. Please test again. Best regards. JBF
This refuses to crash for me in any version, but a good number of confirmation here. Odd
Created attachment 125692 [details] got something under valgrind
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e841ed93d6c6d817be1f7fdc18ff971325c861cc Resolves: tdf#82532 parent mutex dtored before child dtor uses it It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1c0d1199fe02666de0d162f071ce7e6e812a23df&h=libreoffice-5-2 Resolves: tdf#82532 parent mutex dtored before child dtor uses it It will be available in 5.2.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=51192fa69388df69a7a5d8f03fec53de61b69050&h=libreoffice-5-1 Resolves: tdf#82532 parent mutex dtored before child dtor uses it It will be available in 5.1.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.