Very simple code to test my config (Qt5.3.2, msvc2013 x64):
compile in debug and release config
runs like a charm in release
crashes in debug:
libvlc-qt "0.9.0-d735d58-git" initialised
Using libvlc version: "2.0.8 Twoflower"
HEAP[Player.exe]: Invalid address specified to RtlValidateHeap( 00000087F0590000, 00000087F05F6560 )
Player.exe a déclenché un point d'arrêt.
It happens in qlist.h:
template
Q_INLINE_TEMPLATE void QList::node_destruct(Node _from, Node to)
{
if (QTypeInfo::isLarge || QTypeInfo::isStatic)
while(from != to) --to, delete reinterpretcast<T>(to->v);
else if (QTypeInfo::isComplex)
-> while (from != to) --to, reinterpret_cast<T>(to)->~T();
}
My code:
include "TestWindow.h"
include
TestWindow::TestWindow(QWidget *parent, Qt::WindowFlags flags)
: QMainWindow(parent, flags)
{
m_vlcInstance = new VlcInstance(VlcCommon::args(), this);
m_vlcPlayer = new VlcMediaPlayer(m_vlcInstance);
m_vlcWidgetVideo = new VlcWidgetVideo(m_vlcPlayer, this);
m_vlcPlayer->setVideoWidget(m_vlcWidgetVideo);
Very simple code to test my config (Qt5.3.2, msvc2013 x64):
It happens in qlist.h: template
Q_INLINE_TEMPLATE void QList::node_destruct(Node _from, Node to)
{
if (QTypeInfo::isLarge || QTypeInfo::isStatic)
while(from != to) --to, delete reinterpretcast<T>(to->v);
else if (QTypeInfo::isComplex)
-> while (from != to) --to, reinterpret_cast<T >(to)->~T();
}
My code:
include "TestWindow.h"
include
TestWindow::TestWindow(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) { m_vlcInstance = new VlcInstance(VlcCommon::args(), this); m_vlcPlayer = new VlcMediaPlayer(m_vlcInstance); m_vlcWidgetVideo = new VlcWidgetVideo(m_vlcPlayer, this); m_vlcPlayer->setVideoWidget(m_vlcWidgetVideo);
}
void TestWindow::closeEvent(QCloseEvent *ev) { delete m_vlcPlayer; delete m_vlcMedia; delete m_vlcInstance;
}
void TestWindow::start() { QString file = QFileDialog::getOpenFileName(this, tr("Open file"), QDir::homePath(), tr("Multimedia files(*)"));
}