Apache OpenOffice (AOO) Bugzilla – Issue 109515
Paste 3D scene back to Draw from Writer: crash
Last modified: 2010-05-18 13:54:55 UTC
Procedure: 1) Create 3D scene in Draw (convert regtangle to 3D for exsample) 2) Copy 3D scene to Writer (or Calc) 3) Click document to release selection and take a new copy of 3D scene. 4) Paste 3D scene back to Draw (or to Impress). 5) You have closed very quicly all modules of OO.o without saving. (Sometimes it takes few seconds.) I can't make this crash copying 3D scene (3D body) from one Writer document to the other. Merely it seems that a 3D scene doesn't fit in quite well in Writer and it is transformed something not so good for Draw. I can't make this crash copying (automatic) shapes in 3D mode. I can't find any operating system or OO.o version specificity here. Some former issues: Issue 38429 (Same kind behaviour but a bit former state of the procedure) Issue 58204 Issue 40111 (Solution for the problem?) Paremman huomisen toivossa Risto
Reproducible under XP and Linux with OOO320_m12 and m71, too. No crash reporter comes up. Reassigned.
this is a crash in XColorItem::GetColorValue with a pTable == 0 and IsIndex() == true. cl->aw: You are the item/pool expert for drawinglayer and 3d objects, please have a look
AW: Taking a look...
AW: Looks like the ItemSet of the 3D scene has an invalid parent; the item is searched there and an also invalid item is found. Another hint is that the invalid parent (style) has another pool then the ItemSet itself. Maybe that when pasting from SW the style (parent) needs to be set explicitely to default since SW has no draw styles. Checking what happens at paste time...
AW: Problem is a general one with properties for group-like objects (Groups and 3D Scenes). Their StyleSheet handling implementations work by looking for StyleSheets at the child objects for get, and by setting at all childs for set. This works well, but handling more complicated things like migrating the ItemPool (exactly this happens at copy/paste several times) and others may set a StyleSheet at the group-like object which is wrong. To avoid this it would be possible to have derivations from sdr::properties::BaseProperties for Group and 3DScene which do special things when a StyleSheet exists (from derivation level AttributeProperties). This would be hard and complicated (e.g. 3DScene attributes also need a local ItemSet for scene-specific attributes; the copy constructor needs to know in derivation level AttributeProperties to not 'copy' the style, etc). Simpler is to use on level AttributeProperties the knowledge if it's a group-like object by using SdrObject::IsGroupObject() to ask. There are also some places where currently GetStyleSheet() is used, but mpStyleSheet should be used since GetStyleSheet() may return a null pointer. Changing, testing....
AW: Due to old code interconnections every change leads to problems, need to check something else...
AW: As often, this was the wrong trace for the specific problem. The real problem was that at paste from clipboard, the copied object had a style using the old model (which was deleted after paste, of course). A minimal invasive fix thus is to make sure this does not happen. Tried this, works well. Adding patch...
Created attachment 68401 [details] Suggested fix
AW: Added task to CWS impress187, commited, building. Setting to fixed.
sj->wg: this issue is ready to be verified in cws[impress187]
Verified in CWS.
Works under Windows XP Openoffice 3.2.1 rc1
See issue 111636 for a regression issue.