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/785518

Title:
  [Upstream] soffice.bin crashed with SIGSEGV in SdrEndTextEdit()

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

Bug description:
  Binary package hint: libreoffice

  1) lsb_release -rd
  Description:  Ubuntu 11.04
  Release:      11.04

  2) apt-cache policy libreoffice-impress
  libreoffice-impress:
    Installed: 1:3.3.2-1ubuntu5
    Candidate: 1:3.3.2-1ubuntu5
    Version table:
   *** 1:3.3.2-1ubuntu5 0
          500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 
Packages
          500 http://us.archive.ubuntu.com/ubuntu/ natty-proposed/main i386 
Packages
          100 /var/lib/dpkg/status
       1:3.3.2-1ubuntu4 0
          500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

  3) What is expected to happen is LibreOffice Impress does not crash
  while adding text into a new, blank Impress file.

  4) What happened instead is the new Impress file crashed.

  ProblemType: Crash
  DistroRelease: Ubuntu 11.04
  Package: libreoffice-core 1:3.3.2-1ubuntu5
  ProcVersionSignature: Ubuntu 2.6.38-9.43-generic 2.6.38.4
  Uname: Linux 2.6.38-9-generic i686
  NonfreeKernelModules: fglrx
  Architecture: i386
  CrashCounter: 1
  Date: Thu May 19 23:01:05 2011
  EcryptfsInUse: Yes
  ExecutablePath: /usr/lib/libreoffice/program/soffice.bin
  InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
  ProcCmdline: /usr/lib/libreoffice/program/soffice.bin -calc 
/home/username/Desktop/Khlood1.ods -splash-pipe=5
  ProcEnviron:
   LANGUAGE=en_US:en
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  Signal: 11
  SourcePackage: libreoffice
  StacktraceTop:
   SdrEndTextEdit () from 
/usr/lib/libreoffice/program/../basis-link/program/libsvxcoreli.so
   SdrEndTextEdit () from 
/usr/lib/libreoffice/program/../basis-link/program/libsdli.so
   cancel () from /usr/lib/libreoffice/program/../basis-link/program/libsdli.so
   KeyInput () from 
/usr/lib/libreoffice/program/../basis-link/program/libsdli.so
   KeyInput () from 
/usr/lib/libreoffice/program/../basis-link/program/libsdli.so
  Title: soffice.bin crashed with SIGSEGV in SdrEndTextEdit()
  UpgradeStatus: Upgraded to natty on 2011-05-14 (5 days ago)
  UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/785518/+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