Project

General

Profile

Actions

Bug #720

closed

Wt internal error popup - regression

Added by Christophe Delépine about 13 years ago. Updated almost 13 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
Actions #1

Updated by Christophe Delépine about 13 years ago

Here is a snapshot of firebug catching the error

Actions #2

Updated by Pieter Libin about 13 years ago

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

Updated by Pieter Libin about 13 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

Actions #4

Updated by Christophe Delépine about 13 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

Actions #5

Updated by Pieter Libin about 13 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

Actions #6

Updated by Christophe Delépine about 13 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
}
Actions #7

Updated by Koen Deforche about 13 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

Actions #8

Updated by Christophe Delépine about 13 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

Actions #9

Updated by Christophe Delépine about 13 years ago

Here is an updated hello.C

Actions #10

Updated by Christophe Delépine about 13 years ago

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

See snapshot where i have collapsed all parameters

Actions #11

Updated by Pieter Libin about 13 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

Actions #12

Updated by Pieter Libin about 13 years ago

  • Assignee changed from Pieter Libin to Koen Deforche
Actions #13

Updated by Koen Deforche about 13 years ago

  • Status changed from InProgress to Resolved

Fixed in latest git.

Actions #14

Updated by Christophe Delépine about 13 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

Actions #15

Updated by Koen Deforche about 13 years ago

Hey Christophe,

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

Regards,

koen

Actions #16

Updated by Christophe Delépine about 13 years ago

It works fine now. Thank you

Actions #17

Updated by Koen Deforche almost 13 years ago

  • Status changed from Resolved to Closed

Available in Wt 3.1.9

Actions

Also available in: Atom PDF