Results 1 to 12 of 12

Thread: qtwebkit crash

  1. #1
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qtwebkit crash

    hello, when i try to open the following link http://moztw.org/demo/audioplayer/ with my web browser, it crashes, i even tried to open it with fancy browser, same it crashes, but Arora don't crashes on oppening it, please i nedd help, the same thing happend when i try to open any html5 audio or video,


    this is a part of my settings, i dont know what is wrong, or there is something else i should do, please help!

    QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabase Enabled,true); // important, to implement, for html5
    QWebSettings::globalSettings()->setOfflineStoragePath ( qApp->applicationDirPath() + "/cache/" );

    QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationC acheEnabled,true);// important, to implement, for html5
    QWebSettings::globalSettings()->setOfflineWebApplicationCachePath ( qApp->applicationDirPath() + "/cache/" );

    QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled,tr ue);// important, to implement, for html5
    QWebSettings::globalSettings()->setLocalStoragePath ( qApp->applicationDirPath() + "/cache/");

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qtwebkit crash

    What does your browsers crashing while opening some arbitrary web site have to do with Qt? What is "my web browser" or "fancy browser" anyway?

    Let us for a moment assume that "my web browser" is something you have written using Qt and QtWebKit. What have you done to try to isolate where it crashes? Where does it crash? What does a backtrace look like? What do any on the lines of code you posted above have to do with it? Do you have the needed plugins/codecs to play OGG audio?

    Does this problem have anything to do with your request here?

  3. #3
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qtwebkit crash

    no the two problems are not related, yes by my web browser, i meant a web browser a wrote using qt and QWebkit! yes i have the codecs to playogg audio, but i don't know what is wrong! this is what backtraces gives

    #0 0x296235db in ?? ()
    #1 0x13f6eaa0 in ?? ()
    #3 0x13f6e9e4 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)


    it is not very helpful, i don't know where to start to handle this

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qtwebkit crash

    This is an HTML 5 test page. Firefox handles it without any problems. I have no idea whether Webview will work with HTML 5, but the most likely explanation for a failure if it cannot is badly handled error conditions. Compiling and running a debug version would be helpful; a clue about where in your code the failure occurs, and examples of the code around that point, would also be worthwhile.

  5. #5
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qtwebkit crash

    yes the version iam testing is a debug version, and that is what i get from backtrace, i will look at it again, but i don't know how to isolate the section of the code from where the problem comes from.
    thanks

  6. #6
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qtwebkit crash

    If you don't know how to manage a debugger, put print statements in your code at various points and send them to cerr. The failure point is somewhere between the last statement you see printed and the following one. You can quickly binary search your code to find the exact point of failure this way.

  7. #7
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qtwebkit crash

    thanks alot, that will be helpfull, i will do it, and report here!

  8. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qtwebkit crash

    Post a one file example program that crashes on your system and tell us which platform you are targeting and perhaps someone else can reproduce the crash. The quick throw-together below doesn't crash for me on Linux (it does whinge about missing plugins though).
    Qt Code:
    1. #include <QtGui>
    2. #include <QtWebKit>
    3. #include <QDebug>
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. QApplication app(argc, argv);
    8.  
    9. qApp->setApplicationName("test");
    10.  
    11. // These are your settings. Safe to have them all point to the same place?
    12. QWebSettings *s = QWebSettings::globalSettings();
    13. s->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
    14. s->setOfflineStoragePath(qApp->applicationDirPath() + "/cache/" );
    15. s->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
    16. s->setOfflineWebApplicationCachePath(qApp->applicationDirPath() + "/cache/");
    17. s->setAttribute(QWebSettings::LocalStorageEnabled, true);
    18. s->setLocalStoragePath(qApp->applicationDirPath() + "/cache/");
    19.  
    20. QWebView wv;
    21. wv.show();
    22. QUrl url("http://moztw.org/demo/audioplayer/");
    23. wv.load(url);
    24. return app.exec();
    25. }
    To copy to clipboard, switch view to plain text mode 

  9. #9
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qtwebkit crash

    i tried your code, it also crashes on my system, windows 7 64bit! but arora (a qtwebkit based browser) does'nt crash on openning the link, the what is wrong? please help

  10. #10
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qtwebkit crash

    please help!!!!

  11. #11
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qtwebkit crash

    Anything could be wrong and repeatedly saying "crashes on my system" doesn't provide any useful information to diagnose the problem. Are you building the code in 32 or 64-bit? Have you tried to run the short sample program in a debugger? Have you tried it on a 32-bit machine? Have you tried separating the three caches (see the comment in my example)? Is the applicationDirPath() writeable on your machine (it typically isn't in deployed applications on Windows 7)?

    It's also largely irrelevant what Arora does; it was built with a different compiler, may be 32 rather than 64-bit, might be using internal codecs, etc.

  12. #12
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qtwebkit crash

    it seem as it only does it in my machine, windows 7 64 bit! backtrace gave me something related with nero plugins... and i tested the code under a virtual windows xp, and no crash!

Similar Threads

  1. QtWebKit and on-the-fly images
    By miwarre in forum Newbie
    Replies: 5
    Last Post: 12th June 2011, 15:44
  2. QtWebKit and Flash plugin crash
    By PrimeCP in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2010, 15:24
  3. Crash gracefully? No crash!
    By lni in forum Qt Programming
    Replies: 0
    Last Post: 7th July 2010, 03:59
  4. help with QtWebkit performances
    By lamosca in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd March 2010, 12:47
  5. where is QtWebKit.lib?
    By richardander in forum Installation and Deployment
    Replies: 8
    Last Post: 8th April 2009, 16:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.