Important: Please read the Qt Code of Conduct -

Solaris qtwebkit (unknown older version) crash on JS garbage collection (using QT 4.8.4)

  • I've got an old version of qtwebkit (exact version currently hard to determine - all I have is the built library, dragged into the build process on the build SPARC machine). A QWewView is used to display some relatively simple html files. Displaying one such html page is fine. Switching to another html file (which again is fine if it's the first one viewed) causes a crash a few seconds later.

    On the solaris build (but not the Win or Linux, where everything works fine), it seems that whenever the javascript undergoes garbage collection, it crashes. The crash was in the function _JSGlobalData::recompileAllJSFunctions() _ (which doesn't exist anymore, so this is clearly quite an old build), at the bottom of what looked like a timed JS garbage collection.

    The javascript on the page really isn't necessary, so I turned off javascript right after the QWebView is created

    @ ui->setupUi(this);
    ui->itemHelpWebView->settings()->setAttribute(QWebSettings::JavascriptEnabled , false);@

    but that seemed to only move the crash from where it was happening, to a different function
    JSGlobalObject::copyGlobalsFrom , deep in some JS handling functions.

    I don't know a thing about webkit or qtwebkit. It seems to me that this particular solaris build suffers from shoddy JS handling (presumably turning off the JS doesn't actually stop JS handling/parsing etc, just stops it being expressed on screen or some such). So then I went into the html and ripped out all mention of the JS, and now everything is fine (or rather, there's no JS but at least it doesn't crash anymore).

    I don't know how it works, but I'm guessing that any mention of JS in the html file causes the JS to be loaded/parsed/compiled/whatever, and then when I switch to a different html page, after a few seconds the JS GC decides to tidy up the JS from the last page, and it all goes wrong.

    I'm trying to track down where this build of qtwebkit comes from, and also trying to track down what the last version of qtwebkit that can be built on Solaris 10 is (and if I can get it building, I'll switch to that, of course), but while I'm doing that, does anyone happen to know off the top of their head about this sort of thing? Is there, or was there, some issue with JS GC on old (solaris) qtwebkit builds? Any suggestions beyond the obvious "get a more recent qtwebkit built"?

Log in to reply