I'm suspicious of the: svdundo.cxx /SdrUndoInsertObj::Undo/ method - I
imagine it is removing a different object than the one it is intended to
do (which explains why the main text box in the body disappears, instead
of the header on undo ;-) - an off-by-one as it were. With this
debugging patch:

--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -759,17 +759,17 @@ void SdrUndoInsertObj::Undo()
     // Trigger PageChangeCall
     ImpShowPageOfThisObject();
 
-    DBG_ASSERT(pObj->IsInserted(),"UndoInsertObj: pObj is not inserted.");
     if (pObj->IsInserted())
     {
         ImplUnmarkObject( pObj );
 
-#ifdef DBG_UTIL
         SdrObject* pChkObj=
-#endif
         pObjList->RemoveObject(nOrdNum);
-        DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj");
-    }
+
+        fprintf (stderr, "UndoInsertObj: RemoveObjNum %p == pObj %p ordinal %d 
vs %d\n",
+                 pChkObj, pObj, (int)nOrdNum, (int)pObj->GetOrdNum());
+    } else
+        fprintf (stderr, "not inserted !\n");
 }
 
 void SdrUndoInsertObj::Redo()

I get:

UndoInsertObj: RemoveObjNum 0x969d9d8 == pObj 0x9d47390 ordinal 2 vs 0

Which explains the bad behaviour.

Quite -how- this undo list is supposed to keep it's nOrdNum synchronised
with whatever is going on in the sdpage is -totally- opaque to me; the
whole thing looks crazy from a lifecycle perspective.

It's deeply unclear to me that all this referencing by ordinal is at all
sensible - particularly vs. having a reference-counted object handle to
an immutable object.

It'd be great to have a translation of GetOrdNum vs. GetOrdNumDirect in
svx/inc/svx/svdobj.hxx - to try to grok what's going on there - if there
is a German speaker around.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libreoffice in Ubuntu.
https://bugs.launchpad.net/bugs/949997

Title:
  [Upstream] Ctrl + z and Enter soffice.bin crashed with SIGSEGV in
  SfxLinkUndoAction::~SfxLinkUndoAction()

Status in LibreOffice Productivity Suite:
  In Progress
Status in “libreoffice” package in Ubuntu:
  Confirmed

Bug description:
  Freeze of LibreOffice when i work outline mode (Plan in French).

  Step:
  1) Work on impress with outline mode
  2) Ctrl + Z
  3) Enter
  4) Freeze of LibreOffice and Crash

  ProblemType: Crash
  DistroRelease: Ubuntu 12.04
  Package: libreoffice-core 1:3.5.0-2ubuntu1
  ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
  Uname: Linux 3.2.0-18-generic x86_64
  ApportVersion: 1.94.1-0ubuntu1
  Architecture: amd64
  Date: Thu Mar  8 15:50:06 2012
  ExecutablePath: /usr/lib/libreoffice/program/soffice.bin
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120301)
  ProcCmdline: /usr/lib/libreoffice/program/soffice.bin --impress 
--splash-pipe=6
  SegvAnalysis:
   Segfault happened at: 0x3c33cc0:     nop
   PC (0x03c33cc0) in non-executable VMA region: 0x0065c000-0x03fa5000 rw-p 
[heap]
  SegvReason: executing writable VMA [heap]
  Signal: 11
  SourcePackage: libreoffice
  StacktraceTop:
   ?? ()
   SfxLinkUndoAction::~SfxLinkUndoAction() () from 
/usr/lib/libreoffice/program/libsvllo.so
   SfxLinkUndoAction::~SfxLinkUndoAction() () from 
/usr/lib/libreoffice/program/libsvllo.so
   SfxUndoArray::~SfxUndoArray() () from 
/usr/lib/libreoffice/program/libsvllo.so
   SfxListUndoAction::~SfxListUndoAction() () from 
/usr/lib/libreoffice/program/libsvllo.so
  Title: soffice.bin crashed with SIGSEGV in 
SfxLinkUndoAction::~SfxLinkUndoAction()
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/949997/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to