segfault when removing WLineEdit control
Added by Tristan Hooper over 14 years ago
I recently updated from 3.1.5 to 3.1.7a, I recompiled everything, build new libs etc.
no code changes have been made in my app.
I have a control: WLineEdit *mLocation;
created: mLocation = new WLineEdit(itemCol2);
now in my destructor: delete mLocation; will cause a seg fault.
Of course I can switch back to 3.1.5 and everything cleans up nicely.
ideas?
Replies (3)
RE: segfault when removing WLineEdit control - Added by Koen Deforche over 14 years ago
Hey Tristan,
No idea, really. But perhaps it helps to know if you added the line edit to a container or layout (or WTemplate) or not?
I would expect not since if so, the delete statement is not needed ?
If you work on Linux, can you also provide the output of valgrind, or the backtrace in the debugger ?
Regards,
koen
RE: segfault when removing WLineEdit control - Added by Tristan Hooper over 14 years ago
Hi Koen,
Controls are being added to a WContainerWidget. The delete is not needed? The WContainerWidget cleans up all children?
I am working on Linux on an embedded ARM system. If the delete is not needed. Then I guess you've answered my question. Otherwise i'll get you a valgrind output
RE: segfault when removing WLineEdit control - Added by Tristan Hooper over 14 years ago
alright so delete is not needed for Children of WApplication::root()
as shown in http://www.webtoolkit.eu/wt/doc/reference/html/overview.html in section 1..... ugh. sorry.
just habit of cleaning everything up.