Bug 89266 - constant crash on "Add Text Box" when choosing from rightclickMenu on "insert media" - fontwork
Summary: constant crash on "Add Text Box" when choosing from rightclickMenu on "insert...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86-64 (AMD64) macOS (All)
: medium critical
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.5.0 target:4.4.2
Keywords: haveBacktrace
: 87556 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-09 16:50 UTC by ernstMreicher
Modified: 2015-08-23 14:07 UTC (History)
3 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 ernstMreicher 2015-02-09 16:50:18 UTC
When inserting a "fontwork" by "Insert" -> "Media" -> "Fontwork Gallery..."
AND
right clicking the fontwork and choosing last contextmenuitem "Add Text Box"
I get constantly a crash of the app.
Comment 1 Julien Nabet 2015-02-09 20:46:39 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

Here main part of bt:
(gdb) bt
#0  0x00002aaaab2bc107 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00002aaaab2bd4e8 in __GI_abort () at abort.c:89
#2  0x00002aaaabcb9b3d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00002aaaabcb7bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00002aaaabcb7c01 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00002aaaabcb7c16 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00002aaaabcb7872 in __cxa_call_unexpected () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00002aaaaeb6e492 in SfxDispatchController_Impl::dispatch (this=0x32b03b0, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/unoctitm.cxx:712
#8  0x00002aaaaeb6bbb2 in SfxOfficeDispatch::dispatch (this=0x32fb930, aURL=..., aArgs=empty uno::Sequence)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/unoctitm.cxx:366
#9  0x00002aaaaeae3c05 in SfxAsyncExec_Impl::TimerHdl (this=0x3360d50, pTimer=0x3360db0) at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/bindings.cxx:191
#10 0x00002aaaaeae3b9f in SfxAsyncExec_Impl::LinkStubTimerHdl (pThis=0x3360d50, pCaller=0x3360db0)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/bindings.cxx:185


I noticed these console logs when inserting fontwork:
warn:vcl.layout:12937:1:vcl/source/window/builder.cxx:506: No default button defined in svx/ui/fontworkgallerydialog.ui
warn:legacy.osl:12937:1:sfx2/source/doc/sfxbasemodel.cxx:2890: SfxBaseModel::IsInitialized: this should have been caught earlier!
warn:xmloff.core:12937:1:xmloff/source/core/xmlimp.cxx:932: exception caught
warn:legacy.osl:12937:1:xmloff/source/core/xmlimp.cxx:933: caught an exception!
in function:virtual void SvXMLImport::setTargetDocument(const com::sun::star::uno::Reference<com::sun::star::lang::XComponent>&)
type: com.sun.star.lang.NotInitializedException
context: 18SvxUnoDrawingModel
Comment 2 Julien Nabet 2015-02-09 20:50:09 UTC
Miklos: noticing this commit http://cgit.freedesktop.org/libreoffice/core/commit/?id=7f77b8a689f84a03495ac5911236b68f01ee7b24, I thought you might be interested in this one.
Comment 3 Julien Nabet 2015-02-09 21:07:15 UTC
More precise location after gdb session:
#0  SvxShape::_getPropertyValue (this=0x7434ed0, PropertyName="HoriOrient") at /home/julien/compile-libreoffice/libreoffice/svx/source/unodraw/unoshape.cxx:1775
#1  0x00002aaad17bc632 in SvxShape::getPropertyValue (this=0x7434ed0, PropertyName="HoriOrient")
    at /home/julien/compile-libreoffice/libreoffice/svx/source/unodraw/unoshape.cxx:1759
#2  0x00002aaaccc3cbc2 in SwTextBoxHelper::create (pShape=0x74274e0) at /home/julien/compile-libreoffice/libreoffice/sw/source/core/doc/textboxhelper.cxx:88
#3  0x00002aaacd5eb9ee in SwDrawShell::Execute (this=0x32eedc0, rReq=...) at /home/julien/compile-libreoffice/libreoffice/sw/source/uibase/shells/drawsh.cxx:374
#4  0x00002aaacd5ea775 in SfxStubSwDrawShellExecute (pShell=0x32eedc0, rReq=...) at /home/julien/compile-libreoffice/libreoffice/workdir/SdiTarget/sw/sdi/swslots.hxx:8069
#5  0x00002aaaaeb04258 in SfxShell::CallExec (this=0x32eedc0, pFunc=0x2aaacd5ea752 <SfxStubSwDrawShellExecute(SfxShell*, SfxRequest&)>, rReq=...)
    at /home/julien/compile-libreoffice/libreoffice/include/sfx2/shell.hxx:210
#6  0x00002aaaaeafb586 in SfxDispatcher::Call_Impl (this=0x3053130, rShell=..., rSlot=..., rReq=..., bRecord=true)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/dispatch.cxx:257
#7  0x00002aaaaeafe5f3 in SfxDispatcher::_Execute (this=0x3053130, rShell=..., rSlot=..., rReq=..., eCallMode=RECORD)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/dispatch.cxx:859
#8  0x00002aaaaeae7ca4 in SfxBindings::Execute_Impl (this=0x2edf020, aReq=..., pSlot=0x2aaace291688 <aSwDrawShellSlots_Impl+8008>, pShell=0x32eedc0)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/bindings.cxx:1280
#9  0x00002aaaaeb6de82 in SfxDispatchController_Impl::dispatch (this=0x33372a0, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/unoctitm.cxx:852
#10 0x00002aaaaeb6bbb2 in SfxOfficeDispatch::dispatch (this=0x3337230, aURL=..., aArgs=empty uno::Sequence)
    at /home/julien/compile-libreoffice/libreoffice/sfx2/source/control/unoctitm.cxx:366
Comment 4 Caolán McNamara 2015-02-10 17:15:11 UTC
FWIW its at

sw/source/core/doc/textboxhelper.cxx:88 
where the getPropertyValue of
syncProperty(pShape, RES_HORI_ORIENT, MID_HORIORIENT_ORIENT, xShapePropertySet->getPropertyValue(UNO_NAME_HORI_ORIENT)); 
throws beans::UnknownPropertyException because apparently fontwork things don't support HoriOrient etc
Comment 5 Julien Nabet 2015-02-10 21:36:46 UTC
Caolan: should all* the "sync" lines be in a try block with a catch "beans::UnknownPropertyException" (+ just a SAL_WARN in catch) or should fontwork implement the property?
(in first case, I can give a try, not in the second case because no idea how to do)

*: just in case other components than Fontwork may fail but on another property
Comment 6 Caolán McNamara 2015-02-11 12:51:57 UTC
I don't know :-). Give the try catch a go and see what happens if you do that.
Comment 7 Julien Nabet 2015-02-11 13:07:22 UTC
Ok, I'll give a try with a "try catch" but perhaps several ones so it's not all or nothing about properties.
Comment 8 Miklos Vajna 2015-02-12 09:21:05 UTC
I think a better fix would be to not show that menu entry for fontwork shapes, I don't see a usecase for having complex text on fontwork shapes. I'll look into this.
Comment 9 Commit Notification 2015-02-12 10:22:18 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#89266 SwDrawShell::GetState: fix crash on adding textbox to fontwork

It will be available in 4.5.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 2015-03-04 10:22:58 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

tdf#89266 SwDrawShell::GetState: fix crash on adding textbox to fontwork

It will be available in 4.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.
Comment 11 Maxim Monastirsky 2015-08-23 14:07:53 UTC
*** Bug 87556 has been marked as a duplicate of this bug. ***