[Seaside] WATree itemStack returning nil

Nevin Pratt nevin at smalltalkpro.com
Mon Apr 28 22:08:01 CEST 2003



Nevin Pratt wrote:

>
> I'm starting to think (again) it really *is* a WATree problem.  I'm 
> getting about one email message a day.  


I've gotten *six* stack walkbacks today.

And, I've now got a Netscape bookmark that reliably brings up a page 
that when I click on one of the WATree children, the problem occurs (I 
don't know what magic occured to produce the trouble bookmark, because I 
haven't been able to create a second one, but at least I have one now).

But, it looks like this is a problem related with some interaction 
between the WATree and the way Seaside keeps state.  And, the problem 
*might* only occur when a user bookmarks a page and tries to come back 
to it later.

You would think that since I can reliably *cause* the problem now (via 
the Netscape bookmark), I should be able to bring up the debugger and it 
would be easy to find and fix the problem.  Unfortunately, the way 
Seaside does context tricks makes it so this problem isn't as easy to 
debug as most Smalltalkers might think.  It's a mystery to me what is 
going on.

Here's something that is odd:

1. I insert a 'self inspect' inside the middle of WATree>>renderContentOn:
2. I use my Netscape "Bookmark" to bring up the trouble page.  
     (an inspector on a WATree instance pops up, as expected)
3. I evaluate 'self children' inside of the WATree inspector that popped up.
     (I get an inspector on a collection of children, as expected.  And, 
those
     children match the children shown in the NetScape bookmarked page)
4. I go back to the Netscape page and click on one of the children.
     (the browser shows a stack walkback because the error occurs)

Hmm, so what happened?  Well, lets go back to the Smalltalk-side of things:

5. I come back to the WATree inspector window that I previously evaluated
    the 'self children' and just evaluate the expression again, and 
there are no children this time.
   Well, at least I don't *think* there are children, as the itemStack 
is now a StateHolder(nil),
    and 'self itemStack' brings back nil.  ('self children' actually 
errors out with a DNU because
    the itemStack is nil).

I'm going to keep poking around to see if I can figure this out, but if 
anybody has any ideas...

Nevin




More information about the Seaside mailing list