Bug 125271 - Inserting this .mp4 file in impress leads to a CRASH
Summary: Inserting this .mp4 file in impress leads to a CRASH
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.2.4.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.5
Keywords: haveBacktrace
Depends on:
Blocks: Media
  Show dependency treegraph
 
Reported: 2019-05-13 18:08 UTC by Frederic Parrenin
Modified: 2019-06-04 16:52 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
.mp4 file to reproduce the crash (2.43 MB, video/mp4)
2019-05-13 18:08 UTC, Frederic Parrenin
Details
bt with debug symbols (12.88 KB, text/plain)
2019-05-13 19:53 UTC, Julien Nabet
Details
bt with debug symbols (kde5+wayland) (13.10 KB, text/plain)
2019-05-14 19:25 UTC, Julien Nabet
Details
bt Windows (windbg) (51.78 KB, text/plain)
2019-05-15 14:55 UTC, Julien Nabet
Details
bt with debug symbols (gtk3) (12.52 KB, text/plain)
2019-05-21 19:13 UTC, Julien Nabet
Details
bt with debug symbols (kde5+wayland) (11.37 KB, text/plain)
2019-05-21 19:24 UTC, Julien Nabet
Details
bt with debug symbols (gtk3) (16.60 KB, text/plain)
2019-05-22 19:09 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Parrenin 2019-05-13 18:08:37 UTC
Created attachment 151375 [details]
.mp4 file to reproduce the crash

Steps to reproduce:
- insert this .mp4 file in Impress with Insert > Audio or Video
=> CRASH!
Comment 1 Julien Nabet 2019-05-13 19:53:13 UTC
Created attachment 151378 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I don't get a crash when inserting the video but just afterwards, when trying to play it with F5.
Anyway, thought it may help a bit to attach the bt.
Comment 2 Xisco Faulí 2019-05-14 07:11:47 UTC
I can't reproduce it in

Version: 6.3.0.0.alpha0+
Build ID: 630db80d17616d635cf2e5f1d5a0852428b794a3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Could you please paste the info from Help - about LibreOffice ?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' once the information has been provided
Comment 3 Frederic Parrenin 2019-05-14 08:28:24 UTC
Version: 6.2.4.1
Build ID: 170a9c04e0ad25cd937fc7a913bb06bf8c75c11d
Threads CPU : 8; OS : Linux 4.19; UI Render : par défaut; VCL: gtk3; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 4 Frederic Parrenin 2019-05-14 08:59:22 UTC
In:

Version: 6.3.0.0.alpha0+
Build ID: 98630a0bd49bd80652145a21e4e0d0ded792b36b
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-05-04_04:44:35
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded

I can insert the .mp4 file, but there is a CRASH when I run the Slideshow.
Comment 5 Julien Nabet 2019-05-14 19:25:02 UTC
Created attachment 151412 [details]
bt with debug symbols (kde5+wayland)

On pc Debian x86-64 with master updated today, here are some other results:

