[Seaside] Computation has been terminated - error is back
Derek Brans
seaside@lists.squeakfoundation.org
Mon, 13 Jan 2003 15:10:11 -0800
Avi,
Nevermind, the error is back. Nothing changed to make the error come
back, though. I definitely think that the problem is in my code cause
when I load the code in another image it does the same thing.
Back to square one. Things I've changed: I've subclassed WASession to
handle 'unknownRequest' and also 'longUniqueKey'.
The latter might warrant some attention:
longUniqueKey
"ensure uniqueness even across sessions"
^ response useCookies
ifTrue: [sessionKey, '-', self uniqueKey]
ifFalse: [self uniqueKey]
This is the WASession implementation. However, there's a bug in that
code cause when using cookies I've found that sometimes sessionKey is
nil. So I subclassed it to check for sessionKey being nil.
XESession>>longUniqueKey
"ensure uniqueness even across sessions"
^ (response useCookies and: [sessionKey notNil])
ifTrue: [sessionKey, '-', self uniqueKey]
ifFalse: [self uniqueKey]
But that change I made eons ago and never got any complaints from the
system. So that might not be it. But it's a bug you might want to look
into. I don't know if that's the most graceful way to handle it.
Can you tell me more about how a request would accidentally get handled
twice? I subclassed WARequest but that was only to handle url parsing
differently.
Thanks,
Derek
On Monday, January 13, 2003, at 12:31 PM, Derek Brans wrote:
> Avi, thanks for your reply.
>
> I did some hunting around and noticed that I overrode "initialize" on
> the class side in one of my entryPoint components. I added "super
> initialize" and the application seems to be working now. Would that
> mistake account for the error I was seeing?
>
> Why does WAComponent>>initialize recompile all its subclasses?
>
> Thanks again,
>
> Derek
>
>
>
> On Monday, January 13, 2003, at 11:57 AM, Avi Bryant wrote:
>
>>
>> Derek,
>>
>> At the point that a session is asked to handle a request, it captures
>> the
>> current continuation and stores it in the instance variable 'shortJmp'
>> (which should now probably be renamed to something like
>> 'escapeRequest').
>> Whenever the response is finished, it invokes this continuation using
>> #oneShotValue, and #handleRequest: returns.
>>
>> The point of #oneShotValue is that it can only be invoked once - which
>> is
>> what we want here, since for each request there can only be one
>> response.
>> If you try to invoke a continuation with #oneShotValue twice (ie, if
>> you
>> try to respond twice to the same request), you will get the
>> "Computation
>> has been terminated" error. Essentially, you can interpret that error
>> as
>> "you've been messing about in the guts of Session and are violating
>> some
>> essential invariant it depends on".
>>
>> What does your custom Session subclass actually do?
>>
>> On Sat, 11 Jan 2003, Derek Brans wrote:
>>
>>> So, I'm getting a little error.
>>>
>>> The first page of my application loads fine, but when I click on any
>>> links I get the error:
>>>
>>> "Computation has been terminated"
>>>
>>> Method Context>>cannotReturn
>>> Continuation>>oneShotValue
>>> [] in XESession(WASession)>>handleRequest:response:
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Derek
>>>
>>>
>>>
>>> Nerd on a Wire: Web and Information Solutions
>>> Website Design - Database Systems - Site Hosting
>>> 604.874.6463
>>> mailto:info@nerdonawire.com
>>> For more information, visit http://nerdonawire.com
>>>
>>> _______________________________________________
>>> Seaside mailing list
>>> Seaside@lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/listinfo/seaside
>>>
>>
>> _______________________________________________
>> Seaside mailing list
>> Seaside@lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/listinfo/seaside
>>
>>
> Nerd on a Wire: Web and Information Solutions
> Website Design - Database Systems - Site Hosting
> 604.874.6463
> mailto:info@nerdonawire.com
> For more information, visit http://nerdonawire.com
>
> _______________________________________________
> Seaside mailing list
> Seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>
>
Nerd on a Wire: Web and Information Solutions
Website Design - Database Systems - Site Hosting
604.874.6463
mailto:info@nerdonawire.com
For more information, visit http://nerdonawire.com