Now that I have a bit more time, I wanted to thank Jim for raising the question. I really want people to review my code and question anything that seems dubious.

On 11/19/2017 7:21 AM, Patricia Shanahan wrote:
The null check inside the mAutoAskUpdateAllLinks test is something of an over-reaction on my part, in the direction of defensive programming. mAutoAskUpdateAllLinks is only true in two specific cases, both of which I have reviewed. The bug was doing the parent look-up outside that if block.

I have tested forcing the parent to null in a debugger. It does not crash. I suspect it would not necessarily pick the right parent window if multiple windows are open.



On 11/19/2017 7:11 AM, Jim Jagielski wrote:
Just to be clear:

     SetUserAllowsLinkUpdate(pLink, GetUserAllowsLinkUpdate(parent));

is OK if parent == NULL? That is, does GetUserAllowsLinkUpdate()
work OK if passed NULL? Or, if parent is NULL, should we skip
calling SetUserAllowsLinkUpdate()?

On Nov 18, 2017, at 3:49 PM, Patricia Shanahan <p...@acm.org> wrote:

I'm attaching the patch in case anyone else wants to build their own test version.

On 11/18/2017 11:11 AM, Patricia Shanahan wrote:
There is a bug in my LinkManager changes. Specifically, I made the totally newbie mistake of accessing memory based on a pointer without allowing for it being null, and it turns out it can be null :-( The primary report for this is https://bz.apache.org/ooo/show_bug.cgi?id=127581, "Writer crashes after copying all content". I would have expected the failure to be some form of access violation. However, recent e-mails have convinced me that some paths include catch blocks that conceal all exceptions, so it may be the root cause of other problems. I have checked a fix into the trunk, revision 1814994. However, trunk has other changes. The simplest way to check whether other bug reports are due to this is to build a version that is identical to 4.1.4 except for the one fix. Anything that works with that but not with 4.1.4 is a duplicate. Of course, the more duplicates we have the worse the problem and the more urgent a fix. I am going ahead and doing the fix in my 4.1.5 working copy, but activating 4.1.5 is a broader decision.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org
<null_pointer.patch>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to