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 html

    url = 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());

    FLASH_PAGE_CONTENT is something like that

    "<style type='text/css'>"
    "html, body, div { margin: 0; border: 0 none; padding: 0; height: 100%; min-height: 100%; background-color:transparent;}"
    "<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' "

    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 => (0x00007ffffc5ff000) => /usr/lib/x86_64-linux-gnu/ (0x00007fd022a2a000) => /usr/lib/ (0x00007fd022746000) => /usr/local/Trolltech/Qt-4.8.4/lib/ (0x00007fd020c03000) => /usr/local/Trolltech/Qt-4.8.4/lib/ (0x00007fd020980000) => /usr/local/Trolltech/Qt-4.8.4/lib/ (0x00007fd02067f000) => /usr/local/Trolltech/Qt-4.8.4/lib/ (0x00007fd01f979000) => /usr/local/Trolltech/Qt-4.8.4/lib/ (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.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.