[squeak-dev] Problem with image lock up with self error:

David T. Lewis lewis at mail.msen.com
Fri Jan 9 23:33:01 UTC 2015


That fixed it. Thanks Karl and Levente!

Dave


On Fri, Jan 09, 2015 at 11:33:15PM +0100, karl ramberg wrote:
> Hi,
> That fixes the image lock up.
> I have commited the fix to trunk
> 
> Karl
> 
> On Fri, Jan 9, 2015 at 4:01 PM, Levente Uzonyi <leves at elte.hu> wrote:
> 
> > It's because the error occurs in the critical section of AccessLock, so
> > it'll stay locked during error handling. This probably locks up the
> > debugger, because it can't access the preferences.
> > Here's a fix:
> >
> > preferenceAt: aSymbol ifAbsent: aBlock
> >         "Answer the Preference object at the given symbol, or the value of
> > aBlock if not present"
> >
> >         self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences |
> >                 dictionaryOfPreferences
> >                         at: aSymbol
> >                         ifPresent: [ :preference | ^preference ] ].
> >         ^aBlock value
> >
> > Levente
> >
> >
> > On Fri, 9 Jan 2015, karl ramberg wrote:
> >
> >  Hi,
> >> Image lock up doing
> >> Preferences togglePreference: #justATest
> >>
> >> If I change error:  to inform: in the method I do not get a image lock up.
> >>
> >> This is in a trunk image and tested with several Cog VM on Windows.
> >>
> >> Preferences>>togglePreference: prefSymbol
> >> "Toggle the given preference. prefSymbol must be of a boolean preference"
> >> (self preferenceAt: prefSymbol ifAbsent: [self error: 'unknown
> >> preference: ', prefSymbol]) togglePreferenceValue
> >>
> >> Karl
> >>

> 



More information about the Squeak-dev mailing list