SegFault when I'm trying to release one QGraphicsWebView instance pointer with html and flash build by my self.
-
Hi Mates,
I've got one Segmentation fault when I did a pointer release over one QGraphicsWebView instance, this only happens when
QWebSettings::PluginsEnabled is enabled.Also the way to load the HTML could be considered, I'm using a piece of html to renderize SWF files, next snippet
of code shows how swf file is filled into this htmlurl = QUrl::fromLocalFile(m_path);
QString html = FLASH_PAGE_CONTENT;
html = html.replace("WIDTH", QString::number(m_item->preferredSize().toSize().width()));
html = html.replace("HEIGHT", QString::number(m_item->preferredSize().toSize().height()));
html = html.replace("FLASHFILE", url.toString());
m_item->setHtml(html);FLASH_PAGE_CONTENT is something like that
"""
#ifndef FLASH_PAGE_CONTENT
#define FLASH_PAGE_CONTENT
"<html>"
"<head>"
"<style type='text/css'>"
"html, body, div { margin: 0; border: 0 none; padding: 0; height: 100%; min-height: 100%; background-color:transparent;}"
"</style>"
"</head>"
"<body><div>" \
"<embed src='FLASHFILE' id='flash' quality='high' scale='exactfit' "
"width='WIDTH' height='HEIGHT' name='flash' align='middle' "
"allowscriptaccess='always' type='application/x-shockwave-flash' "
"pluginspage='http://www.macromedia.com/go/getflashplayer'/>"
"</div></body>"
"</html>"
#endif
"""m_item is allocated at WebItem constructor [see bt], and it can be allocated n times along of time and released n
time alog of the tiem as well. But currently the release of m_item pointer is raising a Segfault, see next back trace at
pastebin url.Current I'm using 4.8.4 QT realease
pfreixes@pfreixes-laptop-linux:~/vr/git/agent/pl-qt{feature-pl-qt}$ ldd ./src/pl-qt
linux-vdso.so.1 => (0x00007ffffc5ff000)
libqjson.so.0 => /usr/lib/x86_64-linux-gnu/libqjson.so.0 (0x00007fd022a2a000)
libQtMultimediaKit.so.1 => /usr/lib/libQtMultimediaKit.so.1 (0x00007fd022746000)
libQtWebKit.so.4 => /usr/local/Trolltech/Qt-4.8.4/lib/libQtWebKit.so.4 (0x00007fd020c03000)
libQtDBus.so.4 => /usr/local/Trolltech/Qt-4.8.4/lib/libQtDBus.so.4 (0x00007fd020980000)
libQtOpenGL.so.4 => /usr/local/Trolltech/Qt-4.8.4/lib/libQtOpenGL.so.4 (0x00007fd02067f000)
libQtGui.so.4 => /usr/local/Trolltech/Qt-4.8.4/lib/libQtGui.so.4 (0x00007fd01f979000)
libQtCore.so.4 => /usr/local/Trolltech/Qt-4.8.4/lib/libQtCore.so.4 (0x00007fd0 -
My apologies,
I've found a ridiculous bug into my code, I didnt read the removeItem function explanation when it says that the The ownership of item is passed on to the caller ...
I had a couple delete objects in my code, one from stage object and another by hand by me.
Unfortunately my bug only rised when html flash page was rendered.