Rutger,

That code works for me on Windows with boost 1.47 (assuming that wthttpd
config file contains docroot, http-address and http-port, otherwise an
uncaught exception is thrown in server_.setConfiguration()).

It looks to me that your compilation is broken. The this pointer in your
topmost stack is 0x2a, which does not seem right. Make sure that both Wt
and your application use the same boost version and that you don't mix up
headers from different installed versions on your system. Compile with
VERBOSE=1 and double-check that the same boost version is used as when you
compiled Wt.

My next suspect would be a bug in boost.asio when using multiple io_service
classes - but really check your compilation first. You can also use the
WIOService class as suggested before in this thread instead of creating
your own io_service class.

And finally, it could also be a bug in Wt... ;-)

Best regards,
Wim.

2012/5/31 Rutger ter Borg <[email protected]>

>
> I had trouble reproducing the testcase on an other system; please find
> attached a slightly modified main.cpp which guarantees a segfault (on this
> system, at least).
>
> Thanks,
>
> Rutger
>
>
> Backtrace:
>
> #0  0x0000000000412da3 in 
> boost::asio::detail::reactive_**socket_service_base::destroy
> (this=0x2a, impl=...)
>    at /usr/include/boost/asio/**detail/impl/reactive_socket_**
> service_base.ipp:87
> #1  0x0000000000414cdb in boost::asio::socket_acceptor_**
> service<boost::asio::ip::tcp>:**:destroy (this=0x2, impl=...)
>    at /usr/include/boost/asio/**socket_acceptor_service.hpp:**119
> #2  0x00000000004145f5 in boost::asio::basic_io_object<**
> boost::asio::socket_acceptor_**service<boost::asio::ip::tcp>,
> true>::~basic_io_object (this=0x6541a0,
>
>    __in_chrg=<optimized out>)
>    at /usr/include/boost/asio/basic_**io_object.hpp:196
> #3  0x00000000004132ea in 
> boost::asio::basic_socket_**acceptor<boost::asio::ip::tcp,
> boost::asio::socket_acceptor_**service<boost::asio::ip::tcp>
> >::~basic_socket_acceptor (this=0x6541a0, __in_chrg=<optimized out>)
>    at /usr/include/boost/asio/basic_**socket_acceptor.hpp:54
> #4  0x00007ffff730cbcd in http::server::Server::Server (this=0x654050,
>
>    config=..., wtServer=...)
>    at /home/pgquiles/wt/b/witty-3.2.**1/src/http/Server.C:65
> #5  0x00007ffff732171e in Wt::WServer::start (this=0x7fffffffe110)
>    at /home/pgquiles/wt/b/witty-3.2.**1/src/http/WServer.C:147
> #6  0x0000000000413436 in server::run (this=0x7fffffffe0e0)
>    at /home/rutger/.../main.cpp:17
> #7  0x000000000040f373 in main (argc=1, argv=0x7fffffffe298)
>    at /home/rutger/.../main.cpp:36
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to