I'm programming a very simple Qt-based application which will be interfacing some website. That website requires user to login with username/password and solved Captcha. Because of that Captcha, I decided to use QWebKit and just display the website for the user (and intercept cookies in my app). It works almost great. Almost, because I'm having a really strange problem.
On Linux my app worked like a charm. On 64bit Windows 7 (32 bit build with VS 2010) - it worked without problems too. But the same binary has a very strange issue under 32bit Windows 7. It works, but does not display Captcha images making logging in impossible. Of course, I used Dependency Walker and ensured that all the DLL's are accessible.
The Captcha is not a popular reCaptcha or something, but Minteye slider Captcha (BTW, in my humble opinion it is quite easy to solve by a computer). As you can see at the bottom of the page I linked to, this captcha downloads a series of images and user has to select the "correct" (ungarbled) one with a slider.
The problem is, that for no apparent reason, my app just doesn't show these images on 32bit Windows 7, while on 64bit version everything works. The code I'm using is very simple, but I'm posting it anyway:
loginView = new QWebView();
QWebPage *page = new QWebPage();
manager = new QNetworkAccessManager();
loginView->setPage(page);
page->setNetworkAccessManager(manager);
jar = new QNetworkCookieJar();
manager->setCookieJar(jar);
page->mainFrame()->load(QUrl("http://site.to.open"));
loginView->show();
I verified with Wireshark that these images are indeed being downloaded from the server. I even changed user agent string to hardcoded one to be sure that the server doesn't mess up something only for for 32bit windows 7. Unless I'm missing something, the dialogue with the server is identical and the problem is on client's side.
The only thing that differs (and I'm pretty sure is connected to my problem) is behaviour of WebKit when trying to navigate to specific URL via developer tools (one can enable them in QWebKit, so did I). When I open the Javascript console for login page and enter:
window.location = "http://www.google.com"
It works on all my platforms. But, when I enter the address of one of the Captcha images:
window.location = "http://img2.minteye.com/slider/image.ashx...
Results vary. On Linux and 64bit Windows 7 it works and I can see an image. On problematic 32bit Windows 7, WebKit shows error Frame load interrupted by policy change
and that's all. I have no idea what that error means and what "policy" changed. Google search didn't help me - I found posts by people complaining that they see this error, but nobody explained what causes it (WebKit source isn't super helpful too). If somebody knows, I might be able to get a workaround for my problem.
I'm also very courious, why this problem is present only on 32bit version of Windows 7.