[Libreoffice-commits] For now, work around sporadic SwNoTxtFrm::Modify failures

Stephan Bergmann sbergman at redhat.com
Mon May 26 02:48:58 PDT 2014


FYI; would be great if some Writer expert could look into this and 
decide on a more general fix:

On 05/23/2014 11:33 PM, Stephan Bergmann wrote:
>   sw/source/core/doc/notxtfrm.cxx |    4 ++++
>   1 file changed, 4 insertions(+)
>
> New commits:
> commit 0086754e8dca3772547a9a07c4d1f10a5837b667
> Author: Stephan Bergmann <sbergman at redhat.com>
> Date:   Fri May 23 23:23:19 2014 +0200
>
>      For now, work around sporadic SwNoTxtFrm::Modify failures
>
>      ...that appear sporadically in the wild but are decently reproducible at least
>      on OS X when changing the DoUpdateModifiedOLE timeout in the SwDoc ctor
>      (sw/source/core/doc/docnew.cxx) from 1000 to 100 when running
>      CppunitTest_writerperfect_writer, caused by a bad static cast from an SwOLENode
>      to an SwGrfNode at
>
>      SwNoTxtFrm::Modify
>      SwModify::ModifyBroadcast
>      SwModify::NotifyClients
>      SwCntntNode::Modify
>      SwClient::ModifyNotification
>      SwDoc::DoUpdateModifiedOLE
>      SwDoc::LinkStubDoUpdateModifiedOLE
>      Link::Call
>      Timer::Timeout
>      Timer::ImplTimerCallbackProc
>      SalTimer::CallCallback
>      -[TimerCallbackCaller timerElapsed:]
>      [...]
>      -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
>      AquaSalInstance::AnyInput
>      Application::AnyInput
>      SwLayAction::CheckIdleEnd
>      SwLayAction::_FormatFlyCntnt
>      SwObjectFormatter::_FormatObj
>      SwObjectFormatterLayFrm::DoFormatObj
>      SwObjectFormatter::_FormatObjsAtFrm
>      SwObjectFormatterLayFrm::DoFormatObjs
>      SwObjectFormatter::FormatObjsAtFrm
>      SwLayAction::InternalAction
>      SwLayAction::Action
>      SwViewShell::ImplEndAction
>      SwViewShell::EndAction
>      SwCrsrShell::EndAction
>      SwRootFrm::EndAllAction
>      UnoActionContext::~UnoActionContext
>      UnoActionContext::~UnoActionContext
>      SwXTextDocument::unlockControllers
>      writerperfect::test::WpftImportTestBase::load
>      [...]
>
>      Change-Id: I8903cf6890c3cf526768939dca2438fa2d978310
>
> diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
> index 0b0ba92..af2200e 100644
> --- a/sw/source/core/doc/notxtfrm.cxx
> +++ b/sw/source/core/doc/notxtfrm.cxx
> @@ -602,6 +602,10 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
>           break;
>
>       case RES_UPDATE_ATTR:
> +        if (GetNode()->GetNodeType() != ND_GRFNODE) {
> +            break;
> +        }
> +        // fall through
>       case RES_FMT_CHG:
>           CLEARCACHE( (SwGrfNode*) GetNode() )
>           break;



More information about the LibreOffice mailing list