Bug 64925 - Crash on display/paste Arabic text
Summary: Crash on display/paste Arabic text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Windows (All)
: medium critical
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:4.2.0 target:4.1.0.1
Keywords: regression
Depends on:
Blocks: mab4.1
  Show dependency treegraph
 
Reported: 2013-05-23 16:26 UTC by Urmas
Modified: 2013-06-16 12:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Urmas 2013-05-23 16:26:32 UTC
Paste ست‌تر string from Notepad into Writer. Immediate crash.

Apparently inside msvcrt100!malloc. No useful stack trace was available.
Comment 1 Urmas 2013-05-23 16:44:21 UTC
Opening the document also causes similar crash. Working fine in 4.0.3.
Comment 2 retired 2013-05-31 08:40:56 UTC
on OS X 10.8.3 with LO 4.1b1 I cannot reproduce this problem. Can paste that string just fine.

Can someone with windows confirm this problem?
Comment 3 Jorendc 2013-05-31 11:58:27 UTC
Thanks for reporting Urmas!

I can reproduce this behavior using Windows 7 x64 with LibreOffice 4.1.0 beta 1.
Also reproducible using a more recent Version: 4.1.0.0.beta1
Build ID: 5271b34bec742e190e2fe5a7dadb7334a705b54

Kind regards,
Joren
Comment 4 Michael Meeks 2013-06-04 08:51:36 UTC
Looks nasty; any chance of a backtrace ? :-)
Comment 5 bfoman (inactive) 2013-06-10 11:48:59 UTC
(In reply to comment #4)
> Looks nasty; any chance of a backtrace ? :-)

As Visual Studio 2008 Express support was removed without any *really* good reason (http://nabble.documentfoundation.org/Dropping-support-for-Visual-Studio-2008-in-master-branch-tp4058471.html) and up-to-date debug builds are not available at http://dev-builds.libreoffice.org/win32-debug/msi/ I am unable to deliver backtraces with symbols anymore without upgrading my build env. I won't do it in a project where one developer can drop specific compiler support waiting just two days for comments. 
I can help again when this project will be delivering current Windows debug builds with symbols source. 
Please add download links when those will be available.
Comment 6 Michael Meeks 2013-06-10 12:25:33 UTC
Hi bfoman - I still see a number of commits to fix things up for Visual Studio Express versions. Clearly we need to drop 2008 at some stage - and move ahead to newer compilers, and maintaining lots of cruft for needlessly old stuff is an issue. Tor asked the list about that, and there was a time for response. Sorry if it causes grief for you - your work providing back-traces is greatly appreciated. Speaking of which would you like us to get you an MSDN subscription ? [ or is it mostly a matter of setup time ].

Thanks !
Comment 7 bfoman (inactive) 2013-06-10 15:04:36 UTC
(In reply to comment #6)
> Tor asked the list about that, and there was a time
> for response.

Well, this is no place to comment that such decision was introduced just two days after request for comments message, where no deadline to answer and reasoning were mentioned whatsoever. This should be an item on ESC meeting and no "oh, someone broke it, so instead of fixing, if you don't give me good reasons, I won't drop it" case.

(In reply to comment #6)
> Speaking of which would you like us to
> get you an MSDN subscription ? [ or is it mostly a matter of setup time ].

This is a matter of general attitude towards supporting Windows platform debug. It is easier to drop something, than to deliver. 
I do not need to get MSDN as VSE2010/12 is free software. I need master debug build with symbols delivered by TDF infra.
Comment 8 Michael Meeks 2013-06-11 08:14:13 UTC
> This should be an item on ESC meeting

Good point - I'm putting together the agenda now & this will be on it :-) thanks !
Comment 9 Michael Meeks 2013-06-15 12:28:01 UTC
I tried to get a trace - but no debuginfo; it looks like it crashes in writer - which is rather a pain.
Comment 10 Michael Meeks 2013-06-15 23:05:49 UTC
DrMemory shows:

~~Dr.M~~ Error #1: UNADDRESSABLE ACCESS: reading 0x00000004-0x00000008 4 byte(s)
~~Dr.M~~ # 0 swlo.dll!SwTxtFormatInfo::Init                  [e:\libo\sw\source\                               core\text\inftxt.cxx:1377]
~~Dr.M~~ # 1 swlo.dll!SwTxtFormatter::FeedInf                [e:\libo\sw\source\                               core\text\itrform2.cxx:1842]
~~Dr.M~~ # 2 swlo.dll!SwTxtFormatter::FormatReset            [e:\libo\sw\source\                               core\text\itrform2.cxx:1893]
~~Dr.M~~ # 3 swlo.dll!SwTxtFormatter::BuildMultiPortion      [e:\libo\sw\source\                               core\text\pormulti.cxx:1857]
~~Dr.M~~ # 4 swlo.dll!SwTxtFormatter::BuildPortions          [e:\libo\sw\source\                               core\text\itrform2.cxx:551]
~~Dr.M~~ # 5 swlo.dll!SwTxtFormatter::FormatLine             [e:\libo\sw\source\                               core\text\itrform2.cxx:1538]
~~Dr.M~~ # 6 swlo.dll!SwTxtFrm::FormatLine                   [e:\libo\sw\source\                               core\text\frmform.cxx:1117]
~~Dr.M~~ # 7 swlo.dll!SwTxtFrm::_Format                      [e:\libo\sw\source\                               core\text\frmform.cxx:1479]
~~Dr.M~~ # 8 swlo.dll!SwTxtFrm::_Format                      [e:\libo\sw\source\                               core\text\frmform.cxx:1653]
~~Dr.M~~ # 9 swlo.dll!SwTxtFrm::Format                       [e:\libo\sw\source\                               core\text\frmform.cxx:1804]
~~Dr.M~~ #10 swlo.dll!SwCntntFrm::MakeAll                    [e:\libo\sw\source\                               core\layout\calcmove.cxx:1383]
~~Dr.M~~ #11 swlo.dll!SwFrm::OptPrepareMake                  [e:\libo\sw\source\                               core\layout\calcmove.cxx:381]
~~Dr.M~~ Note: @0:01:09.748 in thread 3604
~~Dr.M~~ Note: instruction: mov    0x04(%eax) -> %eax
Comment 11 Michael Meeks 2013-06-16 10:29:32 UTC
Fixed - many thanks to Michael Stahl :-)
Comment 12 Commit Notification 2013-06-16 10:32:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#64925 - fix crash on paste of Arabic text on windows.



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 Lior Kaplan 2013-06-16 10:35:49 UTC
Is thins text only in Arabic or RTL languages in general ?
Comment 14 Commit Notification 2013-06-16 10:40:36 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b5c5ec048fa88886370d2e1455b2c23700aeac66&h=libreoffice-4-1

fdo#64925 - fix crash on paste of Arabic text on windows.


It will be available in LibreOffice 4.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 15 Michael Stahl (allotropia) 2013-06-16 12:27:08 UTC
re comment #13: there are probably other cases that crash; anything that creates a SwMultiPortion can crash (ruby, combined characters, double-line, rotated text, ...)