https://bugs.freedesktop.org/show_bug.cgi?id=58815
--- Comment #20 from Michael Meeks <[email protected]> --- Wonderful; as expected it is basically VCL being unutterably horrible lifecycle wise: --- a/toolkit/source/awt/vclxdevice.cxx +++ b/toolkit/source/awt/vclxdevice.cxx @@ -53,6 +53,8 @@ VCLXDevice::~VCLXDevice() void VCLXDevice::DestroyOutputDevice() { + fprintf (stderr, "Destroy output device %p: '%s'\n", + mpOutputDevice, mpOutputDevice ? typeid(*mpOutputDevice).name() : "<null>"); delete mpOutputDevice; mpOutputDevice = NULL; } prints out: Destroy output device 0x8955ee0: 'N2sd6WindowE' Destroy output device 0x8956268: '9ScrollBar' Destroy output device 0x8956d30: '9ScrollBar' Destroy output device 0x8957060: '12ScrollBarBox' I get: #0 std::list<Link, std::allocator<Link> >::remove (this=0x50, __value=...) at /data/opt/libreoffice/libreoffice-4-0/vcl/source/app/vclevent.cxx:162 #1 0xb67f9533 in VclEventListeners::removeListener (this=0x50, rListener=...) at /data/opt/libreoffice/libreoffice-4-0/vcl/source/app/vclevent.cxx:110 #2 0xb6a04fed in Window::RemoveEventListener (this=0x8955ee0, rEventListener=...) at /data/opt/libreoffice/libreoffice-4-0/vcl/source/window/window.cxx:5310 #3 0xacb17099 in sd::slidesorter::SlideSorter::ReleaseListeners (this=0x89584c8) at /data/opt/libreoffice/libreoffice-4-0/sd/source/ui/slidesorter/shell/SlideSorter.cxx:403 #4 0xacb17649 in sd::slidesorter::SlideSorter::~SlideSorter (this=0x89584c8, __in_chrg=<optimized out>) at /data/opt/libreoffice/libreoffice-4-0/sd/source/ui/slidesorter/shell/SlideSorter.cxx:218 #5 0xacb17862 in sd::slidesorter::SlideSorter::~SlideSorter (this=0x89584c8, __in_chrg=<optimized out>) at /data/opt/libreoffice/libreoffice-4-0/sd/source/ui/slidesorter/shell/SlideSorter.cxx:246 The slide-sorter has this rather naive / optimistic boost::shared_ptr: typedef ::boost::shared_ptr<sd::Window> SharedSdWindow; ... class SlideSorter : private ::boost::noncopyable { ... SharedSdWindow mpContentWindow; Which is just hard deleted by a toolkit peer: ==24244== Address 0xe2a2484 is 244 bytes inside a block of size 324 free'd ==24244== at 0x4027F33: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==24244== by 0x4FC1085: VCLXDevice::DestroyOutputDevice() (vclxdevice.cxx:56) ==24244== by 0x4FE34F1: VCLXWindow::dispose() (vclxwindow.cxx:957) ==24244== by 0x509F5B6: UnoWrapper::WindowDestroyed(Window*) (unowrapper.cxx:263) ==24244== by 0x56BE2B4: Window::~Window() (window.cxx:4333) ==24244== by 0x56936B6: SystemWindow::~SystemWindow() (syswin.cxx:85) ==24244== by 0x56C5C77: WorkWindow::~WorkWindow() (wrkwin.cxx:142) ==24244== by 0x56C5CB1: WorkWindow::~WorkWindow() (wrkwin.cxx:150) ==24244== by 0x12A6BD70: boost::detail::sp_counted_impl_p<WorkWindow>::dispose() (checked_delete.hpp:34) ==24244== by 0x12991C0F: boost::detail::shared_count::~shared_count() (sp_counted_base_gcc_x86.hpp:145) ==24244== by 0x12A69E5E: sd::framework::BasicViewFactory::~BasicViewFactory() (shared_ptr.hpp:168) ==24244== by 0x12A69F1F: sd::framework::BasicViewFactory::~BasicViewFactory() (BasicViewFactory.cxx:145) Which is just silly. Quite why toolkit thinks it can go deleting windows like that - I have no idea. The ownership of those resources is extraordinarily unclear. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
