Alfredo Braunstein wrote:
Alfredo Braunstein wrote:
Abdelrazak Younes wrote:
Nope... unfortunately. I am sure this is a metrics problem actually.
Hum... "I am _not_ sure..."
Actually that's what I've read for some reason ;-) I would nevertheless
like to commit the patch, as valgrind tells that otherwise the wide_inset_
value is used before initialized. This wide stuff is really bad...
I did a bit of research, and I think I found something, and it seems
a mess. Please correct me if I'm wrong, this is what I understand:
Text::dispatch(LFUN_FLOAT_INSERT) calls dispatches
Cursor::dispatch(LFUN_CAPTION_INSERT) to insert the CAPTION.
One possible general problem with this may be that Cursor::dispatch is not
reentrant-safe (see beforeDispatch members).
Yes, the cursor/inset mixing is really a mess. Text should not know
about the Cursor at all! I have some cleanup in the pipe for that.
The real problem in this case
seems to be that the dispatch machinery assumes up-to-date metrics
(Cursor::dispatch calls getPos), whereas in this case the Collapsable was
already inserted and the metrics still not updated.
You may be right here. The solution then is to make sure a metrics
update happens before the second LFUN is dispatch.
Abdel.