Andreas Ekstrand wrote: > Hi, > > Yes, I most definitely like the new performance, clear now takes about 70ms > compared to the previous 1500ms. And it wasn't 8000 children I had, more like > 20000 - I was mistaken there.
So far that's fine. > Unfortunately, I discovered a serious problem with the new solution. It seems > like in some situations, the focus updating during clear causes crashes. When > a child is deleted from Fl_Group::clear, fl_throw_focus calls fl_fix_focus > which sets off a chain of events downwards in the widget hierarchy - the > event in my case was FL_MOVE - maybe because I move the mouse during the > clearing? Anyway, finally Fl_Scroll::handle traverses children that have been > deleted and that causes a crash when calling visible on the deleted child. That's bad. Thanks for the description, I can see how this can happen. And it's not moving the mouse that triggers this, but probably because fl_fix_focus sends FL_MOVE events to widgets. > > Maybe we have to cheat somehow by setting children_ to 0 before the loop in > Fl_Group::clear? Or do we end up with the same bug as in previous versions > then? Yes, this can't be done. It was one of the reasons that the old version could crash. :-( I'll have another look at it, but I'll probably have to revert it, because it's too difficult to solve now. Sorry. Albrecht _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
