Issue 29181 - crash when removing a form control shape from Drawing document
Summary: crash when removing a form control shape from Drawing document
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: ui (show other issues)
Version: 680m38
Hardware: All All
: P2 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-14 10:47 UTC by Frank Schönheit
Modified: 2004-09-17 13:09 UTC (History)
1 user (show)

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


Attachments
document to reproduce the bug case (6.82 KB, application/vnd.sun.xml.draw)
2004-05-14 10:48 UTC, Frank Schönheit
no flags Details
stack of the crash (1.73 KB, text/html)
2004-05-14 10:48 UTC, Frank Schönheit
no flags Details
stack with the proper mime type (1.73 KB, text/plain)
2004-05-14 10:49 UTC, Frank Schönheit
no flags Details
extended bug doc (7.23 KB, application/vnd.sun.xml.draw)
2004-05-14 16:44 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2004-05-14 10:47:35 UTC
* open the attached document
* mark the shape
* run the macro therein
=> assertion "presentation object not in list before removal"
=> GPF

The macro removes the control shape in the document, using the UNO API, but
obviously Draw doesn't like this :(
If you don't mark the object before running the macro, the crash does not
happen. It seems the mark list at the view is not properly cleared when removing
the object via API.

Unfortunately, I need to use this API to fix issue 28502.

FS->CL: It would be great if this could be fixed for CWS dba12, since this is
where I've planned to fix issue 28502.
Comment 1 Frank Schönheit 2004-05-14 10:48:32 UTC
Created attachment 15254 [details]
document to reproduce the bug case
Comment 2 Frank Schönheit 2004-05-14 10:48:54 UTC
Created attachment 15255 [details]
stack of the crash
Comment 3 Frank Schönheit 2004-05-14 10:49:51 UTC
Created attachment 15256 [details]
stack with the proper mime type
Comment 4 Frank Schönheit 2004-05-14 11:25:12 UTC
adding "blocking issue 28502"
Comment 5 clippka 2004-05-14 16:13:23 UTC
fixed
Comment 6 Frank Schönheit 2004-05-14 16:27:19 UTC
verified in CWS dba12 (which is where the blocked bug lingers).
Thanks!
Comment 7 Frank Schönheit 2004-05-14 16:27:35 UTC
closing
Comment 8 Frank Schönheit 2004-05-14 16:43:34 UTC
I was to fast - reopening :(
Comment 9 Frank Schönheit 2004-05-14 16:44:25 UTC
Created attachment 15276 [details]
extended bug doc
Comment 10 Frank Schönheit 2004-05-14 16:47:48 UTC
I had to reopen this because:
- the fix leads to assertions when grouping controls: Just insert two shapes,
mark them
  both, and group them - this will assert (in all applications)
- Though the original crash is fixed, another crash (which I originally was not
aware of)
  remains: Removing, via tha API, a shape which is marked, and part of a shape
group,
  also crashs (because the mark is not removed upon removal).

To see the new bug:
- open the new bug doc
(http://www.openoffice.org/nonav/issues/showattachment.cgi/15276/29181_grouped.sxd)
- mark the upper shape (only the shape, not the group)
- run the accompanying macro
=> as soon as the document needs to be redraw, or you hover over it with the mouse,
   OOo crashes :(
Comment 11 clippka 2004-05-18 09:36:12 UTC
armin, please take over this task since I don't know how to handle the
sideeffects in the drawing layer core. Maybe just wait until your selection
rework is finished?
Comment 12 Armin Le Grand 2004-06-03 15:44:33 UTC
AW->CL: This will evtl. take too long. For a quick fix:
If SdrMarkView::SFX_NOTIFY(...) gets called on HINT_OBJREMOVED when the object
is removed from the model, it would be possible to remove it from the selection
there.
If Yes, use:
    void MarkObj(SdrObject* pObj, SdrPageView* pPV, BOOL bUnmark=FALSE, BOOL
bImpNoSetMarkHdl=FALSE);
from the same view class, iterating over the PageViews (GetPageViewCount(),
GetPageViewPvNum(...)) and using bUnmark=TRUE.
Comment 13 clippka 2004-06-04 15:39:09 UTC
Yes Armin I already tried the quick fix but the side effects inside the drawing
layer that causes new regressions are out of scope for me. Please fix it in your
selection cws
Comment 14 Armin Le Grand 2004-06-24 09:48:01 UTC
AW: The selection CWS may take too long. I will isolate the selection now
(anyways a preparation for selection CWS) and try to secure the selections. That
means: The selection will be able to react on object removal (deletion).
AW: I will do that in aw013, so that big changes will be in master fast.
Resynching this CWS would be a nightmare :-(
Comment 15 Armin Le Grand 2004-06-28 13:21:58 UTC
AW: Isolation is done. There is a new class, called SdrViewSelection which
encapsulates the SdrMarkLists used from the view. Isolation done, preparing
making selection more secure.
Comment 16 Armin Le Grand 2004-06-28 16:06:08 UTC
AW: Thanks to the new DrawHierarchy with the ViewObjectContacts, it is possible
to correct the selection actively when that contact is deleted. That's exactly
the place where it will be done after selection rework anyways.
AW: Checked, works. Done. Now it is safe to call delete () from API.
Comment 17 Armin Le Grand 2004-07-01 11:28:47 UTC
AW->WG: To check, get the 2nd attachment, load, follow instructions.
Comment 18 Armin Le Grand 2004-07-01 11:29:09 UTC
.
Comment 19 wolframgarten 2004-07-01 12:02:43 UTC
Fixed.
Comment 20 wolframgarten 2004-07-01 12:03:02 UTC
Verified in CWS.
Comment 21 wolframgarten 2004-09-17 13:09:11 UTC
Tested in master m54. Closed.