I tried... * my usual locked image avoidance hack when playing at this level to comment out calls to #interCyclePause: * changing to DelayMillisecondScheduler and DelaySemaphoreSchedulers ...but no luck. How do mean that "DebugSession someInstance stepInto" does not hang? How do you get to that point. I am having a look by putting a haltOnce in DebugSession>>stepInto: then pressing the <Into> button. cheers -ben On Tue, May 5, 2015 at 5:10 PM, Alain Rastoul <alf.mmm.cat@gmail.com> wrote:
Hi
I wanted to step into SharedQueue code, but got a hanged vm on simple test code below. It works fine in Pharo 3 but hangs in Pharo4-40611 and Pharo5-50029, it does not hang in squeak 4.5 but the Monitor code is not the same.
In a playgound, execute the first two lines of code then select the third line and 'Debug it' (right click menu option) to step into it.
q := SharedQueue new . q nextPut: 1 . q next.
Everything goes fine until stepping into 'aBlock value' in Monitor>>critical: critical: aBlock
^[ self enter. Hangs here >>>>aBlock value<<<<<< ] ensure: [self exit].
The vm get hanged and can be interrupted only once, then it is completely hanged.
I once got an error message Error: Monitor access violation message and a stack trace in debug log before hanging but was unable to reproduce it (something related to effectiveProcess?)
--- The full stack --- Monitor(Object)>>error: Monitor>>checkOwnerProcess Monitor>>waitWhile:for:maxMilliseconds: Monitor>>waitWhile:for: Monitor>>waitWhile: [ monitor waitWhile: [ items isEmpty ]. items removeFirst ] in SharedQueue>>next [ self enter. aBlock value ] in Monitor>>critical: BlockClosure>>ensure: Monitor>>critical: SharedQueue>>next UndefinedObject>>DoIt CompiledMethod>>valueWithReceiver:arguments: [ aCompiledMethod valueWithReceiver: anObject arguments: (evalContext ifNil: [ #() ] ifNotNil: [ {evalContext} ]) ] in RubSmalltalkEditor>>debug:receiver:in: [ self value. Processor terminateActive ] in BlockClosure>>newProcess
-------------------------------------------------------------------------------
Can someone have a look and confirm it is a bug before I open a bug entry ? And/or give me hints on how to debug this ? I tried to modify Monitor>>waitWhile: and put a delay, put traces but still hanging. DebugSession someInstance stepInto does not hang, but I'm not sure that the execution flow is the same ...
TIA -- Regards,
Alain