1

I made a very simple and boring postal code -> city lookup program (it uses an online api).

I wanted to add functionality which allows to select any country (which the api can process). For this I wanted to load the main page and parse the DOM to get all the countries. This requires webkitwidgets. http://www.zippopotam.us/#where (this is the table I want to extract the information from)

Unfortunately, when attempting to run the program it never even starts and gives me the Application Output:

Starting ZipcodeToLocation.exe...
The program has unexpectedly finished.
ZipcodeToLocation.exe crashed

So I try running the debugger:

An exception was triggered: 
Exception at 0x77cbd4f2, code: 0xc0000135: DLL not found, flags=0x0.
During startup program exited with code 0xc0000135.

Weird... so I try finding this error message on the internet and nothing really helps me. I think maybe I set something up wrong, so I open the webkitwidgets examples and compile those. When attempting to run - same error.

Using programs like some dependency walker didn't really help me much either.

I ran the MaintananceTool to check whether I was missing something, but I wasn't able to detect anything.

Im running QtCreator on Windows btw.

My .pro

QT += core gui webkitwidgets network

CONFIG += c++14

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = ZipcodeToLocation
TEMPLATE = app


SOURCES += main.cpp\
        MainWindow.cpp

HEADERS  += MainWindow.hpp

FORMS    += MainWindow.ui

If I remove the following portion from my main window ctor, everything runs es expected:

auto page = new QWebPage(this);
page->mainFrame()->load(QUrl("http://www.zippopotam.us"));

Note: this is currently the only section using webkitwidgets.

I would be really happy if someone could help me overcome this roadblock and has any suggestions on what might be going wrong.

Edit: Just to make it complete, a screenshot of the depends run: https://i.stack.imgur.com/YyYF1.png The german part translates to "The System can't find specified file".

Edit2: If you have QtCreator installed and want to attempt reproducing my error, create new QWidgets application, edit your .pro like so: QT += core gui webkitwidgets

and this line at the end of MainWindow ctor (probably any usage of webkitwidgets would do):

#include <QWebKitWidgets>
//...
QWebPage *page = new QWebPage(this);

Edit3: As a reaction to a recent comment, I tried copying all dlls from the Qt directory to the .exe location (release) and tried running it from there. It said "Missing Qt5Positioning.dll". Which is weird, because I am not using the location module... But I guess that explains the missing dll crash?

Edit4: I finally had enough and simply completely reinstalled Qt from scratch. Somehow my installation had to be messed up, because after that the problem vanished.

2
  • Did you supply Webkit Qt dll to your release software? Do you encounter this problem in debug-mode too= Oct 30, 2015 at 6:54
  • I don't see why you ask specifically for the webkit dll, since I am using webkitwidgets, which has other dependencies, too. And I am pretty sure I don't have to copy any dlls when running from inside QtCreator, since it knows where the dlls are located. Just to prove a point, I actually did copy Webkit Qt dll to the respective working directory - no change. The results for running/debugging in debug mode are identical to release mode as far as I can tell
    – smoothware
    Oct 30, 2015 at 20:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.