Issue 109515 - Paste 3D scene back to Draw from Writer: crash
Summary: Paste 3D scene back to Draw from Writer: crash
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: editing (show other issues)
Version: OOo 3.2
Hardware: PC All
: P2 Trivial (vote)
Target Milestone: OOo 3.2.1
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-22 11:10 UTC by Risto Jääskeläinen
Modified: 2010-05-18 13:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Suggested fix (1019 bytes, text/plain)
2010-03-17 17:33 UTC, Armin Le Grand
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Risto Jääskeläinen 2010-02-22 11:10:54 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
Comment 1 wolframgarten 2010-02-22 11:49:17 UTC
Reproducible under XP and Linux  with OOO320_m12 and m71, too. No crash reporter
comes up. Reassigned.
Comment 2 clippka 2010-03-12 11:25:48 UTC
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
Comment 3 Armin Le Grand 2010-03-16 15:50:53 UTC
AW: Taking a look...
Comment 4 Armin Le Grand 2010-03-16 16:02:01 UTC
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...
Comment 5 Armin Le Grand 2010-03-17 11:46:42 UTC
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....
Comment 6 Armin Le Grand 2010-03-17 14:54:47 UTC
AW: Due to old code interconnections every change leads to problems, need to
check something else...
Comment 7 Armin Le Grand 2010-03-17 17:32:53 UTC
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...
Comment 8 Armin Le Grand 2010-03-17 17:33:57 UTC
Created attachment 68401 [details]
Suggested fix
Comment 9 Armin Le Grand 2010-03-17 17:43:41 UTC
AW: Added task to CWS impress187, commited, building. Setting to fixed.
Comment 10 sven.jacobi 2010-03-23 16:36:16 UTC
sj->wg: this issue is ready to be verified in cws[impress187]
Comment 11 wolframgarten 2010-03-24 13:09:22 UTC
Verified in CWS.
Comment 12 vohe 2010-05-08 12:40:33 UTC
Works under Windows XP Openoffice 3.2.1 rc1
Comment 13 groucho266 2010-05-18 13:54:55 UTC
See issue 111636 for a regression issue.