Project

General

Profile

clicked().connect() exception HelloWorld

Added by Szymon Janas almost 4 years ago

Hi, I am trying to run simple HelloWorld program, and with that line:

button->clicked().connect(this, &WebEngine::greet);

I am getting exception:

Exception thrown: write access violation.
this->**prev** was nullptr.

and

Unhandled exception thrown: write access violation.
this->**prev** was nullptr.

after that is just std::terminate.

it is occurs in file signals.hpp

in that func:

void add_before(SignalLink *link)
    {
      link->prev = prev; // link to last
      link->next = this;
      prev->next = link; // link from last
      prev = link;
      static_assert (sizeof (link) == sizeof (size_t), "sizeof size_t");
    }

I copied include and lib to my project folder.

I am working with Visual Studio 2019.

Addictional Library Directories

$(SolutionDir)dependencies\webtoolkit\lib

Addictional Dependencies

wthttp.lib
wthttpd.lib
wt.lib
wtd.lib
wtdbo.lib
wtdbod.lib
wtisapi.lib
wtisapid.lib

Addictional Include Directories

$(SolutionDir)dependencies\webtoolkit\include\

Server is running, but when I am trying reload website is crashing. I even did not click button.

When I comment that and run it without button connected, its working and showing some text. But I cant interact with it.

Boost libs

What do I missed?

or

Where should I catch that exception?

I tried to catch, but it is not working eihter.


Replies (3)

RE: clicked().connect() exception HelloWorld - Added by Szymon Janas almost 4 years ago

Boost libs

Sorry I missed:

Boost libs

libboost_system-vc142-mt-gd-x64-1_73.lib
libboost_system-vc142-mt-x64-1_73.lib

RE: clicked().connect() exception HelloWorld - Added by Szymon Janas almost 4 years ago

Now I noticed that I match debug and relese files:

When I left only:

wthttpd.lib
wtd.lib
wtdbod.lib
wtisapid.lib

it is working.

:D

    (1-3/3)