[squeak-dev] error on process termination

Robert Withers robert.withers at pm.me
Sat Jul 25 12:22:47 UTC 2020


To give you more context, I am looking into gaurding the Vat's eventualProcess to restart when curtailed. This method is the main processing event loop. Below that is the #restartEventLoop method.

> PriorityVat>>#processSends
>
> [
> [Processor yield.
> self nextPriorityMsg ifNotNil: [:msg | msg value].
> normalQ notNil ] ifCurtailed: [self restartEventLoop]] whileTrue
>
> PriorityVat>>#restartEventLoop
>
> | currentEventLoop |
> (Processor activeProcess == eventualProcess) ifTrue: [
> eventualProcess ifNotNil: [:ea | currentEventLoop := ea].
> eventualProcess := nil.
> eventualProcess := EventualProcess newOnVat: self.
> eventualProcess resumeAsProcess.
> currentEventLoop ifNotNil: [:ea | ea terminate ]].

The termination is where the #stepToCallee error occurs.

K, r

On 7/25/20 8:13 AM, Robert Withers wrote:

> Hi y'all,
>
> I am getting an error when terminating my process and it loops infinitely stacking this error recursively.
>
>> nil doesNotUnderstand: stepToCallee
>
> This is called from Context>>#runUntilErrorOrReturnFrom: aSender after this method has tried to get the topContext. Somehow topContext is nil, and I am guessing that returns from one of the context pops, in the following code from #runUntilErrorOrReturnFrom:.
>
>> "Control resumes here once above ensure block or exception handler is executed"
>> ^ error ifNil: [
>> "No error was raised, remove ensure context by stepping until popped"
>> [ctxt isDead] whileFalse: [topContext := topContext stepToCallee].
>> {topContext. nil}
>
> Have I setup the process incorrectly to receive this error or is something else the issue?
>
> Appreciated.
>
> Kindly,
> rabbit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200725/452c1518/attachment.html>


More information about the Squeak-dev mailing list