W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1997

VERY IMPORTANT: Bug in getParent()

From: Alex Milowski <lex@www.copsol.com>
Date: Fri, 24 Oct 1997 12:38:48 -0500 (CDT)
Message-Id: <199710241738.MAA00687@copsol.com>
To: www-jigsaw@w3.org
Hello all,

I think I have found a bug in getParent() that should only appear in, well,
my code!  It is a very serious problem if I am correct.

Here is the problem.

In certain situations, getParent() seems to return an object that is in
an invalid state--essentially unloaded.  When this happens, any method
call on that instance that accesses attributes will fail with a null
pointer exception because, most likely, the values array is null.

I *believe* this is happening in the following situation:

  1. An object--call it A--accesses its parent via the getParent() call, and, 
     thus, sets the value in the internal 'values' array.

  2. At some point in time, that parent resource is unloaded.

  3. Later, object A calls getParent().

  4. Since the value has not been re-loaded, it is the previous value of
     the parent attribute--which has been unloaded.

  5. The parent returned is an invalid instance of a resource.

I am going to try to verify this by the following:

  1. In my case, such a parent is a DirectoryResource.  I will setup
     a way to trace the unloading of the DirectoryResource.

  2. Once this happens, I should be able to match up--if I am correct--the
     unloading of this directory with my exception stack trace.

What I need from "those in the know" is to tell me if I am completely
bonkers on this one.  Am I on the right track?

What I don't understand from the AttributeHolder code is how a COMPUTED
value is handled.  It doesn't seem to do anything special.  It would
seem that such a value, such as parent, should be generated each time
without any caching.

We have a product which will ship in a few short months (January) that is
based on Jigsaw.  It has worked great up till now.  Now, we are seeing
varied "crashes" on the server--especially since the 1.0beta1.  We need
things to stabilize and that relies on fixing this bug.  

A work aroung I have thought of is:

   We already have a special indexer setup.  Create our own directory
   resource that *never* gets unloaded.  There just aren't that many
   directories in our system.  Hence, parent will never get unloaded.

A speedy response would be of great help!  


R. Alexander Milowski     http://www.copsol.com/   alex@copsol.com
Copernican Solutions Incorporated                  (612) 379 - 3608
Received on Friday, 24 October 1997 13:42:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:23 UTC