[Vm-dev] Lock Ups on macOS 10.13 [was Fix on management of events in OSX]

Eliot Miranda eliot.miranda at gmail.com
Tue Oct 30 21:10:35 UTC 2018


Hi Guille,

    I'm noticing some lock ups, primarily after resolution changes, or long
periods of not in interacting.  I wonder whether there are a class of
window events that the loop does not handle and if this produces a lock up,
or rather a failure to notice that new events are incoming.  I *think* I
have a reproducible case on a MacBookPro whose display resolution is set to
"More Space" (see the Displays setting tab).
Have a VM running on the laptop screen while the laptop is connected to an
Apple Cinema display (in this configuration the laptop's retina display
reverts to its default resolution).
Then disconnect the cinema display, at which point the MBP's retina
display's resolution changes back to :"More Space" and, at least when I
tried this morning, the VM locked up.

On Tue, Oct 23, 2018 at 2:08 AM Guillermo Polito <guillermopolito at gmail.com>
wrote:

>
> Hi,
>
> I see my first PR got integrated too fast. I've made a new one this
> morning that removes the guard and adds some comments in the code.
>
> Also, answering the questions that arised in the PR, I believe this should
> have no effect on systems using a single window.
> However, with multiple windowing systems, this (my patch) makes the
> consumption of events a cooperative task between the windowing systems.
> For example, if we manage to have a SDL window open but SDL does not
> consume its events (because we don't call the event processing routine),
> then those events stay in the queue for ever.
>
> I'm still not happy with the solution but I can deal with it right now,
> and it should not affect anybody else...
>
> To make it more robust I've been trying to
>  - Use a separate queue to store "alien" events and then repost them in
> the queue afterwards (
> https://developer.apple.com/documentation/appkit/nsapplication/1428710-postevent?language=objc
> ).
>     But I could not manage to make it work yet, and Cocoa's
> support/documentation does really NOT help here... :)
> - Maybe we can just discard "very old" events?
>
> But on the other side this solution is maybe simple enough to do the job.
>
> Comments are welcome ^^
> Cheers,
> Guille
>
> On Mon, Oct 22, 2018 at 3:16 PM Eliot Miranda <eliot.miranda at gmail.com>
> wrote:
>
>>
>> Hi Guille,
>>
>> On Oct 22, 2018, at 3:31 AM, Guillermo Polito <guillermopolito at gmail.com>
>> wrote:
>>
>> Hi all,
>>
>> While playing with SDL on OSX we have noticed that the main window in the
>> VM is randomly eating events that belong to other windows. This happens
>> because we are consuming events regardless the window they come from.
>>
>> The corresponding code is in the method pumpRunLoopEventSendAndSignal: in
>>
>> https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication%2Bevents.m
>>
>> I've playing around with making the VM consume only events that come from
>> its own window or from no window (window=null).
>> This seems to work correctly, and I've had run into no issues in the last
>> couple of hours.
>>
>> I've also prepared a PR with the associated changes in here:
>> https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/295.
>> I've put a guard so my code is only valid for PHAROVM builds, but I'd
>> gladly remove the guards if people think this is a good move for all the
>> community.
>>
>>
>> Yes please!
>>
>> Thanks,
>> Guille
>>
>>
>
> --
>
>
>
> Guille Polito
>
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
>
> CRIStAL - UMR 9189
>
> French National Center for Scientific Research - *http://www.cnrs.fr
> <http://www.cnrs.fr>*
>
>
> *Web:* *http://guillep.github.io* <http://guillep.github.io>
>
> *Phone: *+33 06 52 70 66 13
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181030/ae2b4e6f/attachment.html>


More information about the Vm-dev mailing list