Bug 118609 - [CRASH] [Basic] [Calc] on closing a file if open hidden and if a particular subroutine is used before closing
Summary: [CRASH] [Basic] [Calc] on closing a file if open hidden and if a particular s...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.0.5.1 rc
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.0.7 target:6.1.1 target:6.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-07-07 14:24 UTC by Michel Rudelle
Modified: 2018-08-20 11:36 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["ScInputHandler::EnterHandler(ScEnterMode)"]


Attachments
spreadsheet including the 3 test programs (14.73 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-07-07 14:24 UTC, Michel Rudelle
Details
csv data file to open with the test spreadsheet (14.71 KB, application/vnd.ms-excel)
2018-07-07 14:27 UTC, Michel Rudelle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Rudelle 2018-07-07 14:24:47 UTC
Created attachment 143377 [details]
spreadsheet including the 3 test programs

Hi,
Here's how to reproduce the issue:
Use the attached spreadsheet and data file
Launch successively the 3 programs Test 1; Test 2; Test 3
These 3 simple programs open the csv file and end by closing it. The conditions of each test are: 

Test 1:
- open csv file hidden
- use of the SelecTout subroutine (search for the data scope of the open csv file)
Test 2:
- open csv file not hidden
- use of the SelecTout subroutine
Test 3:
- open csv file hidden
- no use of the SelecTout subroutine 

Observations:
With LibreOffice version 5.4.7.2 under Windows 7:
- no crash for the 3 tests
With LibreOffice version 6.0.5.2 under Windows 7:
- crash for test 1 at closing (after displaying the message of the number of rows and columns)
- no crash for tests 2 and 3

Also observed on French list qa under Linux 
 
Thank you for your attention to this issue.
Comment 1 Michel Rudelle 2018-07-07 14:27:55 UTC
Created attachment 143378 [details]
csv data file to open with the test spreadsheet
Comment 2 Laurent Balland 2018-07-07 14:51:32 UTC
I can confirm crash with Version: 6.0.5.1
Build ID: 0588a1cb9a40c4a6a029e1d442a2b9767d612751
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group

Set as new
Comment 3 Laurent Balland 2018-07-07 14:58:17 UTC
I confirm, no crash with Version: 5.4.7.2
Build ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group

Set as Regression
Comment 4 himajin100000 2018-07-07 14:59:02 UTC
can you try the steps with 6.2 NIGHTLY BUILDS with a NEW PROFILE?

https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/

there was a post to ja-discuss regarding similar issue.
 
http://document-foundation-mail-archive.969070.n3.nabble.com/Re-ja-discuss-tc4240217.html#none

I was able to reproduce the issue too with the nightly builds, but since the profile reset, the issue has gone.
Comment 5 Laurent Balland 2018-07-07 15:18:33 UTC
Bibisection result: 132325b3f3a4e1925b12214a32e8f25fed914515 is the first bad commit
commit 132325b3f3a4e1925b12214a32e8f25fed914515
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Oct 3 00:51:08 2017 +0200

    source 6388a50c1e3ef2e25132f63547bb91d08a0f416c
    
    source 6388a50c1e3ef2e25132f63547bb91d08a0f416c

:040000 040000 47b8d4e74f0765408c78196cd93003eb30c8e98d 0b7e50f9d8bf5c690cc9eb0f23e346c95b83dcd0 M	instdir
Comment 7 Michel Rudelle 2018-07-07 15:40:04 UTC
(In reply to himajin100000 from comment #4)
> can you try the steps with 6.2 NIGHTLY BUILDS with a NEW PROFILE?
> 
> https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/
> 
> I was able to reproduce the issue too with the nightly builds, but since the
> profile reset, the issue has gone.

Tested under windoow 7 (with a new profile):
Version: 6.2.0.0.alpha0+ (x64)
Build ID: 2986f4baa8bdef1f9ab9108240ea890075321be1
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-07-06_23:43:30
Locale: fr-FR (fr_FR); Calc: group threaded

The crash is still present
Comment 8 Xisco Faulí 2018-07-08 12:20:48 UTC
(In reply to Laurent BP from comment #6)
> Suspected commit:
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=6388a50c1e3ef2e25132f63547bb91d08a0f416c
> 
> CC Marco

Indeed! Regression introduced by:

author	Marco Cecchetti <marco.cecchetti@collabora.com>	2017-04-19 22:37:13 +0200
committer	Marco Cecchetti <mrcekets@gmail.com>	2017-10-02 18:42:57 +0200
commit 6388a50c1e3ef2e25132f63547bb91d08a0f416c (patch)
tree e9eccab1f95b42eed7feb7bbb3e50ec912290678
parent b9e89a201064b0c0aef5769766bce8d995fed46d (diff)
lok: sc: overlays and edit view misplaced by other view actions
The edit view, the cell cursor and the cell selection overlays become
misplaced when another user inserts, deletes or resizes a row.

The same is true for columns.

The solution takes care of the current tab each view is
displaying and of undo/redo actions.

Bisected with: bibisect-linux64-6.0

Adding Cc: to Marco Cecchetti
Comment 9 Caolán McNamara 2018-08-15 08:10:37 UTC
I have a fix for this
Comment 10 Commit Notification 2018-08-15 12:10:51 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d1ce7f60c7ce7721a41093bebcbe7e87cb800688&h=libreoffice-6-0

Resolves: tdf#118609 crash in calc after some manipulation through basic

It will be available in 6.0.7.

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.
Comment 11 Commit Notification 2018-08-15 12:11:01 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=20b9dad2e881a743172559a29b66d30ca6ecbf6a&h=libreoffice-6-1

Resolves: tdf#118609 crash in calc after some manipulation through basic

It will be available in 6.1.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.
Comment 12 Commit Notification 2018-08-15 12:59:47 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=94f99ad38238f223b6fbed252e099581e0090e65

Resolves: tdf#118609 crash in calc after some manipulation through basic

It will be available in 6.2.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.
Comment 13 Michel Rudelle 2018-08-18 14:56:40 UTC
The bug is fixed, thank you.
Tested with:
Version: 6.1.1.0.0+ (x64)
Build ID: 30c178dcb3301527ad92bbd245d1525ab77e314e
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-1, Time: 2018-08-17_05:06:39
Locale: fr-FR (fr_FR); Calc: group threaded
Comment 14 Xisco Faulí 2018-08-20 11:36:35 UTC
(In reply to Michel Rudelle from comment #13)
> The bug is fixed, thank you.
> Tested with:
> Version: 6.1.1.0.0+ (x64)
> Build ID: 30c178dcb3301527ad92bbd245d1525ab77e314e
> CPU threads: 2; OS: Windows 6.1; UI render: default; 
> TinderBox: Win-x86_64@42, Branch:libreoffice-6-1, Time: 2018-08-17_05:06:39
> Locale: fr-FR (fr_FR); Calc: group threaded

Thanks for verifying it!