Bug 150974 - Writer crashes when starting with WollMux installed
Summary: Writer crashes when starting with WollMux installed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.4.2
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2022-09-15 12:07 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2022-09-23 08:21 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 Samuel Mehrbrodt (allotropia) 2022-09-15 12:07:49 UTC
1. Install WollMux.oxt from https://github.com/WollMux/WollMux/releases/tag/RELEASE_18.2.9
2. Start Writer 

-> Crash

Regression since b2aa646ef09dc8434d3ca8a5bba53a8d8ff3f910 .
Comment 1 Noel Grandin 2022-09-16 10:38:02 UTC
Doesn't crash for me on Linux?
Comment 2 Caolán McNamara 2022-09-16 13:57:09 UTC
I get an assert from the assert(rListener.is());

bt:

#5  0x00007ffff0375caf in comphelper::OInterfaceContainerHelper3<com::sun::star::awt::XTextListener>::addInterface(com::sun::star::uno::Reference<com::sun::star::awt::XTextListener> const&) (this=0x61ff628, rListener=empty uno::Reference) at include/comphelper/interfacecontainer3.hxx:312
#6  0x00007ffff05ac748 in UnoEditControl::addTextListener(com::sun::star::uno::Reference<com::sun::star::awt::XTextListener> const&)
     (this=0x61ff390, l=empty uno::Reference) at toolkit/source/controls/unocontrols.cxx:273
#7  0x00007fffd75d4921 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*)
    (pThis=0x61ff5f8, nVtableIndex=3, pRegisterReturn=0x0, pReturnTypeRef=0x519e70, bSimpleReturn=true, pStack=0x7ffffffebed0, nStack=0, pGPR=0x7ffffffec1d0, pFPR=0x7ffffffec190) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77
#8  0x00007fffd75d34fc in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**)
     (pThis=0x8fcbf80, aVtableSlot=..., pReturnTypeRef=0x519e70, nParams=1, pParams=0x5d799d0, pUnoReturn=0x0, pUnoArgs=0x7ffffffec370, ppUnoExc=0x7ffffffec510) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233
#9  0x00007fffd75d2c58 in unoInterfaceProxyDispatch(uno_Interface*, typelib_TypeDescription const*, void*, void**, uno_Any**)
    (pUnoI=0x8fcbf80, pMemberDescr=0x6284800, pReturn=0x0, pArgs=0x7ffffffec370, ppException=0x7ffffffec510)
    at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413
#10 0x00007fffa7bdd89f in jni_uno::Bridge::call_uno(jni_uno::JNI_context const&, _uno_Interface*, _typelib_TypeDescription*, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter const*, _jobjectArray*) const
     (this=0x55d1230, jni=..., pUnoI=0x8fcbf80, member_td=0x6284800, return_type=0x519e70, nParams=1, pParams=0x5d799d0, jo_args=0x7ffffffed328)
    at bridges/source/jni_uno/jni_java2uno.cxx:243
#11 0x00007fffa7bdeeb2 in Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call(JNIEnv*, jobject, jlong, jstring, jobjectArray)
    (jni_env=0x8e8aaa8, jo_proxy=0x7ffffffed310, bridge_handle=89985584, jo_method=0x7ffffffed320, jo_args=0x7ffffffed328)
    at bridges/source/jni_uno/jni_java2uno.cxx:481
Comment 3 Noel Grandin 2022-09-16 14:06:52 UTC
Ah, so we used to ignore this silliness (passing a null value to addListener)

Blind fix here
   https://gerrit.libreoffice.org/c/core/+/140077
Comment 4 Commit Notification 2022-09-16 20:14:54 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a3bbdfab809609bec3475613a918eda699fbdc29

tdf#150974 Writer crashes when starting with WollMux installed

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Caolán McNamara 2022-09-16 20:15:55 UTC
Added another place that asserted and there's a backport to 7-4 in gerrit. Probably best to fix the extension if possible to not do the odd add empty listener thing.
Comment 6 Commit Notification 2022-09-17 11:08:54 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/1f1342f30abaa39366b8f7f359ea2e3aa2e1d962

tdf#150974 Writer crashes when starting with WollMux installed

It will be available in 7.4.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Samuel Mehrbrodt (allotropia) 2022-09-22 19:23:21 UTC
(In reply to Caolán McNamara from comment #5)
> Probably best to fix the extension if possible to not do the odd add empty
> listener thing.

I submitted a PR for WollMux: https://github.com/WollMux/WollMux/pull/394

If you think it makes sense to have addTextListener/addActionListener throw an (InvalidArgument)Exception when the listener is null, no problem with that.
Needs adding to the API docs then, and a mention in the Release Notes.
Comment 8 Caolán McNamara 2022-09-23 08:21:52 UTC
I suppose that's plausible, I have no strong feelings on it