error on process termination

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error on process termination

Squeak - Dev mailing list

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



Reply | Threaded
Open this post in threaded view
|

Re: error on process termination

Squeak - Dev mailing list

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



Reply | Threaded
Open this post in threaded view
|

Re: error on process termination

Christoph Thiede

Hi Robert,


without knowing details about your error, can you eliminate the infinite loop by applying any of the proposed solutions from http://forum.world.st/I-broke-the-debugger-td5110752.html#a5110814?

Best,
Christoph

Von: Squeak-dev <[hidden email]> im Auftrag von Robert Withers via Squeak-dev <[hidden email]>
Gesendet: Samstag, 25. Juli 2020 14:22:47
An: Squeak-dev
Betreff: Re: [squeak-dev] error on process termination
 

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



Carpe Squeak!