Project

General

Profile

Bug #720

Wt internal error popup - regression

Added by Christophe Delépine almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Start date:
02/14/2011
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I get a popup error window (see attached wt_error.jpg) when i click on one of the pushbutton of my gui (see gui.jpg).

This is with latest git. I was previously using wt-3.1.6 which works fine. So there must be a regression.

In the button callback, i do :

void MinMaxEdit::Expand()
{
    if (!expanded_)
    {
        layout()->addWidget(subcontainer_);
        expandButton_->setText("-");
    }
    else
    {
        layout()->removeWidget(subcontainer_);
        expandButton_->setText("+");
    }
    expanded_ = !expanded_;
}

If i comment out the addWidget and removeWidget then the error disappears

Regards

Christophe

P.S. The new sliders look nice !


Files

wt_error.jpg (12.2 KB) wt_error.jpg Christophe Delépine, 02/14/2011 03:40 PM
gui.jpg (251 KB) gui.jpg Christophe Delépine, 02/14/2011 03:40 PM
firebug.jpg (306 KB) firebug.jpg Christophe Delépine, 02/14/2011 04:41 PM
redmine.C (1.3 KB) redmine.C Pieter Libin, 02/15/2011 10:48 AM
hello.C (1.4 KB) hello.C Koen Deforche, 02/15/2011 03:25 PM
hello.C (1.49 KB) hello.C Christophe Delépine, 02/15/2011 04:47 PM
gui_chrome.jpg (258 KB) gui_chrome.jpg Christophe Delépine, 02/15/2011 05:26 PM
options.jpg (63.1 KB) options.jpg Christophe Delépine, 02/16/2011 10:14 AM
#1

Updated by Christophe Delépine almost 11 years ago

Here is a snapshot of firebug catching the error

#2

Updated by Pieter Libin almost 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Pieter Libin
#3

Updated by Pieter Libin almost 11 years ago

Dear Christophe,

I wrote a test case by following your remarks, but I was not able to reproduce the problem.

Can you maybe take a look at the the test case (attached) what appears to be missing in comparison to your program?

You can also try to git bisect the problem with your application, this will give us a clue where we introduced the problem.

Kind regards,

Pieter

#4

Updated by Christophe Delépine almost 11 years ago

Hi Peter,

I think i have isolated the problem.

In your sample, the button and the subcontainer are inserted with addWidget() in the root layout.

In my case, the button is inside a sublayout. So i do something like :

WHBoxLayout* subLayout = new WHBoxLayout();
subLayout ->addWidget(expandButton_);

root()->layout()->addLayout(subLayout);
root()->layout()->addWidget(subcontainer_);

Can you try something like this and see if you can reproduce the problem ?

Thanks

Christophe

#5

Updated by Pieter Libin almost 11 years ago

Dear Christophe,

I still cannot reproduce the problem,

can you try to alter the example in such a way the problem is reproducible?

Kind regards,

Pieter

#6

Updated by Christophe Delépine almost 11 years ago

Hi Pieter,

I am surprised. If i insert the expand button directly in the root layout using addWidget, then it works.

I run a non multithreaded build of Wt. Do you think it could explain why you can't reproduce it ?

By the way, i had to patch StyleLayout.C as follows in order to compile without WT_THREADED :

void StyleLayout::load(Wt::WMouseEvent) {
#if defined(WT_THREADED) || defined(WT_TARGET_JAVA)
  boost::this_thread::sleep(boost::posix_time::milliseconds(2000));
#else
  //sleep(2);             <---- sleep not defined on windows
#endif // WT_THREADED
}
#7

Updated by Koen Deforche almost 11 years ago

Hey Christophe,

No luck with reproducing (see attached test case). Somehow I would imagine it depends more on the contents of subcontainer_ than on properties of the button? Are you calling setPopup() on anything?

Perhaps it is related to the slider. Can you setNativeControl(true) on the sliders and try with Chrome (which has native slider implementations) and see if the problem still occurs ?

Regards,

koen

#8

Updated by Christophe Delépine almost 11 years ago

Hi Koen,

My previous hint was wrong.

The problem is indeed related to slider.

If you change the code to :

WSlider* slider = new WSlider();
slider->resize(200, 15);
root()->layout()->addWidget(expandButton_);
root()->layout()->addWidget(slider);
root()->layout()->addWidget(subcontainer_);

then i am pretty sure you should see the exception when clicking on the expand button

Another strange thing is : if i don't call slider->resize(200,15) then i don't see the slider at all.

I will try with Chrome later on to see how it behaves.

Regards

Christophe

#9

Updated by Christophe Delépine almost 11 years ago

Here is an updated hello.C

#10

Updated by Christophe Delépine almost 11 years ago

If setNativeControl(true), then it works (on Chrome).

See snapshot where i have collapsed all parameters

#11

Updated by Pieter Libin almost 11 years ago

Hi Christophe,

thanks for changing the file, we're able to reproduce the problem now,

I will try to bisect and fix the problem.

greetings,

Pieter

#12

Updated by Pieter Libin almost 11 years ago

  • Assignee changed from Pieter Libin to Koen Deforche
#13

Updated by Koen Deforche almost 11 years ago

  • Status changed from InProgress to Resolved

Fixed in latest git.

#14

Updated by Christophe Delépine almost 11 years ago

Hi Koen,

I have moved to the latest git.

I get an error when launching the web server : Error: Document root ("e") not valid.

see attached snapshot to see my options. Looks like the docroot string has been truncated.

Regards

Christophe

#15

Updated by Koen Deforche almost 11 years ago

Hey Christophe,

Oops. That was a consequence of another change. This has been fixed now.

Regards,

koen

#16

Updated by Christophe Delépine almost 11 years ago

It works fine now. Thank you

#17

Updated by Koen Deforche almost 11 years ago

  • Status changed from Resolved to Closed

Available in Wt 3.1.9

Also available in: Atom PDF