in reply to Re^3: Getting segfaults when destroying and recreating Tk box
in thread Getting segfaults when destroying and recreating Tk box
If I use the original code (above) and simply remove the $MW->destroy() call from abort_routine, the segmentation fault disappears. Each time I click the button, the abort_routine gets called again, but of course without the $MW->destroy, the box never closes and the programme never exits.
When I modify the abort_routine code to include the counter you suggested and test for non-zero at the outset, the segmentation fault still happens as soon as I try and destroy the box. Also, if I replace abort_routine with a do_close which contains only the $MW->destroy, I also get the segmentation fault.
I've also tried using an alternate handle for the second box ($MW2), but I still get the segfault.
It seems that its the second call to $MW->destroy that's doing the damage. Is there something I need to do to clean-up after the first call???
Thanks,
Stefan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Getting segfaults when destroying and recreating Tk box
by GrandFather (Saint) on Sep 05, 2007 at 03:44 UTC | |
by skt (Initiate) on Sep 05, 2007 at 05:59 UTC |