[Vm-dev] multiple crashes on macOS Sierra
John McIntosh
johnmci at smalltalkconsulting.com
Sun May 28 20:12:07 UTC 2017
At commit point d0e7bfa0f8d99b856d9ac56372f7dacecdd63106 (5/5/17) Tobias
added
NSEvent* syntheticEvent = AUTORELEASEOBJ([NSEvent
keyEventWithType:(isUp
? NSEventTypeKeyUp : NSEventTypeKeyDown)
location:[theEvent
locationInWindow]
modifierFlags:(isUp
? oldFlags : [theEvent modifierFlags])
timestamp:[theEvent
timestamp]
windowNumber:[theEvent
windowNumber]
context:
nil
characters:
@""
charactersIgnoringModifiers:
@""
isARepeat:
NO
keyCode:[theEvent
keyCode]]);
in sqSqueakOSXOpenGLView.m at - (void)flagsChanged:(NSEvent *)theEvent
However I believe this is incorrect as the NSEvent class side method is by
the old non-arc memory rules implicitly an autoreleased object, so doing
the AUTORELEASEOBJ() might cause side effects. https://developer.apple.com/
library/content/documentation/Cocoa/Conceptual/MemoryMgmt/
Articles/mmRules.html
+ (NSEvent *)keyEventWithType:(NSEventType)type
location:(NSPoint)location modifierFlags:(NSEventModifierFlags)flags
timestamp:(NSTimeInterval)time windowNumber:(NSInteger)wNum
context:(NSGraphicsContext *)unusedPassNil characters:(NSString *)keys
charactersIgnoringModifiers:(NSString *)ukeys isARepeat:(BOOL)flag
keyCode:(unsigned short)code;
If Tobias can verify and submit a change we can see if that affects
the behaviour we have been observing. Note that I"ve not been able to
recreate the problem, but in eyeballing the code this leaps out as
suspect.
On Sun, May 28, 2017 at 12:34 PM, Esteban Lorenzano <estebanlm at gmail.com>
wrote:
>
>
> On 28 May 2017, at 20:40, John McIntosh <johnmci at smalltalkconsulting.com>
> wrote:
>
> Obviously I have to spend some time today to look at this problem. Do need
> to know if people are typing just plan english ascii characters, or?
>
>
> I guess is just plain english ascii chars.
>
> Esteban
>
>
> On Sun, May 28, 2017 at 10:02 AM, Nicolas Cellier <
> nicolas.cellier.aka.nice at gmail.com> wrote:
>
>>
>>
>>
>> 2017-05-28 18:44 GMT+02:00 Eliot Miranda <eliot.miranda at gmail.com>:
>>
>>>
>>> Hi Nicolas,
>>>
>>> On May 25, 2017, at 7:44 AM, Nicolas Cellier <
>>> nicolas.cellier.aka.nice at gmail.com> wrote:
>>>
>>> Hi Tudor,
>>> it seems you type too fast.
>>> More seriously, if I google some of the apple methods in the stack like
>>> for example
>>> "bug InputMethodInstanceProcessEventRef_WithCompletionHandler"
>>> I see quite some many hits indicating that:
>>> - we are not alone
>>> - either there are some bug on mac os
>>> - or it's complex to use the frameworks right...
>>>
>>> Debugging this kind of low level problem is going to be tough...
>>> Probably some advanced objective-C knowledge is required.
>>>
>>>
>>> is the crash in our event processing code or elsewhere? If elsewhere,
>>> where?
>>>
>>>
>> Hi Eliot,
>> the crash dump provided by Tudor shows:
>>
>> ...snip...
>> 32 AppKit 0x9210cb20 -[NSView
>> interpretKeyEvents:] + 192
>> 33 Pharo 0x0013f55e
>> -[sqSqueakOSXOpenGLView keyDown:] + 310
>> 34 AppKit 0x928614bb
>> -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 5876
>> 35 AppKit 0x9285fa49
>> -[NSWindow(NSEventRouting) sendEvent:] + 547
>> 36 AppKit 0x926ea6aa
>> -[NSApplication(NSEvent) sendEvent:] + 3418
>> 37 Pharo 0x00137dcb
>> -[SqueakOSXApplication sendEvent:] + 163
>> 38 Pharo 0x001399a4
>> -[sqSqueakOSXApplication(events) pumpRunLoopEventSendAndSignal:] + 115
>> 39 Pharo 0x00139a42
>> -[sqSqueakOSXApplication(events) pumpRunLoop] + 76
>> 40 Pharo 0x0014188a nativeIoProcessEvents
>> + 208
>> 41 Pharo 0x001418de ioProcessEvents + 35
>> 42 Pharo 0x000d5470
>> checkForEventsMayContextSwitch + 880
>> 43 Pharo 0x000d6cea ceCheckForInterrupts
>> + 16
>> 44 ??? 0x0b0ad09b 0x0 + 185258139
>> 45 Pharo 0x000c31bc interpret + 647
>> 46 Pharo 0x001446ad
>> -[sqSqueakMainApplication runSqueak] + 476
>> 47 Foundation 0x95ac4adb
>> __NSFirePerformWithOrder + 419
>> 48 CoreFoundation 0x942811fe
>> __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
>> 49 CoreFoundation 0x94281157
>> __CFRunLoopDoObservers + 391
>> 50 CoreFoundation 0x942614a2 __CFRunLoopRun + 1058
>> 51 CoreFoundation 0x94260e1a CFRunLoopRunSpecific
>> + 506
>> 52 CoreFoundation 0x94260c0b CFRunLoopRunInMode +
>> 123
>> ...
>>
>>> 2017-05-24 22:28 GMT+02:00 Tudor Girba <tudor at tudorgirba.com>:
>>>
>>>>
>>>> Hi,
>>>>
>>>> Today I experienced multiple crashes on macOS Sierra.
>>>>
>>>> These happened during regular programming, mostly while typing code. I
>>>> attached here the crash dump(s). I believe I heard Phil having the same
>>>> issue with the stable Pharo VM.
>>>>
>>>> Does anyone else has the same issue?
>>>>
>>>> The VM is:
>>>> CoInterpreter VMMaker.oscog-eem.2203 uuid:
>>>> 12d4afae-8498-4e76-8efe-60eba6ef4db2 May 2 2017
>>>> StackToRegisterMappingCogit VMMaker.oscog-eem.2203 uuid:
>>>> 12d4afae-8498-4e76-8efe-60eba6ef4db2 May 2 2017
>>>> VM: 201705021552 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
>>>> $ Date: Tue May 2 08:52:41 2017 -0700 $ Plugins: 201705021552
>>>> https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
>>>>
>>>> The Pharo update number is: 60482
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>> www.feenk.com
>>>>
>>>> "From an abstract enough point of view, any two things are similar."
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
> --
> ============================================================
> ===============
> John M. McIntosh. Corporate Smalltalk Consulting Ltd
> https://www.linkedin.com/in/smalltalk
> ============================================================
> ===============
>
>
>
>
--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd
https://www.linkedin.com/in/smalltalk
===========================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170528/14a81d87/attachment-0001.html>
More information about the Vm-dev
mailing list