https://bugs.documentfoundation.org/show_bug.cgi?id=163697
Michael Weghorn <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|[email protected] |[email protected] | |desktop.org Status|ASSIGNED |NEW --- Comment #4 from Michael Weghorn <[email protected]> --- (In reply to Mike Kaganski from comment #2) > Note that there are two problems causing the crash. > > 1. In Document::handleParagraphNotifications, when > SfxHintId::TextParaInserted is called (i.e., a new para is inserted), the > call to m_xParagraphs->insert uses the height obtained from a call to > m_rEngine.GetTextHeight for that paragraph. But that call would eventually > cause a broadcast of SfxHintId::TextFormatPara - which means, that at this > point, handleParagraphNotifications will be re-entered, and the handler > (below) will try to access a yet-missing element in m_xParagraphs. > > This likely should simply be refactored to (first) insert the new element > with 0 height, and (second) set its height to the value obtained from > m_rEngine.GetTextHeight. Another alternative might possibly be to call TextEngine::GetTextHeight on demand instead of doing so in Document::handleParagraphNotifications and storing the value. (In reply to Mike Kaganski from comment #3) > (In reply to Mike Kaganski from comment #2) > > 2. The re-entry to handleParagraphNotifications will also use the iterators > > Should be fixed with https://gerrit.libreoffice.org/c/core/+/175852. Only #1 > stays. Unassigning for now, as I see you also started working on this issue already. Feel free to self-assign :) -- You are receiving this mail because: You are the assignee for the bug.