- gtk3: still crash only when trying to play the file
- gtk: no crash
- gen: no crash
- kde5 only : no crash but blank video when playing
- kde5 + wayland : crash (corresponds to this bt)
Comment 6 Xisco Faulí 2019-05-14 22:55:24 UTC
(In reply to Julien Nabet from comment #5)
> Created attachment 151412 [details]
> bt with debug symbols (kde5+wayland)
> 
> On pc Debian x86-64 with master updated today, here are some other results:
> 
> - gtk3: still crash only when trying to play the file
> - gtk: no crash
> - gen: no crash
> - kde5 only : no crash but blank video when playing
> - kde5 + wayland : crash (corresponds to this bt)

Hi Julien,
I'm wondering if your crash in master is related to bug 124705...
@Buovjaga, do you reproduce this crash? I can't here...
Comment 7 Julien Nabet 2019-05-15 14:51:22 UTC
On Win10 with master sources updated yesterday, I can't even insert the video.

I got an error popup message with:
"The format of the selected file is not supported."

I click "OK" and it crashes.
Comment 8 Julien Nabet 2019-05-15 14:55:35 UTC
Created attachment 151444 [details]
bt Windows (windbg)
Comment 9 Julien Nabet 2019-05-15 14:58:49 UTC
Caolán: about the Windows bt, should I create a new bugtracker or can we consider it's related?
Following an error message, I got these:
00000098`469892c0 00007fff`3716da0a : 00000000`00000001 000001fe`ed8d3b50 00000098`00000000 000001fe`f43cc800 : vcllo!com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDropTarget>::Reference<com::sun::star::datatransfer::dnd::XDropTarget>+0x33
00000098`469892f0 00007fff`37825314 : 000001fe`ee6839b0 00000000`00000001 00000000`00000000 81010101`01010100 : vcllo!vcl::Window::GetDropTarget+0x4fa
00000098`469893f0 00007fff`72a56d10 : 000001fe`afe58d00 00000000`00000001 00000000`00000000 81010101`01010100 : vcllo!SalInstanceWidget::get_drop_target+0x44
00000098`46989430 00007fff`72a5682e : 00000098`46989500 000001fe`afe58e48 00000098`46989500 000001fe`f45930d0 : avmedialo!std::default_delete<weld::MessageDialog>::operator()+0x80
00000098`46989490 00007fff`72a57f92 : 00000098`46989500 000001fe`afe58e48 ffffffff`00000001 00000098`46989520 : avmedialo!std::unique_ptr<weld::MessageDialog,std::default_delete<weld::MessageDialog> >::~unique_ptr<weld::MessageDialog,std::default_delete<weld::MessageDialog> >+0x4e
00000098`469894d0 00007fff`30819bd1 : 000001fe`edeb66b8 00000098`469895b8 00000098`46989501 00000098`46989590 : avmedialo!avmedia::MediaWindow::executeFormatErrorBox+0xf2
...
(see previous comment)
Comment 10 Roman Kuznetsov 2019-05-15 20:07:59 UTC
(In reply to Julien Nabet from comment #7)
> On Win10 with master sources updated yesterday, I can't even insert the
> video.
> 
> I got an error popup message with:
> "The format of the selected file is not supported."
> 
> I click "OK" and it crashes.

Do you have any installed codecs in your OS like K-lite codec pack?
Comment 11 Julien Nabet 2019-05-15 20:10:28 UTC
(In reply to Roman Kuznetsov from comment #10)
> (In reply to Julien Nabet from comment #7)
> > ...
> 
> Do you have any installed codecs in your OS like K-lite codec pack?

None so it’s due to this i suppose since LO must use not embedded libs
Comment 12 Buovjaga 2019-05-20 15:39:35 UTC
No crash with insert or slideshow.

Frederic: which Linux distro are you running?

Arch Linux 64-bit
Version: 6.3.0.0.alpha1+
Build ID: 7aa30433719faece8c40e41d7aa8c7539287932d
CPU threads: 8; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 19 May 2019

Arch Linux 64-bit
Version: 6.2.3.2
Build ID: 6.2.3-2
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: kde5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Comment 13 Buovjaga 2019-05-20 15:42:11 UTC
Btw. from MediaInfo tool we get:
Codec ID: isom (isom/iso2/mp41)
Doing some web searches I see people having trouble with this all over the place.
Comment 14 Frederic Parrenin 2019-05-20 15:51:25 UTC
I am using debian 10 buster.
Comment 15 Caolán McNamara 2019-05-21 13:25:11 UTC
(In reply to Julien Nabet from comment #9)
> Caolán: about the Windows bt, should I create a new bugtracker or can we
> consider it's related?

Don't know what's going on there, hacking my Linux gen build to force that dialog to appear doesn't reproduce anything like that. Almost looks like the build is an incremental one and is only partially rebuilt.
Comment 16 Julien Nabet 2019-05-21 19:13:26 UTC
Created attachment 151581 [details]
bt with debug symbols (gtk3)

On pc Debian x86-64 with master sources updated today + enable-dbgutil + make clean && make, I could reproduce this.

On Linux, I don't reproduce this with gtk and gen rendering, just with gtk3 and kde5 renderings.
Comment 17 Julien Nabet 2019-05-21 19:24:18 UTC
Created attachment 151582 [details]
bt with debug symbols (kde5+wayland)

Another bt with kde5 + wayland.

I don't reproduce the crash with kde5 only.
Comment 18 Julien Nabet 2019-05-21 19:25:45 UTC
Michael: thought you might be interested in this one since I could reproduce this with kde5 + wayland but not with kde5 only.
Comment 19 Caolán McNamara 2019-05-22 08:06:47 UTC
Given the BadWindow thing, it might be worth running with 
export SAL_SYNCHRONIZE=1
and try the bt again, it'll be slower but might give a better bt
Comment 20 Julien Nabet 2019-05-22 13:06:16 UTC
(In reply to Caolán McNamara from comment #15)
> (In reply to Julien Nabet from comment #9)
> > Caolán: about the Windows bt, should I create a new bugtracker or can we
> > consider it's related?
> 
> Don't know what's going on there, hacking my Linux gen build to force that
> dialog to appear doesn't reproduce anything like that. Almost looks like the
> build is an incremental one and is only partially rebuilt.

Indeed, on Win10, I updated local sources and did a "make clean && make" and I didn't reproduce the crash after "The format of the selected file is not supported." error popup.
Comment 21 Julien Nabet 2019-05-22 13:06:40 UTC
(In reply to Caolán McNamara from comment #19)
> Given the BadWindow thing, it might be worth running with 
> export SAL_SYNCHRONIZE=1
> and try the bt again, it'll be slower but might give a better bt

Ok I'll test this on Linux tonight.
Comment 22 Michael Weghorn 2019-05-22 14:47:38 UTC
(In reply to Julien Nabet from comment #18)
> Michael: thought you might be interested in this one since I could reproduce
> this with kde5 + wayland but not with kde5 only.

Wrt crash with videos with kde5 on wayland, there's bug 125219, so it probably makes sense to retest once that one has been fixed.
Comment 23 Julien Nabet 2019-05-22 19:09:53 UTC
Created attachment 151606 [details]
bt with debug symbols (gtk3)

Here's the bt on pc Debian x86-64 with master sources updated today + enable-dbgutil + gtk3 + export SAL_SYNCHRONIZE=1
Comment 24 Caolán McNamara 2019-05-22 19:33:53 UTC
didn't really help. I imagine the crash is incidental on forced-exit after the BadWindow
Comment 25 Caolán McNamara 2019-05-23 15:59:02 UTC
ah, Julien, are your crashes under wayland ? I get your problem if I comment out the use of gtksink, which I've got locally but you may not
Comment 26 Julien Nabet 2019-05-23 16:11:40 UTC
(In reply to Caolán McNamara from comment #25)
> ah, Julien, are your crashes under wayland ? I get your problem if I comment
> out the use of gtksink, which I've got locally but you may not

I got crashes on kde5 (only with wayland enabled, ie QT_QPA_PLATFORM=wayland) or on gtk3.
Comment 27 Caolán McNamara 2019-05-23 19:30:18 UTC
does https://gerrit.libreoffice.org/#/c/72871/ make a difference ?
Comment 28 Julien Nabet 2019-05-23 19:52:28 UTC
It works perfectly on gtk3 with the patch!

With kde5 + wayland, no crash but the video is static/hangs.

I noticed this on console:
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (49ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (49ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (9ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (10ms)!
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
warn:legacy.osl:27849:27849:canvas/source/cairo/cairo_spritecanvas.cxx:89: CairoSpriteCanvas::SpriteCanvas: No Cairo capability

** (libreoffice:27849): CRITICAL **: 21:51:23.588: gst_wl_display_new_existing: assertion 'display != NULL' failed

** (libreoffice:27849): WARNING **: 21:51:23.588: Wayland compositor is missing the ability to scale, video display may not work properly.

** (libreoffice:27849): WARNING **: 21:51:23.588: Could not bind to zwp_linux_dmabuf_v1
warn:avmedia.gstreamer:27849:27993:avmedia/source/gstreamer/gstplayer.cxx:495: error: 'Application did not provide a wayland display handle' debug: 'gstwaylandsink.c(900): gst_wayland_sink_set_window_handle (): /GstPlayBin:playbin5/GstPlaySink:playsink/GstBin:vbin/GstWaylandSink:video-output:
waylandsink cannot use an externally-supplied surface without an externally-supplied display handle. Consider providing a display handle from your application with GstContext'
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (2ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (49ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (49ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (49ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (49ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (49ms)!
warn:vcl.schedule:27849:27849:vcl/source/app/scheduler.cxx:371: we're too early - restart the timer (50ms)!
Comment 29 Caolán McNamara 2019-05-24 14:43:08 UTC
excellent, the missing piece for kde/qt is setting the wayland wl_display and wl_surface (probably), which seems possible, if painful, from QGuiApplication::platformNativeInterface
Comment 30 Jan-Marek Glogowski 2019-05-24 16:57:42 UTC
This patch is not really related to the crash, but might help for kde5 Impress bugs in general: https://gerrit.libreoffice.org/#/c/72921
Comment 31 Michael Weghorn 2019-05-24 19:48:34 UTC
Using "qwidget5videosink" (if available) also makes things work with qt5 on Wayland, similar to the way Caolán's commit 8543fbc72fafc0d71a8760752ca2ef5b7119cb5c added the use of "gtksink" for the gtk3 case. (I had a quick look on tdf#125219 last week, but didn't finish a proper patch so far.)
Comment 32 Michael Weghorn 2019-05-25 22:42:39 UTC
(In reply to Michael Weghorn from comment #31)
> Using "qwidget5videosink" (if available) also makes things work with qt5 on
> Wayland, similar to the way Caolán's commit
> 8543fbc72fafc0d71a8760752ca2ef5b7119cb5c added the use of "gtksink" for the
> gtk3 case. (I had a quick look on tdf#125219 last week, but didn't finish a
> proper patch so far.)

I've created https://gerrit.libreoffice.org/#/c/72968 to demonstrate that approach. I'll be happy to abandon that one if a better solution is found as part of Caolán's fix, though.
Comment 33 Caolán McNamara 2019-05-26 13:49:22 UTC
I'll just drop the qt bits
Comment 34 Commit Notification 2019-05-27 08:27:33 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9d18bc40416b651340804f44ba5fae65f3bbbcfa%5E%21

tdf#125271 under wayland without gtksink, try waylandsink

It will be available in 6.3.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 35 Michael Weghorn 2019-05-28 07:03:28 UTC
Does this fix everything except for the qt5/kde5 case?
If so, I guess this here can be closed as fixed and the qt5 case be handled in bug 125219.
Comment 36 Caolán McNamara 2019-05-28 08:12:11 UTC
yeah, I'm unsure if Frederic's original crash is fixed by this, but its either this one or bug 125219
Comment 37 Commit Notification 2019-05-28 13:07:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/86ffd1e60c98f4f39f45507e852c428551c9db54%5E%21

tdf#125271 under wayland without gtksink, try waylandsink

It will be available in 6.2.5.

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 38 BogdanB 2019-06-04 08:14:30 UTC
On Windows I get this error:

"The format of the selected file is not supported."

Version: 6.3.0.0.beta1 (x64)
Build ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: ro-RO (ro_RO); UI-Language: en-US
Calc: threaded
Comment 39 BogdanB 2019-06-04 08:14:57 UTC
No crash, but only this error.
Comment 40 Julien Nabet 2019-06-04 08:18:08 UTC
(In reply to BogdanB from comment #38)
> On Windows I get this error:
> 
> "The format of the selected file is not supported."
>...

It's normal if you didn't install required codecs.
Comment 41 BogdanB 2019-06-04 08:35:20 UTC
I just click on Insert Audio video and on the mp4 file and this error apear. Codecs shouldn't be involved when running this mp4? Also when inserting?
Comment 42 Julien Nabet 2019-06-04 08:49:31 UTC
(In reply to BogdanB from comment #41)
> I just click on Insert Audio video and on the mp4 file and this error apear.
> Codecs shouldn't be involved when running this mp4? Also when inserting?

I'm not UI expert but find it more useful to have an error at inserting instead of having the error afterwards.
Anyway, no need to keep on here since the crash symptom is fixed.
Comment 43 BogdanB 2019-06-04 16:52:29 UTC
Ok.

I verified this bug also on linux, it's ok. No crash.

Version: 6.3.0.0.beta1
Build ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded