Description: LO calc crashes reproducibly when a protected cell is attempted to be changed using the mouse at the *second* attempt (not the first!) Steps to Reproduce: 1. Open the attached document with LibreOffice 7.2.0.4 (x64) 2. Position cursor on cell A1 3. Mouse-click in the field where you usually enter formulas 4. Observe the correct message "Protected cells can not be modified." 5. Repeat step 3 (click with mouse use on formula entry) 6. LO crashes Actual Results: Crash Expected Results: No crash, just show the correct error message "Protected cells can not be modified." Reproducible: Always User Profile Reset: No Additional Info: No crash, just show "Protected cells can not be modified." instead
Created attachment 174886 [details] Test file for bug 144376
Crash report shows EXCEPTION_ACCESS_VIOLATION_READ in EditEngine::GetText(LineEnd)
Repro using current master. In ScInputHandler::InputChanged, the call to DataChanging frees the EditView that is passed in pView. Then pView is dereferenced. Caolan: do you have an idea what to do here?
Certainly focus related, and it seems only on windows does that QueryCharPosition get sent on getting focus which falls into that command-handling case which seems to trigger the ScInputWindow into that path where it deletes the EditView. I think the expectation is that focus shouldn't be possible to put into it on the 2nd click.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c36fff84afb7eaa05fa065e15009c9426a5af44e Resolves: tdf#144376 focus into protected ScTextWnd shouldn't be possible It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Works for me on trunk, backports in gerrit
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/76bb5cb8578bdfe50ce6bef307e628037d938a94 Resolves: tdf#144376 focus into protected ScTextWnd shouldn't be possible It will be available in 7.2.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://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-7-1": https://git.libreoffice.org/core/commit/65fb647b3b95ebc6023b6e02c5fc2a130842eac7 Resolves: tdf#144376 focus into protected ScTextWnd shouldn't be possible It will be available in 7.1.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.