I don't think these crashes are related to window -f, I think they might be to do with $pic and drawsave. This is probably enough information for Khaled to track down, but a minimal test case would be more helpful.