IIPMooViewer with Qt WebKit

2012-05-18
2012-10-06
  • Barry O'Brien

    Barry O'Brien - 2012-05-18

    Hello,

    I am working on a Qt-based desktop application that uses Qt's QWebKit to
    display html content (in this case, data from IIP Server). I have the latest
    (as of 5/18/12) version if IIPMooViewer 2.0 beta installed (via github), and
    IIP Image Server 0.9.9 installed on Ubuntu 12.04, which uses Qt 4.7.4. The
    client application is running on Ubuntu 10.04, which uses Qt 4.6.2.

    The current situation is that in my application (on 10.04), when I initially
    attempt to load the page, I get a white screen. No errors show up in any logs
    (apache, iipsrv, etc.). If I reload the page twice, it suddenly works. This is
    very consistent - it happens every time (see apache log info below). On the
    same 10.04 machine, normal browsers (Chrome, Firefox) work just fine. Oddly, a
    coworker has a 12.04 development machine and he can run our application and it
    loads the IIP served data fine on the first attempt.

    To throw even more confusion into this, I had previously been using the
    IIPMooViewer 2.0 beta that was released on the IIPImageServer blog, and had no
    problems at all with the system not loading properly on the first attempt.

    So, the two options appear to be that something changed between Qt 4.6.2 and
    4.7.4 that is causing this, or that something changed in the handling of
    requests between the formal iipmooviewer 2.0 beta and the latest github
    release.

    Does anyone have any thoughts on this? Its terribly frustrating...

    Thanks!
    Barry

    // initial load attempt - doesn't get anywhere
    10.254.0.74 - - [18/May/2012:08:53:00 -0700] "GET /iipmooviewer-2.0/index.html HTTP/1.1" 200 1439 "-" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:00 -0700] "GET /iipmooviewer-2.0/css/iip.compressed.css HTTP/1.1" 200 2245 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:00 -0700] "GET /iipmooviewer-2.0/javascript/iipmooviewer-2.0-compressed.js HTTP/1.1" 200 8949 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:00 -0700] "GET /iipmooviewer-2.0/javascript/mootools-more-1.4.0.1-compressed.js HTTP/1.1" 200 10143 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:00 -0700] "GET /iipmooviewer-2.0/javascript/mootools-core-1.4.5-full-nocompat-yc.js HTTP/1.1" 200 29805 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    
    // first reload attempt - same thing
    10.254.0.74 - - [18/May/2012:08:53:40 -0700] "GET /iipmooviewer-2.0/index.html HTTP/1.1" 200 1439 "-" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:40 -0700] "GET /iipmooviewer-2.0/css/iip.compressed.css HTTP/1.1" 304 209 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:40 -0700] "GET /iipmooviewer-2.0/javascript/mootools-core-1.4.5-full-nocompat-yc.js HTTP/1.1" 304 211 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:40 -0700] "GET /iipmooviewer-2.0/javascript/iipmooviewer-2.0-compressed.js HTTP/1.1" 304 210 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:40 -0700] "GET /iipmooviewer-2.0/javascript/mootools-more-1.4.0.1-compressed.js HTTP/1.1" 304 210 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    
    // second reload attempt - magically it works!
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/index.html HTTP/1.1" 200 1439 "-" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/css/iip.compressed.css HTTP/1.1" 304 209 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/javascript/mootools-core-1.4.5-full-nocompat-yc.js HTTP/1.1" 304 211 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/javascript/iipmooviewer-2.0-compressed.js HTTP/1.1" 304 210 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/javascript/mootools-more-1.4.0.1-compressed.js HTTP/1.1" 304 210 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&obj=IIP,1.0&obj=Max-size&obj=Tile-size&obj=Resolution-number HTTP/1.1" 200 367 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/images/iip.32x32.png HTTP/1.1" 200 2260 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/images/reset.svg HTTP/1.1" 200 777 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/images/zoomOut.svg HTTP/1.1" 200 847 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /iipmooviewer-2.0/images/zoomIn.svg HTTP/1.1" 200 922 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&SDS=0,90&WID=278&QLT=98&CVT=jpeg HTTP/1.1" 200 41576 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,4 HTTP/1.1" 200 12673 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,1 HTTP/1.1" 200 11963 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,3 HTTP/1.1" 200 12009 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,5 HTTP/1.1" 200 2934 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,7 HTTP/1.1" 200 2629 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,0 HTTP/1.1" 200 13681 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,6 HTTP/1.1" 200 2606 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,8 HTTP/1.1" 200 1245 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.74 - - [18/May/2012:08:53:47 -0700] "GET /fcgi-bin/iipsrv.fcgi?FIF=/home/build/orion_pyr.tif&CNT=1&SDS=0,90&JTL=2,2 HTTP/1.1" 200 2529 "[url]http://10.254.0.138/iipmooviewer-2.0/index.html[/url]" "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.2 Safari/532.4"
    10.254.0.110 - - [18/May/2012:09:01:53 -0700] "GET /iipmooviewer-2.0/index.html HTTP/1.1" 200 1439 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) Qt/4.7.4 Safari/534.34"
    
     
  • Ruven

    Ruven - 2012-05-19

    Hard to say what is happening here. The requests are handled in the same way
    in the latest Github version. If your co-worker has it running with QT 4.7.4
    then guess it's a QT webkit problem. Is there a way to debug javascript in QT?
    Perhaps the domload event isn't occuring correctly within your version of QT?
    As no iip server requests are attempted in your initial page load. If no
    debugging tools are available, try adding alerts in the code to find up to
    where the code runs.

     
  • Barry O'Brien

    Barry O'Brien - 2012-05-24

    Hi Ruven,

    Sorry for the delay in responding - I was on travel for work.

    I got javascript debugging working in Qt using the QWebSettings inspect
    capability. Using simply the console out, I see:

    TypeError: Result of expression 'this.addEvent' [[object Object]] is not a function.
    

    This occurs in mootools-core-1.4.5-full-nocompat-yc.js:126, which looks like:

    if(this.addEvent){for(var c in b){if(typeOf(b[c])!="function"||!(/^on[A-Z]/).test(c)){continue;}this.addE\
    vent(c,b[c]);delete b[c];}}return this;}});})();
    

    After the second reload, the message goes away, and I get a message that the
    "XHR finished loading" and everything works fine.

    I believe that the lines in the compressed js correspond to lines 1472 in the
    source js, where the setOptions function is defined.

    Thoughts?

    -Barry

     
  • Ruven

    Ruven - 2012-05-25

    Maybe because you're running it inside a QT container, events such as domload
    are not working correctly or are working in a different way? Try experimenting
    with these.

     

Anonymous
Anonymous

Cancel  Add attachments