[Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.

Jaromir Matas mail at jaromir.net
Mon Jul 11 14:16:27 PDT 2022


Hi Juan,

> The problem there is that the debugger for the 1/0 is opened when Morphic ends the current cycle, to reduce risk of breaking state.

Aaah, I see, thank you!; the fix works beautifully :)

Now even this example works:

[1/0] fork.
5 seconds asDelay wait.
self inform: 'test'

But unfortunately this one still doesn’t:

[1/0] fork.
5 seconds asDelay wait.
self confirm: 'test'

It raises an error because of Object >> #runningWorld associates the world with the active process and not the current UI (I’m not saying it’s wrong; I just don’t know because this all is way beyond my current skill level so I’m just observing Squeak evaluates the example ok). The comment even mentions: “This method could answer nil, if not in an UI process!” which seems to be our case…

Also, I’ve realized there are ‘sub-cycles’ run inside the UI in some cases; I’ve never really noticed and have no idea whether this is something to worry about: in Squeak or Pharo, when I run the “confirm:” test the inactive UI that evaluates the confirm: dialogue runs its subcycle which means that until the dialogue is dismissed there are two cycling loops – one belonging to the current UI and one belonging to the former UI running the dialogue…

Thanks again; apologies for just piling examples and no solution ;|
Best regards,

--

Jaromír Matas

mail at jaromir.net

From: Juan Vuletich via Cuis-dev<mailto:cuis-dev at lists.cuis.st>
Sent: Monday, July 11, 2022 21:52
To: Discussion of Cuis Smalltalk<mailto:cuis-dev at lists.cuis.st>
Cc: Juan Vuletich<mailto:JuanVuletich at zoho.com>; Jaromir Matas<mailto:mail at jaromir.net>
Subject: Re: [Cuis-dev] FW: FW: Freezing UI - can't interrupt via Alt+.

On 7/10/2022 3:31 PM, Jaromir Matas via Cuis-dev wrote:
Hi Juan, all

just a quick one:

I'm puzzled by this example:

[1/0] fork.
5 seconds asDelay wait.
self error: 'error'

I'd expect the ZeroDivide notifier pop up immediately because the #wait should allow the forked process run and request the notifier window - and thanks to the lastest updates a new UI should get spawned while the old one is being blocked... but it's not happening and I can't figure out why :) Maybe you'll see it right away; maybe I’m just missing something obvious; otherwise I'll keep digging - many thanks!

best,
Jaromir


The problem there is that the debugger for the 1/0 is opened when Morphic ends the current cycle, to reduce risk of breaking state. But the Delay runs in the same doit evaluation, in the UI process won't end the current cycle until the doit is completed.

Just pushed a fix, that briefly forks a kind of watchdog process, and spawns a new UI process if the debugger takes too long to open. Please review.

Thanks,


--

Juan Vuletich

www.cuis-smalltalk.org<http://www.cuis-smalltalk.org>

https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev

https://github.com/jvuletich

https://www.linkedin.com/in/juan-vuletich-75611b3

https://independent.academia.edu/JuanVuletich

https://www.researchgate.net/profile/Juan-Vuletich

https://patents.justia.com/inventor/juan-manuel-vuletich

https://twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220711/26dc7cbb/attachment-0001.htm>


More information about the Cuis-dev mailing list