Bug 108722 - MAILMERGE: Assertion failed when editing address block (debug build)
Summary: MAILMERGE: Assertion failed when editing address block (debug build)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:6.0.0 target:5.4.2
Keywords: regression
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2017-06-23 18:05 UTC by Gabor Kelemen (allotropia)
Modified: 2017-09-14 15:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
How I made it crash. (329.87 KB, image/png)
2017-06-23 19:27 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2017-06-23 18:05:24 UTC
1, Start the Mail Merge Wizard, select Letter type on the second page.
2, On the third page enable address block, then push the More button.
3, In the Select Address Block window press Edit on any existing address block.
4, In the Edit Address Block window click in the "Drag address elements here" field, and start deleting into an address block element like <Title> (Apparently this is possible, although it makes no sense to me.)
5, Once you reach the starting < with the cursor, LO crashes. On the terminal, I see this output:

warn:legacy.osl:23462:1:sw/source/uibase/dbui/mailmergehelper.cxx:559: closing '>' not found
warn:legacy.osl:23462:1:sw/source/uibase/dbui/mailmergehelper.cxx:559: closing '>' not found
warn:legacy.osl:23462:1:sw/source/uibase/dbui/mailmergehelper.cxx:559: closing '>' not found
warn:legacy.osl:23462:1:sw/source/uibase/dbui/mailmergehelper.cxx:559: closing '>' not found
warn:legacy.osl:23462:1:sw/source/uibase/dbui/mailmergehelper.cxx:559: closing '>' not found
warn:legacy.osl:23462:1:sw/source/uibase/dbui/mailmergehelper.cxx:559: closing '>' not found
soffice.bin: /home/gabor/src/core/sal/rtl/strtmpl.cxx:1399: void rtl_uString_newFromSubString(rtl_uString**, const rtl_uString*, sal_Int32, sal_Int32): Assertion `false' failed.
warn:desktop:23462:1:desktop/source/app/sofficemain.cxx:83: minidump generated: /home/gabor/src/core/instdir/program/../program/../crash//014aa834-81f2-8125-13645546-46fa9470.dmp

I see this in a current-ish master build, but not in 5.3.3.2 (from the official PPA) on Ubuntu 14.04.
Comment 1 Xisco Faulí 2017-06-23 19:10:15 UTC
> 4, In the Edit Address Block window click in the "Drag address elements
> here" field, and start deleting into an address block element like <Title>
> (Apparently this is possible, although it makes no sense to me.)
> 5, Once you reach the starting < with the cursor, LO crashes. On the
> terminal, I see this output:

If you delete the field, how do you move the cursor to the starting < ?
I don't understand the steps described. Could you please elaborate them a bit more or even better, create a screencast?
Comment 2 Gabor Kelemen (allotropia) 2017-06-23 19:26:36 UTC
So, usually it allows you to delete a full field if you click *on* it.
But if you click at the end of the line or between the tags to the whitespace, you can actually delete _into_ the tags, so you can go like:
<Title>
<Title
<Titl
and so on. Once you reach the starting <, it crashes.
Comment 3 Gabor Kelemen (allotropia) 2017-06-23 19:27:17 UTC
Created attachment 134235 [details]
How I made it crash.
Comment 4 Xisco Faulí 2017-06-23 19:53:26 UTC
it seems only GTK2 allows to delete text using the backspace. However I can't reproduce it in

Versió: 6.0.0.0.alpha0+
ID de la construcció: 08f6f9dded1b142b858c455da03319abac691655
Fils de CPU: 4; Versió de SO: Linux 4.8; Renderitzador de la IU: per defecte; VCL: gtk2; 
Configuració local: ca-ES (ca_ES.UTF-8); Calc: group

Could you please reset your Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and re-test?
Comment 5 Gabor Kelemen (allotropia) 2017-06-26 21:14:07 UTC
I tried to reset the profile, but it still happens - although not always.
I was told by Aron to mention that this happens in a debug build.
Comment 6 Aron Budea 2017-06-26 21:20:31 UTC
Reproduced with a recent master debug build on Windows 7. I couldn't delete with backspace, had to use delete key.
Comment 7 Xisco Faulí 2017-06-27 00:27:04 UTC
I can reproduce it in

Version: 4.4.0.0.alpha2+
Build ID: d273a60bfdbf9bb7623bed38667ec0647753157c
Locale: ca_ES

but not in

Version: 4.2.0.0.alpha0+
Build ID: 6e2ff4edb2aae441142280ef31286f4627347fb

using the lo-linux-dbgutil-daily-tillXX repositories
Comment 8 Michael Stahl (allotropia) 2017-09-08 21:11:16 UTC
the VCL text editing widget has some bugs with handling
the TEXTATTR_PROTECTED attribute that magically extends
selections; apparently this is the only dialog in LO
that uses this feature.

hopefully fixed on master

no idea why "gtk" does something on Delete/Backspace
but "gtk3" etc. don't.
Comment 9 Commit Notification 2017-09-08 21:11:34 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#108722 vcl: fix bugs in TextEngine with TEXTATTR_PROTECTED

It will be available in 6.0.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 10 Commit Notification 2017-09-14 15:59:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=96136c55a1fb5da6da2042bbfaa2f4e9aeb7938f&h=libreoffice-5-4

tdf#108722 vcl: fix bugs in TextEngine with TEXTATTR_PROTECTED

It will be available in 5.4.2.

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.