Bug 124413 - Crash on undo / redo in Basic IDE
Summary: Crash on undo / redo in Basic IDE
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.1.0.0.beta1+
Hardware: All All
: highest critical
Assignee: Noel Grandin
URL:
Whiteboard: target:6.3.0 target:6.2.4 target:6.1....
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2019-03-29 00:35 UTC by vatairethibault
Modified: 2019-07-13 20:28 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: ["TextUndoDelPara::Undo()"]


Attachments
bt with debug symbols (7.83 KB, text/plain)
2019-03-29 13:23 UTC, Julien Nabet
Details
Valgrind trace (73.63 KB, application/x-bzip)
2019-03-30 18:16 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vatairethibault 2019-03-29 00:35:52 UTC
Description:
LibreOffice crashes when some text is copied and pasted, and then paste is undo / redo several times.

Steps to Reproduce:
1. Open the Basic macros organizer and edit the module Module1 of the Standard library.
3. Select at least two lines in the module
4. Copy selected text and overwrite it with clipboard content with Paste command.
5. Cancel paste with undo keyboard shortcut or menu.
6. Restore paste with redo keyboard shortcut or menu.
7. Cancel paste with undo keyboard shortcut or menu.


Actual Results:
This leads to a crash of LibreOffice.

Expected Results:
LibreOffice should not crash.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
No crash if the text is cut instead of copied.
No crash if only a single line is copied and pasted.
Crashes only if copied text is pasted on itself.

Crash report : https://crashreport.libreoffice.org/stats/crash_details/8cd21ecb-da84-420d-b838-d8eacb36db85

Informations from 'Help - About LibreOffice' :
Version: 6.1.0.0.beta1
Build ID: 8c76dfe1284e211954c30f219b3a38dcdd82f8a0
Threads CPU : 1; OS : Linux 4.9; UI Render : par défaut; VCL: gtk2; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 1 Julien Nabet 2019-03-29 13:23:57 UTC
Created attachment 150396 [details]
bt with debug symbols

On Win10 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2019-03-30 18:16:07 UTC
Created attachment 150416 [details]
Valgrind trace

On pc Debian x86-64 with master sources updated today, I could reproduce this.
I attached Valgrind trace.
Comment 3 Xisco Faulí 2019-04-01 09:25:37 UTC
Reproduced in

Version: 6.3.0.0.alpha0+
Build ID: 107fd82751c35818152eabd45bdf882972d3c100
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 4 Xisco Faulí 2019-04-01 10:22:10 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=3a9d3f271c445641bebd057c4c91279f9b3cd7d5

author	Noel Grandin <noel.grandin@collabora.co.uk>	2018-04-23 09:38:41 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2018-04-26 11:14:17 +0200
commit 3a9d3f271c445641bebd057c4c91279f9b3cd7d5 (patch)
tree e87cb0e35a280aab30fd568d26fdab4ebd958286
parent 8d09602d3382596facd716d8261a83d6883aa734 (diff)
loplugin:useuniqueptr in TextDoc

Bisected with: bibisect-linux64-6.1

Adding Cc: to Noel Grandin

Increasing severity since this is reproducible in 6.1, 6.2 and master...
Comment 5 Commit Notification 2019-04-01 13:58:24 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/3ebdb97a305ada182af045ea6438432adfe74e80%5E%21

tdf#124413 Crash on undo / redo in Basic IDE

It will be available in 6.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.
Comment 6 Commit Notification 2019-04-01 15:43:03 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/4cddc97ad0488cf70dab9e9fc73f54f1f254631a%5E%21

tdf#124413 Crash on undo / redo in Basic IDE

It will be available in 6.2.4.

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.
Comment 7 Commit Notification 2019-04-01 20:21:32 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/e10083d6daef5fadc53734ef3dc85f4cce563640%5E%21

tdf#124413 Crash on undo / redo in Basic IDE

It will be available in 6.1.6.

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.
Comment 8 Xisco Faulí 2019-04-01 21:37:26 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 5f04be8d385f100d0775549cbdd7295cec1d1423
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Noel Gradin, thanks for fixing this issue!!
Comment 9 Commit Notification 2019-04-04 12:32:41 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-2-3":

https://git.libreoffice.org/core/+/0d66d95df3bf930926e888dfe8a8060d7c037d6e%5E%21

tdf#124413 Crash on undo / redo in Basic IDE

It will be available in 6.2.3.

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.
Comment 10 vatairethibault 2019-04-06 23:58:47 UTC
Verified in 

Version: 6.2.4.0.0+
Build ID: bf26bf309c580f153dd6ca965d12f7193ca32754
Threads CPU : 1; OS : Linux 4.9; UI Render : par défaut; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-2, Time: 2019-04-05_19:24:53
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 11 vatairethibault 2019-04-07 00:01:22 UTC
Still present in :

Version: 6.2.3.1
Build ID: 9ba025bafb03b962c34687cf87806cc03a3a7436
Threads CPU : 1; OS : Linux 4.9; UI Render : par défaut; VCL: gtk2; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 12 artur 2019-07-12 15:38:50 UTC
UI test proposal in https://gerrit.libreoffice.org/#/c/75485/
Comment 13 Commit Notification 2019-07-13 20:23:15 UTC
Artur Neumann committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/474fad31db327486b04b7223563633f183dc9152%5E%21

UI test for #tdf124413

It will be available in 6.4.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.