Hi,
I'm having a problem with Delay after a system crash (yeah, the real problem is the system crash, but I'm also having this one after it happens) I have several processes running who monitor some state, and synchronize some file outs (the sync is made using a mutex). The original crash seems to be happening somewhere there. After the crash, I restart the image tries to reconstruct the data (taking the files previously saved) and I'm getting this error: THERE_BE_DRAGONS_HERE Error: This Delay has already been scheduled. 8 February 2011 5:00:05 am VM: unix - i686 - linux-gnu - Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.35] Image: Pharo-1.1.1-- [Latest update: #11414] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/administrator/emanual Trusted Dir /home/administrator/emanual/secure Untrusted Dir /home/administrator/emanual/My Squeak Delay(Object)>>error: Receiver: a Delay(10 msecs; 10 msecs remaining) Arguments and temporary variables: aString: 'This Delay has already been scheduled.' Receiver's instance variables: delayDuration: 10 resumptionTime: 18218709 delaySemaphore: a Semaphore(a Process in [] in Delay>>wait) beingWaitedOn: true Delay>>schedule Receiver: a Delay(10 msecs; 10 msecs remaining) Arguments and temporary variables: Receiver's instance variables: delayDuration: 10 resumptionTime: 18218709 delaySemaphore: a Semaphore(a Process in [] in Delay>>wait) beingWaitedOn: true Delay>>wait Receiver: a Delay(10 msecs; 10 msecs remaining) Arguments and temporary variables: Receiver's instance variables: delayDuration: 10 resumptionTime: 18218709 delaySemaphore: a Semaphore(a Process in [] in Delay>>wait) beingWaitedOn: true InputEventPollingFetcher>>waitForInput Receiver: an InputEventPollingFetcher Arguments and temporary variables: Receiver's instance variables: eventHandlers: an OrderedCollection(a RFBEventSensor an UserInterruptHandler) fetcherProcess: a Process in Debugger class>>openOn:context:label:contents:full...etc... inputSemaphore: a Semaphore() InputEventPollingFetcher(InputEventFetcher)>>eventLoop Receiver: an InputEventPollingFetcher Arguments and temporary variables: eventBuffer: #(0 0 0 0 0 0 0 0) type: 0 window: nil Receiver's instance variables: eventHandlers: an OrderedCollection(a RFBEventSensor an UserInterruptHandler) fetcherProcess: a Process in Debugger class>>openOn:context:label:contents:full...etc... inputSemaphore: a Semaphore() [] in InputEventPollingFetcher(InputEventFetcher)>>installEventLoop Receiver: an InputEventPollingFetcher Arguments and temporary variables: Receiver's instance variables: eventHandlers: an OrderedCollection(a RFBEventSensor an UserInterruptHandler) fetcherProcess: a Process in Debugger class>>openOn:context:label:contents:full...etc... inputSemaphore: a Semaphore() [] in BlockClosure>>newProcess Receiver: [self eventLoop] Arguments and temporary variables: Receiver's instance variables: outerContext: InputEventPollingFetcher(InputEventFetcher)>>installEventLoop startpc: 48 numArgs: 0 --- The full stack --- Delay(Object)>>error: Delay>>schedule Delay>>wait InputEventPollingFetcher>>waitForInput InputEventPollingFetcher(InputEventFetcher)>>eventLoop [] in InputEventPollingFetcher(InputEventFetcher)>>installEventLoop [] in BlockClosure>>newProcess Any idea what can be causing this? I also noticed that there is another error when the image restarts: 'Trying to activate Delay twice' which is thrown on Delay class>>#startUp Any idea what can be happening? Cheers, Esteban |
This happens when you try to wait for same Delay instance.
Try to not capture the Delay instance into vars and don't use same delay instances for multiple waits. As to me the logic of delay handling is wrong. I don't see why same delay instance can't be shared by multiple processes to wait for same period of time. For behavior which it demonstrates currently i would call it like DelayedSignal. -- Best regards, Igor Stasenko AKA sig. |
yeah... I'm not using it... seems to be InputEventPollingFetcher, the problem :(
El 08/02/2011, a las 11:59a.m., Igor Stasenko escribió: > This happens when you try to wait for same Delay instance. > Try to not capture the Delay instance into vars and don't use same > delay instances for multiple waits. > > As to me the logic of delay handling is wrong. I don't see why same > delay instance can't be shared by multiple processes to wait for same > period of time. > > For behavior which it demonstrates currently i would call it like DelayedSignal. > > -- > Best regards, > Igor Stasenko AKA sig. > |
Free forum by Nabble | Edit this page |