>>>> "Andy" == Andy Piper
<andy(a)xemacs.org> writes:
Andy> So somewhere along the line more are getting instantiated
Andy> instead of the current one being updated. This may mean
Andy> that when you select a different buffer the relevant tab
Andy> widget is now different (with less tabs) and so selecting a
Andy> tab causes a crash.
This would be consistent with the leftmost tab being most commonly
involved in crashes, and also with crashes occurring when the tabs sort
of randomly change order (which they do).
Andy> But I still haven't worked out why the image instance is
Andy> getting instantiated rather than updated.
Because that's what the code does?
Tracing through the code, I see that update_glyph_instance_data()
calls glyph_image_instance(), which calls specifier_instance(), which
calls the glyph's instantiate method. No conditionals that I can see.
The other kind of glyph whose instantiation is really expensive is
images, and they short-circuit the instantiation process in
glyph_image_instance_maybe().
So either x_tab_control_instantiate() needs to know about the glyphs
it has already created, which seems bizaare, or you should use
glyph_image_instance_maybe(). That function may need to be updated to
know about widgets.
Or maybe you need to avoid update_glyph_instance_data() itself, as
changing it might be wrong for other callers.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."