I have been trying, on and off, to diagnose some debugger freezes.
I found one with terry raymond's help which was specifically a ProcessEnvironment check, which uses a Semaphore for access. Last night I found another. This one bothers me in a couple of ways ... I finally, after much effort (since it kept "going away") tracked it to a method with two lines sel := (self action, 'Undo') asSymbol. (self respondsTo: sel) ifTrue: [self perform: sel] I figured for sure it was the second line, but no, it was the first. It seems that "asSymbol" has a global semaphore to lock creating of a symbol. So if the symbol did not exist the debugger froze. So ... 1. why does the debugger not hang more often?? 2. in the above (and lots of other) examples, I only want the symbol if it already exists. So why not a method like "string asSymbolOrNil"? or perhaps "string asSymbolOrDo: aBlock" in the specific case where I am building a selector, that symbol must exist. -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 sip:[hidden email] Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP |
Dennis
This sounds kind of weird. Can you reproduce this in an initial VW image? I cannot. I tried a debugIt on 'nuts' asSymbol. It worked just fine. I assume your are stepping the #asSymbol and not sending into it. Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] <http://www.craftedsmalltalk.com> =========================================================== > -----Original Message----- > From: Dennis Smith [mailto:[hidden email]] > Sent: Tuesday, May 22, 2007 7:03 AM > To: VWNC, > Subject: A debugger "issue"? > > I have been trying, on and off, to diagnose some debugger freezes. > I found one with terry raymond's help which was specifically a > ProcessEnvironment check, > which uses a Semaphore for access. > > Last night I found another. This one bothers me in a couple of ways ... > > I finally, after much effort (since it kept "going away") tracked it to > a method > with two lines > sel := (self action, 'Undo') asSymbol. > (self respondsTo: sel) ifTrue: [self perform: sel] > > I figured for sure it was the second line, but no, it was the first. It > seems > that "asSymbol" has a global semaphore to lock creating of a symbol. > So if the symbol did not exist the debugger froze. > > So ... > 1. why does the debugger not hang more often?? > 2. in the above (and lots of other) examples, I only want the symbol > if it already exists. > So why not a method like "string asSymbolOrNil"? > or perhaps "string asSymbolOrDo: aBlock" > in the specific case where I am building a selector, that symbol > must exist. > > > -- > Dennis Smith +1 416.798.7948 > Cherniak Software Development Corporation Fax: +1 416.798.0948 > 509-2001 Sheppard Avenue East [hidden email] > Toronto, ON M2J 4Z8 sip:[hidden email] > Canada http://www.CherniakSoftware.com > Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP |
Terry Raymond wrote: Yes, simple cases seem fine. I have not tried to reproduce in a base VW, but I will.Dennis This sounds kind of weird. Can you reproduce this in an initial VW image? I cannot. I tried a debugIt on 'nuts' asSymbol. It worked just fine. Yes, stepping at a higher level -- I don't know how many message sends in the asSymbol was.I assume your are stepping the #asSymbol and not sending into it. I know it was the asSymbol for a number of reasons 1. trying to step over the invocation of the method with ony that in it froze. 2. pre-creating the symbol caused it to debug without a problem 3. disabling the "Lock" in Semaphore (scary ...) caused it to work without a problem too I will play a bit over the next few days Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] <http://www.craftedsmalltalk.com> ===========================================================-----Original Message----- From: Dennis Smith [[hidden email]] Sent: Tuesday, May 22, 2007 7:03 AM To: VWNC, Subject: A debugger "issue"? I have been trying, on and off, to diagnose some debugger freezes. I found one with terry raymond's help which was specifically a ProcessEnvironment check, which uses a Semaphore for access. Last night I found another. This one bothers me in a couple of ways ... I finally, after much effort (since it kept "going away") tracked it to a method with two lines sel := (self action, 'Undo') asSymbol. (self respondsTo: sel) ifTrue: [self perform: sel] I figured for sure it was the second line, but no, it was the first. It seems that "asSymbol" has a global semaphore to lock creating of a symbol. So if the symbol did not exist the debugger froze. So ... 1. why does the debugger not hang more often?? 2. in the above (and lots of other) examples, I only want the symbol if it already exists. So why not a method like "string asSymbolOrNil"? or perhaps "string asSymbolOrDo: aBlock" in the specific case where I am building a selector, that symbol must exist. -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@... Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@... Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP |
In reply to this post by Terry Raymond
OK, I reproduced it in a virgin visual.im -- VW7.4.1.
I have attached a filein. The problem occurs when invoking an ensure: block by stepping at the higher level. To reproduce, filein the attached .st file, and then in the workspace run PPdebugDebug new testAsSymbol: [true] Then step into the block and try and step over the "]" of the block. It should freeze. Terry Raymond wrote: Dennis This sounds kind of weird. Can you reproduce this in an initial VW image? I cannot. I tried a debugIt on 'nuts' asSymbol. It worked just fine. I assume your are stepping the #asSymbol and not sending into it. Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] <http://www.craftedsmalltalk.com> ===========================================================-----Original Message----- From: Dennis Smith [[hidden email]] Sent: Tuesday, May 22, 2007 7:03 AM To: VWNC, Subject: A debugger "issue"? I have been trying, on and off, to diagnose some debugger freezes. I found one with terry raymond's help which was specifically a ProcessEnvironment check, which uses a Semaphore for access. Last night I found another. This one bothers me in a couple of ways ... I finally, after much effort (since it kept "going away") tracked it to a method with two lines sel := (self action, 'Undo') asSymbol. (self respondsTo: sel) ifTrue: [self perform: sel] I figured for sure it was the second line, but no, it was the first. It seems that "asSymbol" has a global semaphore to lock creating of a symbol. So if the symbol did not exist the debugger froze. So ... 1. why does the debugger not hang more often?? 2. in the above (and lots of other) examples, I only want the symbol if it already exists. So why not a method like "string asSymbolOrNil"? or perhaps "string asSymbolOrDo: aBlock" in the specific case where I am building a selector, that symbol must exist. -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@... Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@... Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP <?xml version="1.0"?> <st-source> <time-stamp>From VisualWorks®, 7.4.1 of May 30, 2006 on May 22, 2007 at 3:05:19 pm</time-stamp> <class> <name>PPdebugDebug</name> <environment>Smalltalk</environment> <super>Core.Object</super> <private>false</private> <indexed-type>none</indexed-type> <inst-vars></inst-vars> <class-inst-vars></class-inst-vars> <imports></imports> <category>PP-debug</category> <attributes> <package>PP-debug</package> </attributes> </class> <methods> <class-id>PPdebugDebug</class-id> <category>actions</category> <body package="PP-debug" selector="doAsSymbol">doAsSymbol 'abcdefxx' asSymbol</body> <body package="PP-debug" selector="testAsSymbol:">testAsSymbol: aBlock aBlock ensure: [self doAsSymbol]</body> </methods> </st-source> |
In reply to this post by Dennis smith-4
I you just want a Symbol or nil, then use
(Symbol findInterned: aString) ifNotNil: [... This will avoid the Lock problem. Why the Lock is locked is another problem... Nicolas Dennis Smith a écrit : > > > Terry Raymond wrote: >> Dennis >> >> This sounds kind of weird. >> >> Can you reproduce this in an initial VW image? I cannot. >> I tried a debugIt on 'nuts' asSymbol. It worked just fine. >> > Yes, simple cases seem fine. I have not tried to reproduce in a base > VW, but I will. >> I assume your are stepping the #asSymbol and not sending >> into it. >> > Yes, stepping at a higher level -- I don't know how many message sends > in the asSymbol was. > > I know it was the asSymbol for a number of reasons > 1. trying to step over the invocation of the method with ony that in > it froze. > 2. pre-creating the symbol caused it to debug without a problem > 3. disabling the "Lock" in Semaphore (scary ...) caused it to work > without a problem too > > I will play a bit over the next few days >> Terry >> >> =========================================================== >> Terry Raymond >> Crafted Smalltalk >> 80 Lazywood Ln. >> Tiverton, RI 02878 >> (401) 624-4517 [hidden email] >> <http://www.craftedsmalltalk.com> >> =========================================================== >> >> >>> -----Original Message----- >>> From: Dennis Smith [mailto:[hidden email]] >>> Sent: Tuesday, May 22, 2007 7:03 AM >>> To: VWNC, >>> Subject: A debugger "issue"? >>> >>> I have been trying, on and off, to diagnose some debugger freezes. >>> I found one with terry raymond's help which was specifically a >>> ProcessEnvironment check, >>> which uses a Semaphore for access. >>> >>> Last night I found another. This one bothers me in a couple of ways ... >>> >>> I finally, after much effort (since it kept "going away") tracked it to >>> a method >>> with two lines >>> sel := (self action, 'Undo') asSymbol. >>> (self respondsTo: sel) ifTrue: [self perform: sel] >>> >>> I figured for sure it was the second line, but no, it was the first. It >>> seems >>> that "asSymbol" has a global semaphore to lock creating of a symbol. >>> So if the symbol did not exist the debugger froze. >>> >>> So ... >>> 1. why does the debugger not hang more often?? >>> 2. in the above (and lots of other) examples, I only want the symbol >>> if it already exists. >>> So why not a method like "string asSymbolOrNil"? >>> or perhaps "string asSymbolOrDo: aBlock" >>> in the specific case where I am building a selector, that symbol >>> must exist. >>> >>> >>> -- >>> Dennis Smith +1 416.798.7948 >>> Cherniak Software Development Corporation Fax: +1 416.798.0948 >>> 509-2001 Sheppard Avenue East [hidden email] >>> Toronto, ON M2J 4Z8 sip:[hidden email] >>> Canada http://www.CherniakSoftware.com >>> Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP >>> >> >> > > -- > Dennis Smith +1 416.798.7948 > Cherniak Software Development Corporation Fax: +1 416.798.0948 > 509-2001 Sheppard Avenue East [hidden email] > Toronto, ON M2J 4Z8 sip:[hidden email] > Canada http://www.CherniakSoftware.com > Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP > |
nicolas cellier wrote: > I you just want a Symbol or nil, then use > (Symbol findInterned: aString) ifNotNil: [... > > This will avoid the Lock problem. Which is all why I wanted asSymbolOrNil in CharacterArray. Which I now have, implemented pretty much as you noted above -- and I won't type all of that in the different places I might us it -- thanks :) > Why the Lock is locked is another problem... > > Nicolas > > > Dennis Smith a écrit : >> >> >> Terry Raymond wrote: >>> Dennis >>> >>> This sounds kind of weird. >>> >>> Can you reproduce this in an initial VW image? I cannot. >>> I tried a debugIt on 'nuts' asSymbol. It worked just fine. >>> >> Yes, simple cases seem fine. I have not tried to reproduce in a base >> VW, but I will. >>> I assume your are stepping the #asSymbol and not sending >>> into it. >>> >> Yes, stepping at a higher level -- I don't know how many message >> sends in the asSymbol was. >> >> I know it was the asSymbol for a number of reasons >> 1. trying to step over the invocation of the method with ony that >> in it froze. >> 2. pre-creating the symbol caused it to debug without a problem >> 3. disabling the "Lock" in Semaphore (scary ...) caused it to >> work without a problem too >> >> I will play a bit over the next few days >>> Terry >>> >>> =========================================================== >>> Terry Raymond >>> Crafted Smalltalk >>> 80 Lazywood Ln. >>> Tiverton, RI 02878 >>> (401) 624-4517 [hidden email] >>> <http://www.craftedsmalltalk.com> >>> =========================================================== >>> >>> >>>> -----Original Message----- >>>> From: Dennis Smith [mailto:[hidden email]] >>>> Sent: Tuesday, May 22, 2007 7:03 AM >>>> To: VWNC, >>>> Subject: A debugger "issue"? >>>> >>>> I have been trying, on and off, to diagnose some debugger freezes. >>>> I found one with terry raymond's help which was specifically a >>>> ProcessEnvironment check, >>>> which uses a Semaphore for access. >>>> >>>> Last night I found another. This one bothers me in a couple of >>>> ways ... >>>> >>>> I finally, after much effort (since it kept "going away") tracked >>>> it to >>>> a method >>>> with two lines >>>> sel := (self action, 'Undo') asSymbol. >>>> (self respondsTo: sel) ifTrue: [self perform: sel] >>>> >>>> I figured for sure it was the second line, but no, it was the >>>> first. It >>>> seems >>>> that "asSymbol" has a global semaphore to lock creating of a symbol. >>>> So if the symbol did not exist the debugger froze. >>>> >>>> So ... >>>> 1. why does the debugger not hang more often?? >>>> 2. in the above (and lots of other) examples, I only want the >>>> symbol >>>> if it already exists. >>>> So why not a method like "string asSymbolOrNil"? >>>> or perhaps "string asSymbolOrDo: aBlock" >>>> in the specific case where I am building a selector, that >>>> symbol >>>> must exist. >>>> >>>> >>>> -- >>>> Dennis Smith +1 416.798.7948 >>>> Cherniak Software Development Corporation Fax: +1 416.798.0948 >>>> 509-2001 Sheppard Avenue East [hidden email] >>>> Toronto, ON M2J 4Z8 sip:[hidden email] >>>> Canada http://www.CherniakSoftware.com >>>> Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP >>>> >>> >>> >> >> -- >> Dennis Smith +1 416.798.7948 >> Cherniak Software Development Corporation Fax: +1 416.798.0948 >> 509-2001 Sheppard Avenue East [hidden email] >> Toronto, ON M2J 4Z8 sip:[hidden email] >> Canada http://www.CherniakSoftware.com >> Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP >> > -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 sip:[hidden email] Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP |
Free forum by Nabble | Edit this page |