Bug 158107 - v7.6.2.1 crashes with Unspecified Application Error on Alpine Linux
Summary: v7.6.2.1 crashes with Unspecified Application Error on Alpine Linux
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.2.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2023-11-07 20:45 UTC by chereskata
Modified: 2023-11-22 07:40 UTC (History)
1 user (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 chereskata 2023-11-07 20:45:06 UTC
Description:
After upgrading the LibreOffice package in Alpine Linux to v7.6.2.1 from v7.5.x it does not launch any more but exits with "Unspecified Application Error".

Safe Mode does not help.

Steps to Reproduce:
1. Install Alpine Linux edge
2. apk add libreoffice
3. Observe

Actual Results:
Crashes

Expected Results:
Launches


Reproducible: Always


User Profile Reset: Yes

Additional Info:
* Shortly before the broken LibreOffice upgrade a transition to llvm17 has happened in Alpine.

* Version 7.5.x worked fine

* LibreOffice CLI called by `convert` also does not work

----

The original (merged) MR for the upgrade: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/54531

----

The issue in Alpine Gitlab: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15439

----

libreoffice --backtrace:

$ cat gdbtrace.log 
warning: Currently logging to gdbtrace.log.  Turn the logging off and on to make the new setting effective.
[New LWP 6191]
[New LWP 6192]
[New LWP 6193]
[New LWP 6194]
[New LWP 6195]
[New LWP 6196]
[New LWP 6197]
[New LWP 6198]
[LWP 6198 exited]
[New LWP 6199]
[New LWP 6200]
[LWP 6200 exited]
[LWP 6199 exited]
[New LWP 6201]
[New LWP 6202]
[LWP 6202 exited]
[LWP 6201 exited]
[New LWP 6205]
[LWP 6205 exited]
[New LWP 6206]
[LWP 6206 exited]

Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
__pthread_mutex_lock (m=0x40) at src/thread/pthread_mutex_lock.c:5
5	src/thread/pthread_mutex_lock.c: No such file or directory.
#0  __pthread_mutex_lock (m=0x40) at src/thread/pthread_mutex_lock.c:5
#1  0x00007ffff50acc3f in VCLXMenu::addMenuListener(com::sun::star::uno::Reference<com::sun::star::awt::XMenuListener> const&) () from /usr/lib/libreoffice/program/libtklo.so
#2  0x00007ffff5567f86 in svt::PopupMenuControllerBase::setPopupMenu(com::sun::star::uno::Reference<com::sun::star::awt::XPopupMenu> const&) () from /usr/lib/libreoffice/program/libsvtlo.so
#3  0x00007ffff6ffa021 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#4  0x00007ffff6ff88b0 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#5  0x00007ffff460ec3a in Menu::Activate() () from /usr/lib/libreoffice/program/libvcllo.so
#6  0x00007ffff4617318 in Menu::HandleMenuActivateEvent(Menu*) const () from /usr/lib/libreoffice/program/libvcllo.so
#7  0x00007ffff0de61c4 in ?? () from /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#8  0x00007ffff0de61fd in ?? () from /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#9  0x00007ffff0de44d8 in ?? () from /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#10 0x00007ffff461bcb1 in ?? () from /usr/lib/libreoffice/program/libvcllo.so
#11 0x00007ffff4617022 in ?? () from /usr/lib/libreoffice/program/libvcllo.so
#12 0x00007ffff4654a2f in SystemWindow::SetMenuBar(MenuBar*) () from /usr/lib/libreoffice/program/libvcllo.so
#13 0x00007ffff6f315c6 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#14 0x00007ffff6f391a3 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#15 0x00007ffff66d1643 in ?? () from /usr/lib/libreoffice/program/libsfxlo.so
#16 0x00007ffff7e20c36 in ?? () from /usr/lib/libreoffice/program/libsofficeapp.so
#17 0x00007ffff7e1f5fc in ?? () from /usr/lib/libreoffice/program/libsofficeapp.so
#18 0x00007ffff4a402b9 in ImplSVMain() () from /usr/lib/libreoffice/program/libvcllo.so
#19 0x00007ffff7e4d0b1 in soffice_main () from /usr/lib/libreoffice/program/libsofficeapp.so
#20 0x000055555555518d in ?? ()
#21 0x00007ffff7f786d1 in libc_start_main_stage2 (main=0x555555555180, argc=2, argv=0x7fffffffe698) at src/env/__libc_start_main.c:95
#22 0x0000555555555046 in ?? ()
#23 0x0000000000000002 in ?? ()
#24 0x00007fffffffe9e0 in ?? ()
#25 0x00007fffffffea09 in ?? ()
#26 0x0000000000000000 in ?? ()

Thread 8 (LWP 6197 "dconf worker"):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7fb74fc in __syscall_cp_c (nr=7, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00007ffff7fa93db in poll (fds=<optimized out>, n=<optimized out>, timeout=<optimized out>) at src/select/poll.c:9
#3  0x00007ffff330f420 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff32ac47e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007fffef2c0dc9 in ?? () from /usr/lib/gio/modules/libdconfsettings.so
#6  0x00007ffff32de331 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0x00007ffff7fb822e in start (p=0x7fffee6a2c40) at src/thread/pthread_create.c:207
#8  0x00007ffff7fba82f in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

Thread 7 (LWP 6196 "gdbus"):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7fb74fc in __syscall_cp_c (nr=7, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00007ffff7fa93db in poll (fds=<optimized out>, n=<optimized out>, timeout=<optimized out>) at src/select/poll.c:9
#3  0x00007ffff330f420 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff32aebd7 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffff35053f8 in ?? () from /usr/lib/libgio-2.0.so.0
#6  0x00007ffff32de331 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0x00007ffff7fb822e in start (p=0x7fffee8aac40) at src/thread/pthread_create.c:207
#8  0x00007ffff7fba82f in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

Thread 6 (LWP 6195 "pool-soffice"):
#0  0x00007ffff7f9507a in __syscall6 (a6=<optimized out>, a5=<optimized out>, a4=<optimized out>, a3=<optimized out>, a2=<optimized out>, a1=<optimized out>, n=<optimized out>) at ./arch/x86_64/syscall_arch.h:59
#1  syscall (n=<optimized out>) at src/misc/syscall.c:20
#2  0x00007ffff3306c0f in g_cond_wait_until () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffff3278205 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff3278353 in g_async_queue_timeout_pop () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffff32e0656 in ?? () from /usr/lib/libglib-2.0.so.0
#6  0x00007ffff32de331 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0x00007ffff7fb822e in start (p=0x7fffeeab2c40) at src/thread/pthread_create.c:207
#8  0x00007ffff7fba82f in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

Thread 5 (LWP 6194 "gmain"):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7fb74fc in __syscall_cp_c (nr=7, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00007ffff7fa93db in poll (fds=<optimized out>, n=<optimized out>, timeout=<optimized out>) at src/select/poll.c:9
#3  0x00007ffff330f420 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff32ac47e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffff32ac4d2 in ?? () from /usr/lib/libglib-2.0.so.0
#6  0x00007ffff32de331 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0x00007ffff7fb822e in start (p=0x7fffeecbac40) at src/thread/pthread_create.c:207
#8  0x00007ffff7fba82f in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

Thread 4 (LWP 6193 "pool-spawner"):
#0  0x00007ffff7f9507a in __syscall6 (a6=<optimized out>, a5=<optimized out>, a4=<optimized out>, a3=<optimized out>, a2=<optimized out>, a1=<optimized out>, n=<optimized out>) at ./arch/x86_64/syscall_arch.h:59
#1  syscall (n=<optimized out>) at src/misc/syscall.c:20
#2  0x00007ffff33062e3 in g_cond_wait () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffff3278234 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffff32dfca6 in ?? () from /usr/lib/libglib-2.0.so.0
#5  0x00007ffff32de331 in ?? () from /usr/lib/libglib-2.0.so.0
#6  0x00007ffff7fb822e in start (p=0x7fffeeec2c40) at src/thread/pthread_create.c:207
#7  0x00007ffff7fba82f in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

Thread 3 (LWP 6192 "PipeIPC"):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7fb74fc in __syscall_cp_c (nr=43, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00007ffff7f96eae in __alt_socketcall (f=0, e=0, d=0, c=<optimized out>, b=<optimized out>, a=<optimized out>, cp=1, sock=5, sys=43) at ./src/internal/syscall.h:64
#3  accept (fd=<optimized out>, addr=<optimized out>, len=<optimized out>) at src/network/accept.c:6
#4  0x00007ffff7f23dbe in osl_acceptPipe () from /usr/lib/libreoffice/program/libuno_sal.so.3
#5  0x00007ffff7e49f03 in ?? () from /usr/lib/libreoffice/program/libsofficeapp.so
#6  0x00007ffff7cd58de in non-virtual thunk to salhelper::Thread::run() () from /usr/lib/libreoffice/program/libuno_salhelpergcc3.so.3
#7  0x00007ffff7cd59ea in ?? () from /usr/lib/libreoffice/program/libuno_salhelpergcc3.so.3
#8  0x00007ffff7f2ca1e in ?? () from /usr/lib/libreoffice/program/libuno_sal.so.3
#9  0x00007ffff7fb822e in start (p=0x7fffeefcac40) at src/thread/pthread_create.c:207
#10 0x00007ffff7fba82f in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

Thread 2 (LWP 6191 "configmgrWriter"):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7fb74fc in __syscall_cp_c (nr=202, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, y=<optimized out>, z=0) at src/thread/pthread_cancel.c:33
#2  0x00007ffff7fb6a2e in __futex4_cp (to=<optimized out>, val=2, op=128, addr=0x7fffef0d2ad4) at src/thread/__timedwait.c:24
#3  __timedwait_cp (addr=addr@entry=0x7fffef0d2ad4, val=val@entry=2, clk=clk@entry=0, at=at@entry=0x7fffef0d2b20, priv=128, priv@entry=1) at src/thread/__timedwait.c:52
#4  0x00007ffff7fb7894 in __pthread_cond_timedwait (c=0x7fffef0ddb60, m=0x7fffef0ddb90, ts=0x7fffef0d2b20) at src/thread/pthread_cond_timedwait.c:100
#5  0x00007ffff7f19708 in osl_waitCondition () from /usr/lib/libreoffice/program/libuno_sal.so.3
#6  0x00007fffeffa5a8b in ?? () from /usr/lib/libreoffice/program/../program/libconfigmgrlo.so
#7  0x00007ffff7cd58de in non-virtual thunk to salhelper::Thread::run() () from /usr/lib/libreoffice/program/libuno_salhelpergcc3.so.3
#8  0x00007ffff7cd59ea in ?? () from /usr/lib/libreoffice/program/libuno_salhelpergcc3.so.3
#9  0x00007ffff7f2ca1e in ?? () from /usr/lib/libreoffice/program/libuno_sal.so.3
#10 0x00007ffff7fb822e in start (p=0x7fffef0d2c40) at src/thread/pthread_create.c:207
#11 0x00007ffff7fba82f in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

Thread 1 (LWP 6188 "soffice.bin"):
#0  __pthread_mutex_lock (m=0x40) at src/thread/pthread_mutex_lock.c:5
#1  0x00007ffff50acc3f in VCLXMenu::addMenuListener(com::sun::star::uno::Reference<com::sun::star::awt::XMenuListener> const&) () from /usr/lib/libreoffice/program/libtklo.so
#2  0x00007ffff5567f86 in svt::PopupMenuControllerBase::setPopupMenu(com::sun::star::uno::Reference<com::sun::star::awt::XPopupMenu> const&) () from /usr/lib/libreoffice/program/libsvtlo.so
#3  0x00007ffff6ffa021 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#4  0x00007ffff6ff88b0 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#5  0x00007ffff460ec3a in Menu::Activate() () from /usr/lib/libreoffice/program/libvcllo.so
#6  0x00007ffff4617318 in Menu::HandleMenuActivateEvent(Menu*) const () from /usr/lib/libreoffice/program/libvcllo.so
#7  0x00007ffff0de61c4 in ?? () from /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#8  0x00007ffff0de61fd in ?? () from /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#9  0x00007ffff0de44d8 in ?? () from /usr/lib/libreoffice/program/libvclplug_gtk3lo.so
#10 0x00007ffff461bcb1 in ?? () from /usr/lib/libreoffice/program/libvcllo.so
#11 0x00007ffff4617022 in ?? () from /usr/lib/libreoffice/program/libvcllo.so
#12 0x00007ffff4654a2f in SystemWindow::SetMenuBar(MenuBar*) () from /usr/lib/libreoffice/program/libvcllo.so
#13 0x00007ffff6f315c6 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#14 0x00007ffff6f391a3 in ?? () from /usr/lib/libreoffice/program/libfwklo.so
#15 0x00007ffff66d1643 in ?? () from /usr/lib/libreoffice/program/libsfxlo.so
#16 0x00007ffff7e20c36 in ?? () from /usr/lib/libreoffice/program/libsofficeapp.so
#17 0x00007ffff7e1f5fc in ?? () from /usr/lib/libreoffice/program/libsofficeapp.so
#18 0x00007ffff4a402b9 in ImplSVMain() () from /usr/lib/libreoffice/program/libvcllo.so
#19 0x00007ffff7e4d0b1 in soffice_main () from /usr/lib/libreoffice/program/libsofficeapp.so
#20 0x000055555555518d in ?? ()
#21 0x00007ffff7f786d1 in libc_start_main_stage2 (main=0x555555555180, argc=2, argv=0x7fffffffe698) at src/env/__libc_start_main.c:95
#22 0x0000555555555046 in ?? ()
#23 0x0000000000000002 in ?? ()
#24 0x00007fffffffe9e0 in ?? ()
#25 0x00007fffffffea09 in ?? ()
#26 0x0000000000000000 in ?? ()
A debugging session is active.

	Inferior 1 [process 6188] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
Comment 1 timo.teras 2023-11-07 21:37:49 UTC
Backtrace with debug info:

(gdb) where
#0  __pthread_mutex_lock (m=0x40) at src/thread/pthread_mutex_lock.c:5
#1  0x00007ffff50acc3f in __gthread_mutex_lock(pthread_mutex_t*) (__mutex=0x40)
    at /usr/bin/../lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../include/c++/13.2.1/x86_64-alpine-linux-musl/bits/gthr-default.h:749
#2  std::mutex::lock() (this=0x40) at /usr/bin/../lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../include/c++/13.2.1/bits/std_mutex.h:113
#3  std::unique_lock<std::mutex>::lock() (this=0x7fffffffdd88) at /usr/bin/../lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../include/c++/13.2.1/bits/unique_lock.h:141
#4  std::unique_lock<std::mutex>::unique_lock(std::mutex&) (this=0x7fffffffdd88, __m=...)
    at /usr/bin/../lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../include/c++/13.2.1/bits/unique_lock.h:71
#5  VCLXMenu::addMenuListener(com::sun::star::uno::Reference<com::sun::star::awt::XMenuListener> const&) (this=0x0, rxListener=...)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/toolkit/source/awt/vclxmenu.cxx:262
#6  0x00007ffff5567f86 in svt::PopupMenuControllerBase::setPopupMenu(com::sun::star::uno::Reference<com::sun::star::awt::XPopupMenu> const&)
    (this=0x7fffef2a03d0, xPopupMenu=<optimized out>) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/svtools/source/uno/popupmenucontrollerbase.cxx:348
#7  0x00007ffff6ffa011 in framework::MenuBarManager::CreatePopupMenuController(framework::MenuBarManager::MenuItemHandler*, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&) (this=<optimized out>, pMenuItemHandler=<optimized out>, rDispatchProvider=<optimized out>, rModuleIdentifier=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/uielement/menubarmanager.cxx:893
#8  0x00007ffff6ff88a0 in framework::MenuBarManager::Activate(Menu*) (this=0x7fffeb9b8150, pMenu=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/uielement/menubarmanager.cxx:674
#9  framework::MenuBarManager::LinkStubActivate(void*, Menu*) (instance=0x7fffeb9b8150, data=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/uielement/menubarmanager.cxx:552
#10 0x00007ffff460ec4a in Link<Menu*, bool>::Call(Menu*) const (this=0x7fffeda387c0, data=0x7fffeda38790) at include/tools/link.hxx:111
#11 Menu::Activate() (this=0x7fffeda38790) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menu.cxx:266
#12 0x00007ffff4617328 in Menu::HandleMenuActivateEvent(Menu*) const (this=0x7fffee1a0690, pMenu=0x7fffeda38790)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menu.cxx:2546
#13 0x00007ffff0de51c4 in GtkSalMenu::ActivateAllSubmenus(Menu*) (this=0x7fffeb9b7980, pMenuBar=0x7fffee1a0690)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtksalmenu.cxx:1449
#14 0x00007ffff0de51fd in GtkSalMenu::ActivateAllSubmenus(Menu*) (this=0x7fffeb9b71d0, pMenuBar=0x7fffee1a0690)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtksalmenu.cxx:1455
#15 0x00007ffff0de34d8 in GtkSalMenu::UpdateFull() (this=0x7fffeb9b71d0) at vcl/inc/unx/gtk/gtksalmenu.hxx:119
#16 GtkSalMenu::SetFrame(SalFrame const*) (this=0x7fffeb9b71d0, pFrame=<optimized out>) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtksalmenu.cxx:1162
#17 0x00007ffff461bcc1 in MenuBarWindow::SetMenu(MenuBar*) (this=0x7fffee4880b0, pMen=0x7fffee1a0690)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menubarwindow.cxx:191
#18 0x00007ffff4617032 in MenuBar::ImplCreate(vcl::Window*, vcl::Window*, MenuBar*) (pParent=0x7fffed655590, pWindow=0x7fffee4880b0, pMenu=0x7fffee1a0690)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menu.cxx:2454
#19 0x00007ffff4654a3f in SystemWindow::SetMenuBar(MenuBar*) (this=0x7fffed6543d0, pMenuBar=0x7fffee1a0690)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/syswin.cxx:874
#20 0x00007ffff6f315c6 in framework::LayoutManager::implts_createMenuBar(rtl::OUString const&) (this=0x7fffed56d340, rMenuBarName=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/layoutmanager/layoutmanager.cxx:191
#21 0x00007ffff6f391a3 in framework::LayoutManager::createElement(rtl::OUString const&) (this=0x7fffed56d340, aName=...)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/layoutmanager/layoutmanager.cxx:1444
#22 0x00007ffff66d1643 in (anonymous namespace)::BackingComp::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (this=0x7fffeda3e790, xFrame=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/sfx2/source/dialog/backingcomp.cxx:364
#23 0x00007ffff7e20c36 in desktop::Desktop::ShowBackingComponent(desktop::Desktop*) (progress=0x7fffffffe6d0)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/app.cxx:2526
#24 0x00007ffff7e1f5fc in desktop::Desktop::Main() (this=0x7fffffffe6d0) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/app.cxx:1521
#25 0x00007ffff4a403a9 in ImplSVMain() () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/app/svmain.cxx:204
#26 0x00007ffff7e4d0b1 in soffice_main() () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/sofficemain.cxx:94
#27 0x000055555555518d in sal_main () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/main.c:51
#28 main (argc=<optimized out>, argv=<optimized out>) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/main.c:49


Culprit seems to be in frame #5 with this=0:
VCLXMenu::addMenuListener(com::sun::star::uno::Reference<com::sun::star::awt::XMenuListener> const&) (this=0x0, rxListener=...)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/toolkit/source/awt/vclxmenu.cxx:262

the caller at frame #6 in svt::PopupMenuControllerBase::setPopupMenu probably has a failed dynamic_cast.

This kind of potential call on null pointer exists in:

./svtools/source/uno/popupmenucontrollerbase.cxx:        m_xPopupMenu->addMenuListener( Reference< awt::XMenuListener >(this) );

./framework/source/uielement/toolbarsmenucontroller.cxx:        m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) );

./framework/source/uielement/toolbarmodemenucontroller.cxx:        m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) );
Comment 2 timo.teras 2023-11-07 21:53:17 UTC
Trying to just comment out the calls to null pointer does fix the immediate crash, but the next crash is at:

(gdb) where
#0  (anonymous namespace)::ResourceMenuController::updatePopupMenu() (this=0x7fffe21f6cd0)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/uielement/resourcemenucontroller.cxx:228
#1  0x00007ffff6ff865a in framework::MenuBarManager::Activate(Menu*) (this=0x7fffdfa49980, pMenu=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/uielement/menubarmanager.cxx:705
#2  framework::MenuBarManager::LinkStubActivate(void*, Menu*) (instance=0x7fffdfa49980, data=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/uielement/menubarmanager.cxx:552
#3  0x00007ffff460ec4a in Link<Menu*, bool>::Call(Menu*) const (this=0x7fffe22405e0, data=0x7fffe22405b0) at include/tools/link.hxx:111
#4  Menu::Activate() (this=0x7fffe22405b0) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menu.cxx:266
#5  0x00007ffff4617328 in Menu::HandleMenuActivateEvent(Menu*) const (this=0x7fffe223f790, pMenu=0x7fffe22405b0)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menu.cxx:2546
#6  0x00007ffff0de51c4 in GtkSalMenu::ActivateAllSubmenus(Menu*) (this=0x7fffe21dbcc0, pMenuBar=0x7fffe223f790)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtksalmenu.cxx:1449
#7  0x00007ffff0de51fd in GtkSalMenu::ActivateAllSubmenus(Menu*) (this=0x7fffe223bfc0, pMenuBar=0x7fffe223f790)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtksalmenu.cxx:1455
#8  0x00007ffff0de51fd in GtkSalMenu::ActivateAllSubmenus(Menu*) (this=0x7fffe223bcb0, pMenuBar=0x7fffe223f790)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtksalmenu.cxx:1455
#9  0x00007ffff0de34d8 in GtkSalMenu::UpdateFull() (this=0x7fffe223bcb0) at vcl/inc/unx/gtk/gtksalmenu.hxx:119
#10 GtkSalMenu::SetFrame(SalFrame const*) (this=0x7fffe223bcb0, pFrame=<optimized out>) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtksalmenu.cxx:1162
#11 0x00007ffff461bcc1 in MenuBarWindow::SetMenu(MenuBar*) (this=0x7fffe223e790, pMen=0x7fffe223f790)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menubarwindow.cxx:191
#12 0x00007ffff4617032 in MenuBar::ImplCreate(vcl::Window*, vcl::Window*, MenuBar*) (pParent=0x7fffe8b76710, pWindow=0x7fffe223e790, pMenu=0x7fffe223f790)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/menu.cxx:2454
#13 0x00007ffff4654a3f in SystemWindow::SetMenuBar(MenuBar*) (this=0x7fffe300f3c0, pMenuBar=0x7fffe223f790)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/syswin.cxx:874
#14 0x00007ffff6f315c6 in framework::LayoutManager::implts_createMenuBar(rtl::OUString const&) (this=0x7fffedbf1ba0, rMenuBarName=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/layoutmanager/layoutmanager.cxx:191
#15 0x00007ffff6f391a3 in framework::LayoutManager::createElement(rtl::OUString const&) (this=0x7fffedbf1ba0, aName=...)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/layoutmanager/layoutmanager.cxx:1444
#16 0x00007ffff677bea5 in SfxDispatcher::SetMenu_Impl() (this=0x7fffe4ad9930) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/sfx2/source/control/dispatch.cxx:1028
#17 SfxDispatcher::Update_Impl(bool) (this=0x7fffe4ad9930, bForce=<optimized out>) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/sfx2/source/control/dispatch.cxx:1093
#18 0x00007ffff66ea2fa in SfxApplication::SetViewFrame_Impl(SfxViewFrame*) (this=<optimized out>, pFrame=0x7fffeda44cd0)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/sfx2/source/appl/app.cxx:280
#19 0x00007ffff69ef97e in SfxViewFrame::SetViewFrame(SfxViewFrame*) (pFrame=0x7fffeda44cd0)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/sfx2/source/view/viewfrm.cxx:3576
#20 SfxViewFrame::MakeActive_Impl(bool) (this=0x7fffeda44cd0, bGrabFocus=true) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/sfx2/source/view/viewfrm.cxx:2181
#21 0x00007ffff4628ba6 in vcl::Window::ImplGrabFocus(GetFocusFlags) (this=0x7fffe8b87820, nFlags=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/mouse.cxx:384
#22 0x00007ffff50dfffb in VCLXWindow::setFocus() (this=0x7fffeb93e790) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/toolkit/source/awt/vclxwindow.cxx:1023
#23 0x00007ffff6f852bd in (anonymous namespace)::XFrameImpl::focusGained(com::sun::star::awt::FocusEvent const&) (this=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/framework/source/services/frame.cxx:2460
#24 0x00007ffff5243068 in FocusListenerMultiplexer::focusGained(com::sun::star::awt::FocusEvent const&) (this=<optimized out>, evt=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/toolkit/source/helper/listenermultiplexer.cxx:58
#25 0x00007ffff50dc77c in VCLXWindow::ProcessWindowEvent(VclWindowEvent const&) (this=0x7fffeda3c6d0, rVclWindowEvent=...)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/toolkit/source/awt/vclxwindow.cxx:591
#26 0x00007ffff45f3aee in Link<VclWindowEvent&, void>::Call(VclWindowEvent&) const (this=<optimized out>, data=<optimized out>) at include/tools/link.hxx:111
#27 vcl::Window::CallEventListeners(VclEventId, void*) (this=<optimized out>, nEvent=<optimized out>, pData=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/event.cxx:262
#28 0x00007ffff45f3910 in vcl::Window::PreNotify(NotifyEvent&) (this=0x7fffe300f3c0, rNEvt=...)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/event.cxx:77
#29 0x00007ffff4628b8c in vcl::Window::ImplGrabFocus(GetFocusFlags) (this=0x7fffe300f3c0, nFlags=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/mouse.cxx:383
#30 0x00007ffff4694211 in Link<void*, void>::Call(void*) const (this=0x7fffee47dcb8, data=0x0) at include/tools/link.hxx:111
#31 ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x7fffee47dcb0) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/winproc.cxx:2287
#32 0x00007ffff4691e84 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x7fffedd71310, nEvent=SalEvent::UserEvent, pEvent=0x7fffee47dcb0)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/window/winproc.cxx:2857
#33 0x00007ffff49ddc5e in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/app/salusereventlist.cxx:119
#34 SalUserEventList::DispatchUserEvents(bool) (this=0x7fffef021fb0, bHandleAllCurrentEvents=false)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/app/salusereventlist.cxx:120
#35 0x00007ffff0d64cea in call_userEventFn(void*) (data=0x7ffff302c480) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtkdata.cxx:824
#36 0x00007ffff32ae17a in  () at /usr/lib/libglib-2.0.so.0
#37 0x00007ffff330f4c7 in  () at /usr/lib/libglib-2.0.so.0
#38 0x00007ffff32ac47e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#39 0x00007ffff0d63ee2 in GtkSalData::Yield(bool, bool) (this=0x7ffff302c480, bWait=true, bHandleAllCurrentEvents=<optimized out>)
    at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/unx/gtk3/gtkdata.cxx:405
#40 0x00007ffff4a356e6 in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/app/svapp.cxx:369
#41 Application::Yield() () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/app/svapp.cxx:453
#42 0x00007ffff4a354e2 in Application::Execute() () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/app/svapp.cxx:347
#43 0x00007ffff7e1f84a in desktop::Desktop::Main() (this=0x7fffffffe6e0) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/app.cxx:1592
#44 0x00007ffff4a403a9 in ImplSVMain() () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/vcl/source/app/svmain.cxx:204
#45 0x00007ffff7e4d0b1 in soffice_main() () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/sofficemain.cxx:94
#46 0x000055555555518d in sal_main () at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/main.c:51
#47 main (argc=<optimized out>, argv=<optimized out>) at /home/tteras/aports/community/libreoffice/src/libreoffice-7.6.2.1/desktop/source/app/main.c:49


Probably the callers need to be updated to not pass objects of wrong type in the first place.
Comment 3 Stéphane Guillou (stragu) 2023-11-22 07:19:30 UTC
Thanks for the report. Looks similar to bug 158078.

Can you please test the pre-release for 7.6.3, at the bottom of this page: https://www.libreoffice.org/download/download-libreoffice/
Comment 4 Stéphane Guillou (stragu) 2023-11-22 07:40:22 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> Can you please test the pre-release for 7.6.3
Sorry, ignore that, just saw in the Alphine issue that the update to 7.6.3.1 hadn't fixed it.
I see your issue #15439 was marked as fixed, and a user reports that it now works: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15484#note_356045

Has there been any change since two weeks ago?