Bug 93188 - Closing media player crashes Writer
Summary: Closing media player crashes Writer
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.0.2
Keywords: bibisected, bisected, regression
: 93638 (view as bug list)
Depends on:
Blocks: VclPtr Media-Player-Dialog
  Show dependency treegraph
 
Reported: 2015-08-06 10:12 UTC by Michael Heyns
Modified: 2017-09-23 11:23 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast of problem. (842.43 KB, image/gif)
2015-08-06 10:12 UTC, Michael Heyns
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Heyns 2015-08-06 10:12:15 UTC
Created attachment 117708 [details]
Screencast of problem.

LibreOffice 5.0.0 on Arch Linux.

Selecting preview sound in gallery sidebar opens media player window.
Attempting to close window crashes entire application.
Window reappears upon reopening Writer.

Please refer to attached screencast.
Comment 1 Michael Heyns 2015-08-06 10:34:09 UTC
Furthermore, LibreOffice Writer fails to delete /tmp directories on close from here on forward. Document Recovery dialog is shown on every start. Only solution is to delete ~/.config/libreoffice/
Comment 2 Matthew Francis 2015-08-20 10:15:39 UTC
This hasn't worked since the Timer/Idle work in the range
 9e678c14e4fc8e58b1e0530744f648fa3958d338..d05a64df34fd143670cb939b72abfb32d6b714c7

However, the initial problem thereafter was that trying to play media led to a freeze, rather than a crash, which was fixed on bug 90077 in the commit

commit 9a5323655355a01be582a556a99e410c4064ebe4
Author: Noel Grandin <noel@peralex.com>
Date:   Wed Jun 10 16:58:54 2015 +0200

    tdf#90077 fix freeze when enabling media toolbar in Impress


Since then, the crash reported on this bug has occurred. Perhaps the root cause is the same or perhaps not, that's as far as I could get just looking at the symptoms.

Adding Cc: to noelgrandin@gmail.com; Any thoughts on this one?
Thanks
Comment 3 Matthew Francis 2015-08-20 10:16:21 UTC
*** Bug 93491 has been marked as a duplicate of this bug. ***
Comment 4 Yousuf Philips (jay) (retired) 2015-08-20 21:47:21 UTC
Was just about to report the same thing.

Steps:
1) Open Impress
2) Tools > Media Player
3) Click close button in title bar of dialog

Regression as this doesnt happen in 4.4 daily.

Version: 5.1.0.0.alpha1+
Build ID: 5d6ef74eea5d73b8cd17f313ad87138d56dc76ce
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-08-18_01:28:44
Comment 5 Maxim Monastirsky 2015-08-21 14:30:21 UTC
That's a VclPtr issue. DockingWindow::dispose calls DockingWindow::SetFloatingMode which calls MediaFloater::ToggleFloatingMode (and the latter tries to dereference the invalid mpMediaWindow pointer, which was already cleaned in MediaFloater::dispose).

In the old code, because the cleaning stuff was in the destructor rather than in dispose(), DockingWindow::ToggleFloatingMode was called instead of MediaFloater::ToggleFloatingMode.
Comment 6 Michael Meeks 2015-08-22 18:02:17 UTC
Thanks for the analysis Maxim; pushed a fix based on it.
Comment 7 Commit Notification 2015-08-22 18:03:11 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1ce2375b17912622e6db4c2c81afa24527a0104b

tdf#93188 - avoid crash in media player.

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 8 Commit Notification 2015-08-22 19:10:17 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=444c76830b75528a8130484e24781333535200f3&h=libreoffice-5-0

tdf#93188 - avoid crash in media player.

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 9 Maxim Monastirsky 2015-08-24 23:38:00 UTC
*** Bug 93638 has been marked as a duplicate of this bug. ***
Comment 10 Wim Heyvaert 2015-09-25 02:41:30 UTC
After installing version 5.0.2.2  (x64), the crashes still remain. Problem is not solved. See also bug report 93491. This bug report is marked as a duplicate of bug 93188.
Comment 11 Michael Meeks 2015-10-06 16:05:19 UTC
Hi Wim; this x86_64 windows issue is a different bug; please can you file a new bug - and (ideally) attach a stack-trace to avoid these getting confused. It could easily be something related to media / playback / embedding on Windows and nothing to do with VclPtr. It would be great to get a stack-trace for that too if possible; but not in this bug.

Thanks !
Comment 12 Wim Heyvaert 2015-10-07 02:55:36 UTC
Hi Michael. How can I take a stack-trace?
Comment 13 Yousuf Philips (jay) (retired) 2015-10-07 06:03:05 UTC
Hi Wim,

You can find the instructions here - https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg
Comment 14 Robinson Tryon (qubit) 2015-12-17 10:30:26 UTC Comment hidden (obsolete)