0

I am experiencing app crashes due to a Access violation when trying to load a file with the Video QML Type. I am running a C++/Qt 11.1 application on Windows, using msvc2017 compiler.

I am currently trying to render a simple video in a loop within my application using the following code:

import QtQuick 2.11
import QtMultimedia 5.8

Video {
    id: videoPlayer
    anchors.fill: parent
    source: "C:/Users/Me/Desktop/video.avi"
    autoLoad: true
    autoPlay: false
    focus: true
    fillMode: VideoOutput.PreserveAspectFit
    loops: MediaPlayer.Infinite
    muted: true
}

When executing this code I am getting an exception with the following call stack:

Visual Studio Callstack

It looks like something with a signal from the QAbstractVideoSurface inside the QtMultimedia module is not working out. What I am wondering about is that this exception does not happen always, but only in roughly 4/5 application runs (if I turn autoLoad: false and triggering the load by a click, I sometimes works somehow). As well it only happens in Release build configuration.

I was already thinking about a codec issue, but I could reproduce it using different video files with different codecs.

It actually looks like a threading problem to me, but I have currently no clue how this appears as I am actually just trying to render the code above in the main UI thread.

Maybe somebody already ran in a similar or connected issue?

Thanks already!

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Jacob
  • 1
  • Undefined behavior somewhere int he code, there is an uninitialized pointer. – Matthieu Brucher Dec 10 '18 at 14:44
  • Have you tried with Qt 5.11.3, which is the latest version of the 5.11 series ? – Massimo Callegari Dec 10 '18 at 14:48
  • @VTT that's a QtCreator crash! Has nothing to do with the OP question. – Massimo Callegari Dec 10 '18 at 14:51
  • @MassimoCallegari That's Qt bugtracker, it lists bugs for both qt libs and tools. Creator-related bug just happen to be first in the list. – user7860670 Dec 10 '18 at 14:53
  • @VTT so the link should be [this](https://bugreports.qt.io/issues/?jql=text%20~%20%22QtMultimedia%20crash%22). If I click your link, it shows a QtCreator issue. Anyway, that's a pretty generic reply. It's just like saying "suit yourself" – Massimo Callegari Dec 10 '18 at 14:56
  • @MassimoCallegari Your link leads to the same location as mine. And yes, this is a generic reply that directs op to location where "somebody already ran in a similar or connected issue" are gethered. – user7860670 Dec 10 '18 at 15:04
  • change to `file://C:/Users/Me/Desktop/video.avi` – eyllanesc Dec 10 '18 at 21:47
  • @MassimoCallegari Did not try it with 5.11.3 but had the issue already with Qt 5.8.0. Thought is was some QT bug and used a workaround. Now after migrating I have still the same behaviour and want to solve it finally. – Jacob Dec 11 '18 at 08:00
  • @eyllanesc Should not be the issue. If I use the path with the file protocol prefix I get an error in `DirectShowPlayerService::doSetUrlSource`. As well the path in the original format works in debug build configuration. – Jacob Dec 11 '18 at 08:14

0 Answers0