Hey Zhimin,

2008/7/13 zhimin song <[EMAIL PROTECTED]>:
> when I use  WApplication::processEvents() to synchronize the server and
> client state in the ProgressDialog, I got some error and the application
> crashed.

I do not understand where this comes from -- is it possible to provide
a small test case that reproduces this behaviour ?

> but sometimes, the situaiton is  :  the first time to call it, it can do
> rightly,   but the sencond time to do that after the first, it always
> crashes, and valgrind info is:
>
> ......
> Invalid read of size 4
> ==6002==    at 0x41E84B6: Wt::WebRenderer::setHeaders(Wt::WebRequest&,
> std::string) (WebRenderer.C:239)
> ==6002==    by 0x41EE957:
> Wt::WebRenderer::serveJavaScriptUpdate(Wt::WebRequest&) (WebRenderer.C:253)
> ==6002==    by 0x41F04AB: Wt::WebRenderer::serveMainWidget(Wt::WebRequest&,
> Wt::WebRenderer::ResponseType) (WebRenderer.C:127)
> ==6002==    by 0x41F3B63:
> Wt::WebController::render(Wt::WebSession::Handler&, Wt::CgiParser*,
> Wt::WebRenderer::ResponseType, bool) (WebController.C:861)
> ==6002==    by 0x41E3B63: Wt::WebSession::doRecursiveEventLoop(std::string
> const&) (WebSession.C:451)
> ==6002==    by 0x40F0E84: Wt::WApplication::processEvents()
> (WApplication.C:780)
> ==6002==    by 0x80B8958: PList::paCalScore() (in /var/www/cx/cx.wt)
> ==6002==    by 0x80CE617: boost::_mfi::mf0<void, PList>::operator()(PList*)
> const (in /var/www/cx/cx.wt)
> ......
>
> and I very want to know the approach to show an error page when the
> application instance crashes.

When it "crashes", because of pointer errors (as in this case), then
Wt simply dies. It cannot do anything anymore!

This does not mean nothing can be done to indicate the problem to the user.

When Wt crashes while loading the initial web page, you could still
show a static error page.
When you use a reverse proxy that displays a particular error page
when a downstream server (Wt) gives an illegal response (HTTP error
codes 502, 503). Or if you are running within a FastCGI connector, you
could customize the Internal Error page (500).

When Wt crashes while doing a web page update, we could indicate an
error message to the user, but this has currently not yet been
implemented... I will add it to my TODO list.

Regards,
koen

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to