[squeak-dev] primitiveWindow:width:height: failed with -vm-display-null

Marcel Taeumel marcel.taeumel at hpi.de
Tue May 31 14:17:44 UTC 2022


Hi Tony --

I added some checks via Graphics-mt.517. Let me know if this solves your problem.

In general, there is little explicit support for a "headless mode" in Morphic. While this is usually fine, failing primitives could make things more challenging. Especially since ui-scale changes might try to also resize the host-window now, which you observed via:

Preferences setDemoFonts.


... which is just a deprecated interface for ...

Display uiScaleFactor: 1.5.

Not sure what you mean by "host window size jumps around all over the place". The only thing that might happen is that the primitive is called twice if the first call did not quite yield the expected size due to host-window decorations. In that case, the delta is added and tried again. But no more re-try after that.

Best,
Marcel
Am 31.05.2022 16:00:26 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Hi Tony --

> Should hostWindowExtent: perhaps catch and ignore
> primitiveWindow:width:height: failures?

It should! Thanks for the catch. I will fix that in the image.

Best,
Marcel
Am 31.05.2022 11:46:49 schrieb Tony Garnock-Jones <tonyg at leastfixedpoint.com>:
This is still a problem. It must be either a recent image change or the
new VM that's causing the issue.

I wonder if it could be the new call to
UserInterfaceTheme>>scaleMorphicWorldBy: at fault. Certainly the host
window size jumps around all over the place in a way it never used to...
and fixFontsAndScaleAround: changed in March to call
scaleMorphicWorldBy: - it didn't used to before.

Should hostWindowExtent: perhaps catch and ignore
primitiveWindow:width:height: failures?

Here's the traceback:

vvvvvvvvvvvvvvvvvv Error: primitiveWindow:width:height: failed
vvvvvvvvvvvvvvvvvv
The time is 2022-05-31T11:29:47.71844+02:00
DisplayScreen class(Object)>>error:
DisplayScreen class(Object)>>primitiveFailed:
DisplayScreen class(Object)>>primitiveFailed
DisplayScreen class>>primitiveWindow:width:height:
DisplayScreen class>>hostWindowExtent:
DisplayScreen class>>setNewScreenSize:
UserInterfaceTheme>>scaleMorphicWorldBy:
UserInterfaceTheme>>fixFontsAndScaleAround:
UserInterfaceTheme>>apply
UserInterfaceTheme>>doScale150
UserInterfaceTheme>>setScaleFactor:
[] in UserInterfaceTheme>>setScaleFactorPreApply:
FullBlockClosure(BlockClosure)>>on:do:
UserInterfaceTheme>>setScaleFactorPreApply:
CommunityTheme(UserInterfaceTheme)>>copyWithScaleFactor:
CommunityTheme(UserInterfaceTheme)>>setScaleFactor:
CommunityTheme(UserInterfaceTheme)>>applyScaled:
DisplayScreen>>uiScaleFactor:
Preferences class>>setDemoFonts
[] in [] in UndefinedObject>>DoIt
FullBlockClosure(BlockClosure)>>on:do:
FullBlockClosure(BlockClosure)>>valueSupplyingAnswers:
FullBlockClosure(BlockClosure)>>valueSupplyingAnswer:
[] in UndefinedObject>>DoIt
[] in [] in UndefinedObject>>DoIt
FullBlockClosure(BlockClosure)>>on:do:
[] in UndefinedObject>>DoIt
[] in FullBlockClosure(BlockClosure)>>newProcess

^^^^^^^^^^^^^^^^^^ Error: primitiveWindow:width:height: failed
^^^^^^^^^^^^^^^^^^


On 5/25/22 17:09, Tony Garnock-Jones wrote:
> And I see the same error with
>
> squeak -headless -- -evaluate '[Preferences setDemoFonts]
> valueSupplyingAnswer: true'
>
> Cheers,
>   Tony
>
>
> On 5/25/22 17:09, Tony Garnock-Jones wrote:
>> Hello all,
>>
>> With the latest 6.0 beta image and a from-git `Cog` branch VM freshly
>> compiled on Debian x86_64, I see the following:
>>
>> squeak -- -evaluate '[Preferences setDemoFonts] valueSupplyingAnswer:
>> true'
>>
>> --> correctly evaluates, answers `Preferences`
>>
>> squeak -vm-display-null -- -evaluate '[Preferences setDemoFonts]
>> valueSupplyingAnswer: true'
>>
>> --> fails, with `Error: primitiveWindow:width:height: failed`
>>
>> This didn't used to happen! Has something changed wrt vm-display-null?
>>
>> Cheers,
>>    Tony
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220531/1b628a1e/attachment-0001.html>


More information about the Squeak-dev mailing list