Bug 93536 - Crash when launching Tools > AutoText (comment 6)
Summary: Crash when launching Tools > AutoText (comment 6)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.0.2
Keywords: regression
: 93667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-19 15:18 UTC by Laurent Balland
Modified: 2016-10-25 19:23 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
first bt (42.79 KB, text/plain)
2015-08-20 18:31 UTC, Maxim Monastirsky
Details
second bt (37.68 KB, text/plain)
2015-08-20 18:31 UTC, Maxim Monastirsky
Details
bt with debug symbols (5.25 KB, text/plain)
2015-08-29 13:26 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2015-08-19 15:18:30 UTC
Steps to reproduce:

1. Create a new text document
2. Type dt (for AutoText Dummy Text)
3. F3

Actual behavior:
Crash

Console output:
** (soffice:2683): WARNING **: Unknown event notification 36
warn:legacy.osl:2683:1:sw/source/core/doc/DocumentListsManager.cxx:96: <DocumentListsManager::createListForListStyle(..)> - a list for the provided list style name already exists. Serious defect -> please inform OD.
soffice.bin: /home/ballalau/devLibO/libo/include/com/sun/star/uno/Reference.h:402: interface_type* com::sun::star::uno::Reference<interface_type>::operator->() const [with interface_type = com::sun::star::datatransfer::XTransferable]: Assertion `_pInterface != 0' failed.

If you type an AutoText that does not exist, you get an error message (correct behavior).
Comment 1 Jan 2015-08-19 15:29:25 UTC
Does not happen in 4.2.8.2. Marking as regression.
Comment 2 tommy27 2015-08-19 18:17:38 UTC
no crash under Win8.1 x64 using LibO 5.1.0.0.alpha1+
Build ID: 7d3fa6bae9f7a755eb2d0ca24bf1afd5f3646bb7
TinderBox: Win-x86@39, Branch:master, Time: 2015-08-09_08:38:08
Locale: it-IT (it_IT)

@Laurent BP
would you please your O/S and your LibO 5.1.0.o alpha details?
Comment 3 Julien Nabet 2015-08-19 19:49:23 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.
Comment 4 tommy27 2015-08-20 12:33:12 UTC
@Laurent BP
please retest with a new 5.1 alpha build and tell your exact Linux version.
Comment 5 Laurent Balland 2015-08-20 16:17:10 UTC
I reproduce with fresh master and new profile on OpenSuse 13.2
Version: 5.1.0.0.alpha1+
Build ID: fb2ad7ce2d201d9d2504274ad7e1bd0e803d9902
Locale: fr-FR (fr_FR.UTF-8)
Comment 6 Laurent Balland 2015-08-20 16:37:56 UTC
Tools > AutoText crash also immediately.
Console output:
warn:legacy.osl:12450:1:include/cppuhelper/interfacecontainer.h:479: object is disposed
warn:legacy.osl:12450:1:include/cppuhelper/interfacecontainer.h:479: object is disposed
warn:fwk:12450:1:framework/source/fwi/threadhelp/transactionmanager.cxx:265: TransactionManager...: Owner instance stand in close method. Call was rejected!
warn:legacy.osl:12450:1:include/cppuhelper/interfacecontainer.h:479: object is disposed
warn:legacy.osl:12450:1:include/cppuhelper/interfacecontainer.h:479: object is disposed
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Hmm, seems to be a different one.

Nobody can reproduce?
Comment 7 Maxim Monastirsky 2015-08-20 18:27:18 UTC
(In reply to Laurent BP from comment #0)
> Steps to reproduce:
> 
> 1. Create a new text document
> 2. Type dt (for AutoText Dummy Text)
> 3. F3
> 
> Actual behavior:
> Crash
Can't reproduce under Fedora 22 (64-bit) with today's master (from 6cbdaed5b27e803be7b6190ca3f92698c48ac6e9)

(In reply to Laurent BP from comment #6)
> Tools > AutoText crash also immediately.
Confirmed with the same build. I see there actually 2 bugs:

1) First it throws UnknownPropertyException for "HideWhitespace". This exception isn't handled by anything except the main handler, so it makes LO show an error message and close. This is related to the patches in Bug 39080. I guess that's because one of the patches wasn't merged yet (see the details there).

2) Next it SIGSEGVs (seems unrelated to the above problem).

I'll attach bt for both problems.

> Hmm, seems to be a different one.
Indeed. Maybe would be better to handle it in a different thread then?
Comment 8 Maxim Monastirsky 2015-08-20 18:31:06 UTC
Created attachment 118049 [details]
first bt
Comment 9 Maxim Monastirsky 2015-08-20 18:31:34 UTC
Created attachment 118050 [details]
second bt
Comment 10 Laurent Balland 2015-08-21 13:06:55 UTC
I've cherry picked commit
https://gerrit.libreoffice.org/17281/
which fixes bug 39080

then no more crash with Tools > AutoText

However, still crashing with dt+F3

I will wait till commit is merged, and then mark this one as fixed.
I will open a new bug report for dt+F3
Comment 11 Maxim Monastirsky 2015-08-25 18:59:08 UTC
*** Bug 93667 has been marked as a duplicate of this bug. ***
Comment 12 Laurent Balland 2015-08-25 20:24:46 UTC
For initial bug of comment 0, I cannot reproduce with a nightly master
Version: 5.1.0.0.alpha1+
Build ID: 5a2d6bf3a94f127307d6a9464033b2226508ff38
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-08-21_06:31:09
Locale: fr-FR (fr_FR.UTF-8)
So there must be a pb with my build.

Change title accordingly. Only menu entry Tools > AutoText crashes
Comment 13 Julien Nabet 2015-08-29 13:26:22 UTC
Created attachment 118257 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I reproduced the crash with
Menu Tools/Autotext

With F3 (different from the shortcut Ctrl-F3 indicated in menu!), I've got only a popup telling:
Autotext for Shortcut '' not found.
Comment 14 Julien Nabet 2015-08-29 13:30:22 UTC
Michael: thought it might be related to vclPtr, do you confirm?

BTW, with export SAL_USE_VCLPLUGIN=gen , I've also got a crash but with:
warn:legacy.tools:8230:1:vcl/source/window/dialog.cxx:816: Dialog::StartExecuteModal() - Parent already modally disabled, use another parent to ensure modality!
Comment 15 Laurent Balland 2015-08-29 15:20:03 UTC
(In reply to Julien Nabet from comment #13)
> With F3 (different from the shortcut Ctrl-F3 indicated in menu!), I've got
> only a popup telling:
> Autotext for Shortcut '' not found.
Ctrl+F3 should launch AutoText dialog (Tools > AutoText or Edit > AutoText in all versions up to 5.0.x).
If you type the name of an autotext already defined (for instance dt or fn or lorem), then hit F3, you get the autotext. If you hit F3 without character before cursor, then LibO looks for an autotext named '' which does not exist and it tells you that it can not find it. So it is working as expected.
Comment 16 Maxim Monastirsky 2015-08-29 20:24:21 UTC
(In reply to Julien Nabet from comment #14)
> Michael: thought it might be related to vclPtr, do you confirm?
Like I explained in comment 7, we have here 2 problems. The first one isn't related to VclPtr. But the second one could be indeed related.
Comment 17 Laurent Balland 2015-08-29 21:06:08 UTC
In comment 10, I indicated that commit
https://gerrit.libreoffice.org/17281/
is fixing this crash. This commit is still under review. We just need to wait that Ashod finishes his patch, and test again when it will be merged.
Comment 18 Maxim Monastirsky 2015-08-29 21:14:54 UTC
(In reply to Laurent BP from comment #17)
> In comment 10, I indicated that commit
> https://gerrit.libreoffice.org/17281/
> is fixing this crash.
Not exactly. That commit only makes the code with the crash to not execute, so that crash could still show itself in other places.
Comment 19 Commit Notification 2015-08-29 22:41:23 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

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

tdf#93536 - avoid crash when calling ToTop on disposed window.

It will be available in 5.1.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 20 Michael Meeks 2015-08-29 22:44:38 UTC
Patch for the 2nd crash above - which is a vclptr issue in this commit:
https://gerrit.libreoffice.org/18136 rubber stamp appreciated etc. =)
Comment 21 Commit Notification 2015-08-30 10:39:38 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=18d447443d160c40d42621644b557eecc42ee765&h=libreoffice-5-0

tdf#93536 - avoid crash when calling ToTop on disposed window.

It will be available in 5.0.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.
Comment 22 Maxim Monastirsky 2015-08-30 10:50:01 UTC
(In reply to Michael Meeks from comment #20)
> Patch for the 2nd crash above - which is a vclptr issue
Had some time to look at it this morning, and turned out this is likely not related to VclPtr after all. Actually I was able to reproduce the crash in 4-4 with similar conditions (i.e. adding the bogus xViewProps->setPropertyValue to SwOneExampleFrame::TimeoutHdl, which is what creating all this mess on master). Interesting to note that Michael's patch didn't prevent the crash there..
Comment 23 Michael Meeks 2015-08-31 06:47:32 UTC
If indeed we get a similar problem in 4.4 - then I guess this is ~un-related to VclPtr (indeed that can help us fix it elegantly). Reading vcl's ImplASyncFocusHdl - it looks like it propagate a number of horrible lifecycle constraints through the code that are not obvious ;-)
Comment 24 Maxim Monastirsky 2015-09-04 10:08:44 UTC
The patch for Bug 39080 was merged yesterday.
Comment 25 Laurent Balland 2015-09-04 12:14:15 UTC
Bug fixed with
Version: 5.1.0.0.alpha1+
Build ID: 9a8a4442fd6368c20cf6a3d7efa3bd42962ee12f
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-09-03_23:17:36
Locale: fr-FR (fr_FR)
Comment 26 steve 2015-09-05 07:11:40 UTC
Verified as of comment 25.