Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. SegFault when I'm trying to release one QGraphicsWebView instance pointer with html and flash build by my self.
Forum Updated to NodeBB v4.3 + New Features

SegFault when I'm trying to release one QGraphicsWebView instance pointer with html and flash build by my self.

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 1 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pfreixes
    wrote on last edited by
    #1

    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());
    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.

    http://pastebin.com/xJBVzenE

    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

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pfreixes
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved