Fwd: [Vm-dev] multiple crashes on macOS Sierra
---------- Forwarded message ---------- From: Tobias Pape <Das.Linux@gmx.de> Date: Mon, May 29, 2017 at 12:09 AM Subject: Re: [Vm-dev] multiple crashes on macOS Sierra To: John McIntosh <johnmci@smalltalkconsulting.com> Cc: Squeak Virtual Machine Development Discussion < vm-dev@lists.squeakfoundation.org> Hi John, all
On 28.05.2017, at 22:12, John McIntosh <johnmci@smalltalkconsulting.com> wrote:
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
That's correct.
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; Well, I have not found a reference to how this relates to autorelease (the Apple docs are becoming increasingly useless these days :() I read this https://developer.apple.com/reference/appkit/nsevent/ 1533943-keyeventwithtype?language=objc and the header /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h and although autorelase pops up somewhere in the file, it does not somewhere near the declaration. I read through the code an found quite a few AUTORELEASEOBJ() around object creation and (apparently wrongly) thought I would need that here. I now understand that I should only autorelease alloc/inited stuff. So you may be right here. Fixed in 0f07ffbed Best regards -Tobias
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. [snip]
Hi, I am not sure what is the status with this issue, but it seems clear that there exists a problem, so I opened an issue to accumulate the different opinions: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/141 Cheers, Doru
On May 29, 2017, at 9:53 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
---------- Forwarded message ---------- From: Tobias Pape <Das.Linux@gmx.de> Date: Mon, May 29, 2017 at 12:09 AM Subject: Re: [Vm-dev] multiple crashes on macOS Sierra To: John McIntosh <johnmci@smalltalkconsulting.com> Cc: Squeak Virtual Machine Development Discussion <vm-dev@lists.squeakfoundation.org>
Hi John, all
On 28.05.2017, at 22:12, John McIntosh <johnmci@smalltalkconsulting.com> wrote:
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
That's correct.
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/M...
+ (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;
Well, I have not found a reference to how this relates to autorelease (the Apple docs are becoming increasingly useless these days :() I read this https://developer.apple.com/reference/appkit/nsevent/1533943-keyeventwithtyp... and the header /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h and although autorelase pops up somewhere in the file, it does not somewhere near the declaration. I read through the code an found quite a few AUTORELEASEOBJ() around object creation and (apparently wrongly) thought I would need that here.
I now understand that I should only autorelease alloc/inited stuff.
So you may be right here.
Fixed in 0f07ffbed
Best regards -Tobias
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.
[snip]
-- www.tudorgirba.com www.feenk.com "Reasonable is what we are accustomed with."
Tobias has commited a fix in cog branch a few days ago. https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed... So could you try latest Vm from bintray and report? https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed... 2017-06-01 16:12 GMT+02:00 Tudor Girba <tudor@tudorgirba.com>:
Hi,
I am not sure what is the status with this issue, but it seems clear that there exists a problem, so I opened an issue to accumulate the different opinions: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/141
Cheers, Doru
On May 29, 2017, at 9:53 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
---------- Forwarded message ---------- From: Tobias Pape <Das.Linux@gmx.de> Date: Mon, May 29, 2017 at 12:09 AM Subject: Re: [Vm-dev] multiple crashes on macOS Sierra To: John McIntosh <johnmci@smalltalkconsulting.com> Cc: Squeak Virtual Machine Development Discussion <vm-dev@lists. squeakfoundation.org>
Hi John, all
On 28.05.2017, at 22:12, John McIntosh <johnmci@smalltalkconsulting. com> wrote:
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
That's correct.
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;
Well, I have not found a reference to how this relates to autorelease (the Apple docs are becoming increasingly useless these days :() I read this https://developer.apple.com/reference/appkit/nsevent/ 1533943-keyeventwithtype?language=objc and the header /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h and although autorelase pops up somewhere in the file, it does not somewhere near the declaration. I read through the code an found quite a few AUTORELEASEOBJ() around object creation and (apparently wrongly) thought I would need that here.
I now understand that I should only autorelease alloc/inited stuff.
So you may be right here.
Fixed in 0f07ffbed
Best regards -Tobias
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.
[snip]
-- www.tudorgirba.com www.feenk.com
"Reasonable is what we are accustomed with."
What is in bintray now is the same as vm latest :)
On 1 Jun 2017, at 18:30, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
Tobias has commited a fix in cog branch a few days ago. https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed... So could you try latest Vm from bintray and report? https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed...
2017-06-01 16:12 GMT+02:00 Tudor Girba <tudor@tudorgirba.com>:
Hi,
I am not sure what is the status with this issue, but it seems clear that there exists a problem, so I opened an issue to accumulate the different opinions: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/141
Cheers, Doru
On May 29, 2017, at 9:53 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
---------- Forwarded message ---------- From: Tobias Pape <Das.Linux@gmx.de> Date: Mon, May 29, 2017 at 12:09 AM Subject: Re: [Vm-dev] multiple crashes on macOS Sierra To: John McIntosh <johnmci@smalltalkconsulting.com> Cc: Squeak Virtual Machine Development Discussion <vm-dev@lists.squeakfoundation.org>
Hi John, all
On 28.05.2017, at 22:12, John McIntosh <johnmci@smalltalkconsulting.com> wrote:
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
That's correct.
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/M...
+ (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;
Well, I have not found a reference to how this relates to autorelease (the Apple docs are becoming increasingly useless these days :() I read this https://developer.apple.com/reference/appkit/nsevent/1533943-keyeventwithtyp... and the header /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h and although autorelase pops up somewhere in the file, it does not somewhere near the declaration. I read through the code an found quite a few AUTORELEASEOBJ() around object creation and (apparently wrongly) thought I would need that here.
I now understand that I should only autorelease alloc/inited stuff.
So you may be right here.
Fixed in 0f07ffbed
Best regards -Tobias
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.
[snip]
-- www.tudorgirba.com www.feenk.com
"Reasonable is what we are accustomed with."
Hi,
On Jun 1, 2017, at 7:23 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote:
What is in bintray now is the same as vm latest :)
Do I understand correctly that: curl get.pharo.org/vmLatest60 | bash will get the VM with the fix? Doru
On 1 Jun 2017, at 18:30, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
Tobias has commited a fix in cog branch a few days ago. https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed... So could you try latest Vm from bintray and report? https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed...
2017-06-01 16:12 GMT+02:00 Tudor Girba <tudor@tudorgirba.com>: Hi,
I am not sure what is the status with this issue, but it seems clear that there exists a problem, so I opened an issue to accumulate the different opinions: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/141
Cheers, Doru
On May 29, 2017, at 9:53 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
---------- Forwarded message ---------- From: Tobias Pape <Das.Linux@gmx.de> Date: Mon, May 29, 2017 at 12:09 AM Subject: Re: [Vm-dev] multiple crashes on macOS Sierra To: John McIntosh <johnmci@smalltalkconsulting.com> Cc: Squeak Virtual Machine Development Discussion <vm-dev@lists.squeakfoundation.org>
Hi John, all
On 28.05.2017, at 22:12, John McIntosh <johnmci@smalltalkconsulting.com> wrote:
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
That's correct.
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/M...
+ (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;
Well, I have not found a reference to how this relates to autorelease (the Apple docs are becoming increasingly useless these days :() I read this https://developer.apple.com/reference/appkit/nsevent/1533943-keyeventwithtyp... and the header /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h and although autorelase pops up somewhere in the file, it does not somewhere near the declaration. I read through the code an found quite a few AUTORELEASEOBJ() around object creation and (apparently wrongly) thought I would need that here.
I now understand that I should only autorelease alloc/inited stuff.
So you may be right here.
Fixed in 0f07ffbed
Best regards -Tobias
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.
[snip]
-- www.tudorgirba.com www.feenk.com
"Reasonable is what we are accustomed with."
-- www.tudorgirba.com www.feenk.com "If you interrupt the barber while he is cutting your hair, you will end up with a messy haircut."
Hi, Using Aliaksei Syrelâs instructions I can reproduce the crash on macOS Sierra Version 10.12.5 using the Pharo 6. I installed it using: curl get.pharo.org | bash How can I get the latest VM for Pharo 6? âcurl get.pharo.org/vmLatest60 | bashâ did not work for me. [1] Cheer, Bernhard [1] MacBookProRetina:pharo-vm-test bernhard$ curl get.pharo.org/vmLatest60 | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5696 100 5696 0 0 48223 0 --:--:-- --:--:-- --:--:-- 48271 Downloading the latest pharoVM: http://files.pharo.org/get-files/60/pharo-mac-latest.zip [pharo-vm/vm.zip] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of pharo-vm/vm.zip or pharo-vm/vm.zip.zip, and cannot find pharo-vm/vm.zip.ZIP, period.
Am 01.06.2017 um 23:00 schrieb Tudor Girba <tudor@tudorgirba.com>:
Hi,
On Jun 1, 2017, at 7:23 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote:
What is in bintray now is the same as vm latest :)
Do I understand correctly that: curl get.pharo.org/vmLatest60 | bash
will get the VM with the fix?
Doru
On 1 Jun 2017, at 18:30, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
Tobias has commited a fix in cog branch a few days ago. https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed... So could you try latest Vm from bintray and report? https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f07ffbedcc184391ed...
2017-06-01 16:12 GMT+02:00 Tudor Girba <tudor@tudorgirba.com>: Hi,
I am not sure what is the status with this issue, but it seems clear that there exists a problem, so I opened an issue to accumulate the different opinions: https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/141
Cheers, Doru
On May 29, 2017, at 9:53 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
---------- Forwarded message ---------- From: Tobias Pape <Das.Linux@gmx.de> Date: Mon, May 29, 2017 at 12:09 AM Subject: Re: [Vm-dev] multiple crashes on macOS Sierra To: John McIntosh <johnmci@smalltalkconsulting.com> Cc: Squeak Virtual Machine Development Discussion <vm-dev@lists.squeakfoundation.org>
Hi John, all
On 28.05.2017, at 22:12, John McIntosh <johnmci@smalltalkconsulting.com> wrote:
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
That's correct.
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/M...
+ (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;
Well, I have not found a reference to how this relates to autorelease (the Apple docs are becoming increasingly useless these days :() I read this https://developer.apple.com/reference/appkit/nsevent/1533943-keyeventwithtyp... and the header /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h and although autorelase pops up somewhere in the file, it does not somewhere near the declaration. I read through the code an found quite a few AUTORELEASEOBJ() around object creation and (apparently wrongly) thought I would need that here.
I now understand that I should only autorelease alloc/inited stuff.
So you may be right here.
Fixed in 0f07ffbed
Best regards -Tobias
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.
[snip]
-- www.tudorgirba.com www.feenk.com
"Reasonable is what we are accustomed with."
-- www.tudorgirba.com www.feenk.com
"If you interrupt the barber while he is cutting your hair, you will end up with a messy haircut."
participants (5)
-
Bernhard Pieber -
Eliot Miranda -
Esteban Lorenzano -
Nicolas Cellier -
Tudor Girba