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
In reply to Re^4: Getting segfaults when destroying and recreating Tk box
by skt
in thread Getting segfaults when destroying and recreating Tk box
by skt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |