Project

General

Profile

Hello World crashes upon start when built in Release with MSVC 2017

Added by Karl B. almost 7 years ago

I just installed Wt-4.0.3-msvs2017-Windows-x86-SDK.exe to test the Hello World application from:

[[[https://www.webtoolkit.eu/wt/doc/tutorial/wt.html#_hello_wt]]]

My PATH env. variable was adjusted to point to Wt DLLs. Using Qt Creator with Visual Studio 2017 (Professional) as compiler, I am able to build and run the Debug version of the application successfully.

The Release version is built successfully but then crashes upon start with these error messages:

The program has unexpectedly finished.

The process was ended forcefully.

Since the crash happens before main() is executed, the problem seems to be connected with Wt DLLs.

Running the application on the cmd-line offers a little bit more information! Two pop-up error messages appear, informing:

The ordinal 313 could not be located in the dynamic link library wthttp.dll.

The ordinal 313 could not be located in the dynamic link library wt.dll.

Inspecting these DLLs on Dependency Walker seems to show that ordinal 313 is for Wt::Auth::Token::Token(void).

I don't know how to solve this problem. What can I do?

I'm sharing the instructions of my .pro file below:

win32

{

CONFIG (debug, debug | release) {

INCLUDEPATH += "C:\\Program Files (x86)\\Wt 4.0.3 msvs2017 x86\\include"

LIBS += -L"C:\\Program Files (x86)\\Wt 4.0.3 msvs2017 x86\\lib" -lwtd -lwthttpd

}

CONFIG (release, debug | release) {

INCLUDEPATH += "C:\\Program Files (x86)\\Wt 4.0.3 msvs2017 x86\\include"

LIBS += -L"C:\\Program Files (x86)\\Wt 4.0.3 msvs2017 x86\\lib" -lwt -lwthttp

}

}

SOURCES += \

main.cpp


Replies (2)

RE: Hello World crashes upon start when built in Release with MSVC 2017 - Added by Wim Dumon almost 7 years ago

Hey Karl,

That's really weird. Any chance that a wrong import library was used to build the release build? Or that there's a mismatch between the import library you used and the dlls?

I guess that the dll has actually been found since you'd otherwise get a different error message...

Wim.

RE: Hello World crashes upon start when built in Release with MSVC 2017 - Added by Karl B. almost 7 years ago

Thanks, Wim!

I uninstalled and reinstalled everything again, rebooted the computer and there's been "some" improvement.

Now I'm able to run the application in Release mode, however, the program crashes when I try to access the URL via browser.

Here's the output:

Starting C:\...\build-WtGStreamer-Desktop_Qt_5_11_1_MSVC_2017_static-Release\release\WtGStreamer.exe...

[2018-Jul-06 12:31:26.297] 744 - [info] "WServer/wthttp: initializing built-in wthttpd"

[2018-Jul-06 12:31:26.431] 744 - [info] "wthttp: started server: http://0.0.0.0:9090"

[2018-Jul-06 12:32:02.885] 744 - [info] "Wt: session created (#sessions = 1)"

[2018-Jul-06 12:32:02.885] 744 [/app_admin BNHEd8Eb51BYc0UN] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"

127.0.0.1 - - [2018-Jul-06 12:32:02.889] "GET /app_admin HTTP/1.1" 200 2930

[2018-Jul-06 12:32:02.889] 744 - [info] "WebRequest: took 4.909 ms"

The program has unexpectedly finished.

The process was ended forcefully.

C:/.../build-WtGStreamer-Desktop_Qt_5_11_1_MSVC_2017_static-Release/release/WtGStreamer.exe crashed.

Is there any #define that can be used or any flags that can be passed to the compiler to enable more debugging information on Release mode?

    (1-2/2)