Bug #720
closedWt internal error popup - regression
0%
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
Updated by Christophe Delépine about 13 years ago
- File firebug.jpg firebug.jpg added
Here is a snapshot of firebug catching the error
Updated by Pieter Libin about 13 years ago
- Status changed from New to InProgress
- Assignee set to Pieter Libin
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
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
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
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
}
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
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
Updated by Christophe Delépine about 13 years ago
Here is an updated hello.C
Updated by Christophe Delépine about 13 years ago
- File gui_chrome.jpg gui_chrome.jpg added
If setNativeControl(true), then it works (on Chrome).
See snapshot where i have collapsed all parameters
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
Updated by Pieter Libin about 13 years ago
- Assignee changed from Pieter Libin to Koen Deforche
Updated by Koen Deforche about 13 years ago
- Status changed from InProgress to Resolved
Fixed in latest git.
Updated by Christophe Delépine about 13 years ago
- File options.jpg options.jpg added
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
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
Updated by Koen Deforche almost 13 years ago
- Status changed from Resolved to Closed
Available in Wt 3.1.9