Project

General

Profile

Blank Page in IE9 working page in Firefox

Added by Louis Hoefler over 12 years ago

Hello everyone.

I made a simple application who should be used to display various "Page under Construction" informations.

#include <Wt/WEnvironment>
#include <Wt/WApplication>
#include <Wt/WBreak>
#include <Wt/WMenu>
#include <Wt/WStackedWidget>
#include <Wt/WContainerWidget>
#include <Wt/WText>
#include <Wt/WProgressBar>
#include <Wt/WHBoxLayout>
#include <Wt/WVBoxLayout>

// c++0x only, for std::bind
// #include <functional>

using namespace Wt;

/*
 * A simple hello world application class which demonstrates how to react
 * to events, read input, and give feed-back.
 */
class ConstructionApplication : public WApplication {
public:
 ConstructionApplication(const WEnvironment& env);
//Sites
public:
 WWidget* index();
 WWidget* status();
 WWidget* contact();
 void updateTitle();
 WString tr(const char *key);
private:
 WString l_hostname;
 WMenu* l_mainMenu;
 WHBoxLayout *l_mainHBox;
 WVBoxLayout *l_mainVBox;
};

ConstructionApplication::ConstructionApplication(const WEnvironment& env) : WApplication(env) {
l_hostname = env.hostName();
messageResourceBundle().use(appRoot() + "construction", false);

setLocale("");

WStackedWidget *contents = new WStackedWidget();
//WAnimation fade(WAnimation::Fade, WAnimation::Linear, 250);
//contents->setTransitionAnimation(fade);
contents->setId("main_page");

l_mainMenu = new WMenu(contents, Vertical);
l_mainMenu->setRenderAsList(true);
l_mainMenu->addItem(tr("index"), index())->setPathComponent("");
l_mainMenu->addItem(tr("status"), status(), WMenuItem::PreLoading);
l_mainMenu->addItem(tr("contact"), contact(), WMenuItem::PreLoading);
l_mainMenu->itemSelectRendered().connect(this, &ConstructionApplication::updateTitle);

l_mainHBox = new WHBoxLayout(root());
l_mainHBox->setContentsMargins(0, 0, 0, 0);
l_mainVBox = new WVBoxLayout;

l_mainHBox->addWidget(l_mainMenu, 0);
l_mainHBox->addLayout(l_mainVBox, 1);
l_mainVBox->addWidget(contents);
}

void ConstructionApplication::updateTitle() {
if(l_mainMenu->currentItem()) {
 setTitle(l_hostname + " - " + l_mainMenu->currentItem()->text());
}
}

WString ConstructionApplication::tr(const char *key) {
return WString::tr(key);
}

WWidget* ConstructionApplication::index() {
WContainerWidget *result = new WContainerWidget();
result->addWidget(new WText("<h1>Welcome to "+l_hostname+"</h1>"));
result->addWidget(new WBreak());
result->addWidget(new WText("This page is currently under construction."));
return result;
}
WWidget* ConstructionApplication::status() {
WContainerWidget *result = new WContainerWidget();
result->addWidget(new WText("Under contruction."));
return result;
}
WWidget* ConstructionApplication::contact() {
WContainerWidget *result = new WContainerWidget();
result->addWidget(new WText("Under contruction."));
return result;
}

WApplication *createApplication(const WEnvironment& env) {
return new ConstructionApplication(env);
}

int main(int argc, char **argv) {
return WRun(argc, argv, &createApplication);
}

If I visit the site with IE9 I get a blank page most of the time (it works 1 in 10 times). The page works without problems with the latest Firefox. I use nginx as reverse proxy and the wthttpd server backend for delivering the content.

I use nginx 0.7.67-3 (Debian package) and the Wt trunk development version.

If I right click on the page in IE9 I see that the full page was delivered.

Can someone help me with that problem?

Thank you, Louis


Replies (7)

RE: Blank Page in IE9 working page in Firefox - Added by Koen Deforche over 12 years ago

Hey Louis,

I tried to reproduce this with nginx 0.7.62 (ubuntu package), but couldn't get any failed load. Can you reproduce this with also other installs of IE9 ?

Regards,

koen

RE: Blank Page in IE9 working page in Firefox - Added by Wim Dumon over 12 years ago

Tested this on a brand new IE9 installation and the page is displayed correctly. Do you have more information that can help us track this issue?

Wim.

RE: Blank Page in IE9 working page in Firefox - Added by Louis Hoefler over 12 years ago

Hello and thanks for your support.

I also tested some different configurations. The error does only show up if the resource string xml is loaded.

construction.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<messages>
 <message id="index">Home</message>
 <message id="status">Status</message>
 <message id="contact">Contact</message>
</messages>

I start the wthttpd server with this script (after I su to the user):

start-server.sh:

#The non working fastcgi approach
#cd /home/mathinede/www
#spawn-fcgi -a 127.0.0.1 -p 8000 -u mathinede -g mathinede -- /home/mathinede/bin/construction.wt --docroot .

#The wthttp approach
cd /home/mathinede/www
/home/mathinede/bin/construction.wt --http-address 127.0.0.1 --http-port 8000 --deploy-path / --docroot . &> /dev/null &

RE: Blank Page in IE9 working page in Firefox - Added by Koen Deforche over 12 years ago

Hey,

We've made some progress in getting IE9 to fail. After it has opened multiple connections in different tabs, it may be hanging. We've also identified the reason, i.e. the browser is only using one connection which breaks Wt's expectation of its behavior due to a head-of-line blocking problem.

This does not seem to be related to the resources though. Can you confirm that this corresponds to what you are seeing ?

We've got some ideas to solve this but are still looking for a solution which does not have to much negative consequences w.r.t. the load behaviour.

Regards,

koen

RE: Blank Page in IE9 working page in Firefox - Added by Louis Hoefler over 12 years ago

Interresting. I did the following tests:

Random pages one wt page:

  1. Opening random pages in multiple tabs
  2. visiting one wt homepage (infohack.de)
    -> everything works

Two wt pages:

  1. opening random pages
  2. new window
  3. opened mathine.de
  4. new tab
  5. opened infohack.de
    now I get the empty page bug for infohack.de.
    Every new tab or window for infohack.de produces the empty page error.
    mathine.de works without problems.
    Trying to reproduce the error:
  6. Closing every ie window
  7. Opening mathine.de
  8. new tab
  9. Opening infohack.de
    -> everything works (even after waiting 10 minutes and opening dozens of the same pages)
    This is a really odd error it does not shop up everytime.
    It also looks like that it only shows up if you are using
    the wt page of a longer time period without closing IE completely.

*Also note again: If I click on the empty page and view the page source,

the page source is exactly the same as for the working page.*

This really looks like a ajax/jscript bug to me but I may be wrong.

However I would really like to investigate this error in detail but

the error does only shop up randomly.

Greetings Louis

RE: Blank Page in IE9 working page in Firefox - Added by Louis Hoefler over 12 years ago

Ah, and another thing, sorry for double posting.

If I use the fastcgi library and implement the page in fastcgi that error makes

the fastcgi process run with 99% processor usage,

completely crashing the whole system if I do not kill it.

Greetings Louis

RE: Blank Page in IE9 working page in Firefox - Added by Koen Deforche over 12 years ago

Hey Louis,

I believe it may be the same problem. I propose that we implement a fix and then you can see whether it helps.

I've filed it as a bug:

http://redmine.webtoolkit.eu/issues/964

Regards,

koen

    (1-7/7)