Bug 104032 - Pasting single FORMCHECKBOX and undoing then redoing gives !!br0ken!! in release builds, asserts in debug builds
Summary: Pasting single FORMCHECKBOX and undoing then redoing gives !!br0ken!! in rele...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on: 95699
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-19 16:17 UTC by Mike Kaganski
Modified: 2018-04-10 08:59 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Test file with FORMCHECKBOX (8.76 KB, application/vnd.oasis.opendocument.text)
2016-11-19 16:17 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2016-11-19 16:17:49 UTC
Created attachment 128874 [details]
Test file with FORMCHECKBOX

This bug may be reproduced with the fix for bug 95699.

Pasting single FORMCHECKBOX and undoing then redoing gives !!br0ken!! in release builds, asserts in debug builds

To reproduce:
1. Open the attached document
2. Select the checkbox *only* (without newline), e.g. by putting the cursor to the end of the first line and using Shift+LeftArrow
3. Copy the checkbox to clipboard (Ctrl+C)
4. Go to second line (Ctrl+End) and paste (Ctrl+V)
5. Undo (Ctrl+Z)
6. Redo (Ctrl+Y)

Expected result: the checkbox added on step 4 should disappear on step 5, then reappear at step 6

Actual result: in release build, on step 6 "!!br0ken!!" appears instead of checkbox; in debug build, at step 5, an assertion is triggered.

It's difficult to trace when the problem first appeared, because it's masked by bug 95699.
Comment 1 Mike Kaganski 2016-11-19 16:23:12 UTC
A patch is submitted for review: https://gerrit.libreoffice.org/30980
Comment 2 Commit Notification 2016-11-25 18:25:26 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7c43cba9804e70b23b71783d362401c75f9caa54

tdf#104032: use correct text length

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