Bug 105103 - typing after hitting 'Insert' key crashes LO with assertion failed (dbg build)
Summary: typing after hitting 'Insert' key crashes LO with assertion failed (dbg build)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0 target:5.3.7
Keywords:
: 101740 (view as bug list)
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2017-01-04 16:17 UTC by Pranav Kant
Modified: 2017-09-01 11:57 UTC (History)
4 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 Pranav Kant 2017-01-04 16:17:58 UTC
Steps:

1) Open a new writer document
2) Hit 'Insert' key
3) Start typing, upon hitting 'Space', crashes.
Comment 1 Pranav Kant 2017-01-04 16:18:40 UTC
Happens only in debug builds as above mentioned steps hits an assert.

Backtrace -

(gdb) bt
#0  0x00007ffff3b2de55 in raise () at /lib64/libc.so.6
#1  0x00007ffff3b2fa5a in abort () at /lib64/libc.so.6
#2  0x00007ffff3b266f7 in __assert_fail_base () at /lib64/libc.so.6
#3  0x00007ffff3b267a2 in  () at /lib64/libc.so.6
#4  0x00007fffb2886e0b in rtl::OUString::operator[](int) const (this=0x7fffb1cd81a0, index=529) at /home/pranavk/office/cp-5.1/include/rtl/ustring.hxx:541
#5  0x00007fffb2b66c62 in SwAutoCorrDoc::ReplaceRange(int, int, rtl::OUString const&) (this=0x7fffbe4fd290, nPos=529, nSourceLength=1, rText=...)
    at /home/pranavk/office/cp-5.1/sw/source/core/edit/acorrect.cxx:169
#6  0x00007fffb2b66b3f in SwAutoCorrDoc::Replace(int, rtl::OUString const&) (this=0x7fffbe4fd290, nPos=529, rText=...) at /home/pranavk/office/cp-5.1/sw/source/core/edit/acorrect.cxx:146
#7  0x00007fffd79bc715 in SvxAutoCorrect::DoAutoCorrect(SvxAutoCorrDoc&, rtl::OUString const&, int, char16_t, bool, vcl::Window*) (this=0x7fffac0ae2b0, rDoc=..., rTxt=..., nInsPos=529, cChar=32 u' ', bInsert=false, pFrameWin=0x7fffac12abb0) at /home/pranavk/office/cp-5.1/editeng/source/misc/svxacorr.cxx:1249
#8  0x00007fffb2ba8cb7 in SwEditShell::AutoCorrect(SvxAutoCorrect&, bool, char16_t) (this=0x7fffac1d5bc0, rACorr=..., bInsert=false, cChar=32 u' ')
    at /home/pranavk/office/cp-5.1/sw/source/core/edit/edws.cxx:259
#9  0x00007fffb34de303 in SwWrtShell::AutoCorrect(SvxAutoCorrect&, char16_t) (this=0x7fffac1d5bc0, rACorr=..., cChar=32 u' ') at /home/pranavk/office/cp-5.1/sw/source/uibase/wrtsh/wrtsh1.cxx:1620
#10 0x00007fffb32e31d6 in SwEditWin::KeyInput(KeyEvent const&) (this=0x7fffac12abb0, rKEvt=...) at /home/pranavk/office/cp-5.1/sw/source/uibase/docvw/edtwin.cxx:2475
#11 0x00007fffb346b71c in SwXTextDocument::postKeyEvent(int, int, int) (this=0x7fffc57be508, nType=0, nCharCode=32, nKeyCode=0) at /home/pranavk/office/cp-5.1/sw/source/uibase/uno/unotxdoc.cxx:3298
#12 0x00007fffdd98177e in doc_postKeyEvent(LibreOfficeKitDocument*, int, int, int) (pThis=0x7fffaee40ca0, nType=0, nCharCode=32, nKeyCode=0) at /home/pranavk/office/cp-5.1/desktop/source/lib/init.cxx:1778
#13 0x00007ffff477920e in postKeyEventInThread(gpointer) (data=0x7fffb8004500) at /home/pranavk/office/cp-5.1/libreofficekit/source/gtk/lokdocview.cxx:697
#14 0x00007ffff478327a in lokThreadFunc(gpointer, gpointer) (data=0x7fffb8004500) at /home/pranavk/office/cp-5.1/libreofficekit/source/gtk/lokdocview.cxx:2409
#15 0x00007ffff5d00735 in g_thread_pool_thread_proxy () at /lib64/libglib-2.0.so.0
#16 0x00007ffff5cffd38 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#17 0x00007ffff49ce5ba in start_thread () at /lib64/libpthread.so.0
#18 0x00007ffff3bfc7cd in clone () at /lib64/libc.so.6
Comment 2 Pranav Kant 2017-01-04 16:19:24 UTC
Above stack trace is not for master, but it is reproducible on master too.
Comment 3 Aron Budea 2017-01-04 16:41:47 UTC
Reproduced with 5.4 master build (Build ID: 0b21f2964a057412304cf06da4c78fda07647011) / Ubuntu 16.04.
Comment 4 Pranav Kant 2017-01-09 05:51:08 UTC
FWIW, can notice this on 

LibreOfficeDev 4.4.0.0.alpha2 d273a60bfdbf9bb7623bed38667ec0647753157c

too.
Comment 5 Aron Budea 2017-01-09 11:54:27 UTC
Adjusting version field. Also, there's no crash in Windows with a debug build, so updating OS field.
Comment 6 Commit Notification 2017-01-30 12:28:15 UTC
Pranav Kant committed a patch related to this issue.
It has been pushed to "master":

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

tdf#105103 assertion failure crash

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.
Comment 7 Michael Stahl (allotropia) 2017-09-01 11:14:18 UTC
*** Bug 101740 has been marked as a duplicate of this bug. ***
Comment 8 Commit Notification 2017-09-01 11:57:33 UTC
Pranav Kant committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f55b8571f3bd4b8b04004c2e0dd2017876207f97&h=libreoffice-5-3

tdf#105103 assertion failure crash

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