Any idea why the UI keeps crashing on me? I have yet to manage to
complete a task before the UI locks up with a scheduler issue as in the
log file below.
Michael
for PPC: LogVMMessages = true
for PPC: PrintScriptName = true
for PPC: Inline = true
for PPC: SICDeferUncommonBranches = false
for PPC: SICReplaceOnStack = false
for PPC: SaveOutgoingArgumentsOfPatchedFrames = true
Self VM warning: _allocated went negative
Self VM warning: A one-word branch may not span the gap from the
assembler buffer to the zone.
The assembler and generated code will run a bit slower (normal for Mac)
Self VM warning: ignoring failed Apple event:, -1708
#0 (/Users/adamspitz/self/objects/core/scheduler.self:1185): value = [
"This is not a scheduled process--either it's
the scheduler itself or the scheduler isn't running.
p = schedulerProcess = _ThisProcess"
p _PrintProcessStack.
errorLevel: 0.
p causeOfError reportError: p ForceStackTrace: false.
p primitiveAbortProcess.
^ self. "won't actually reach here"
]
#1 (/Users/adamspitz/self/objects/core/boolean.self:168): ifTrue:False:
= ( | self* = true. :b1 = <0>. :b2 = nil. | b1 value )
#2 (/Users/adamspitz/self/objects/core/boolean.self:235): ifTrue: = ( |
self* = true. :b = <0>. | ifTrue: b False: nil )
#3 (/Users/adamspitz/self/objects/core/scheduler.self:1180):
suspendAndTrace: = ( | self* = <1>. :p = <2>. maxRecursiveErrors = 1. |
errorLevel: errorLevel succ.
p = schedulerProcess ifTrue: [
"This is not a scheduled process--either it's
the scheduler itself or the scheduler isn't running.
p = schedulerProcess = _ThisProcess"
p _PrintProcessStack.
errorLevel: 0.
p causeOfError reportError: p ForceStackTrace: false.
p primitiveAbortProcess.
^ self. "won't actually reach here"
].
errorLevel > maxRecursiveErrors ifTrue: [
"Too many errors occurred in trying to handle the
original error. Just safely print the stack."
p _PrintProcessStack.
errorLevel: 0.
^ self.
].
suspend: p.
(debug: p) ifTrue: [
('** suspendAndTrace: ', p objectID) printLine.
].
p causeOfError reportError: p ForceStackTrace: false.
p birthEvent ifNotNil: [
selfProcessModel debugProcess: p.
] IfNil: [| id <- ''. |
id: p objectIDNumber printString.
p stderr write: 'To debug in ui2, type:
selfProcessModel debugProcess: ', id, ' as\n',
'to debug in console, type: attach: ',
id, '\n',
'to dump stack, type: ', id, '
as printError.\n'.
].
errorLevel: 0.
self )
#4 (/Users/adamspitz/self/objects/core/process.self:1379): value = [
scheduler suspendAndTrace: self ]
#5 (/Users/adamspitz/self/objects/core/boolean.self:168): ifTrue:False:
= ( | self* = true. :b1 = <3>. :b2 = <4>. | b1 value )
#6 (/Users/adamspitz/self/objects/core/process.self:247):
performInScheduler:IfInside: = ( | self* = <2>. :action = <5>. :blk =
<3>. | scheduler inScheduler ifTrue: blk False: [_Yield: action] )
#7 (/Users/adamspitz/self/objects/core/process.self:1377):
suspendAndTrace: = ( | self* = <2>. :error = <6>. |
causeOfError: error.
performInScheduler: suspendAndTraceAction
IfInside: [scheduler suspendAndTrace: self].
self )
#8 (/Users/adamspitz/self/objects/core/errorHandling.self:103):
primitiveFailedError:Name: = ( | self* = <7>. :error = 'badTypeError:
s_arg_0, smi'. :sel = '_SetRealTimer'. env = lobby. |
env process this suspendAndTrace:
((processErrors primitiveFailed copy
receiver: self)
selector: sel)
error: error.
env process this errorContinueValue )
#9 (/Users/adamspitz/self/objects/core/scheduler.self:875):
setRealTimer: = ( | self* = <1>. :ms = <7>. | ms _SetRealTimer. self )
#10 (/Users/adamspitz/self/objects/core/scheduler.self:988): value = [
^ setRealTimer: procFirst wakeTime - currentTime.
]
#11 (/Users/adamspitz/self/objects/core/boolean.self:168):
ifTrue:False: = ( | self* = true. :b1 = <8>. :b2 = nil. | b1 value )
#12 (/Users/adamspitz/self/objects/core/boolean.self:235): ifTrue: = (
| self* = true. :b = <8>. | ifTrue: b False: nil )
#13 (/Users/adamspitz/self/objects/core/scheduler.self:984): value = [
| currentTime <- <9> "nil". procFirst <- <10> "nil". |
timerWaiters isEmpty ifTrue: [^ stopRealTimer].
currentTime: times real.
procFirst: timerWaiters first.
currentTime < procFirst wakeTime ifTrue: [
^ setRealTimer: procFirst wakeTime - currentTime.
].
timerWaiters removeFirst.
procFirst fullyRemoveFromSemaphore. "Remove from
semaphore he is
on (can be
nullSemaphore)."
procFirst status = processStatus waiting ifTrue: [
"Only waiting processes can be woken up by timer
alarms.
For suspended and dead processes, timer alarms are
ignored."
procFirst timerWakeup: true. "Indicate that timer
woke him up."
moveToReadyQ: procFirst.
].
]
#14 (/Users/adamspitz/self/objects/core/block.self:259): loop = ( |
self* = <11>. | value. _Restart )
#15 (/Users/adamspitz/self/objects/core/scheduler.self:982):
sigrealtimer = ( | self* = <1>. |
traceSignal: 'SIGALRM'.
[|currentTime. procFirst. |
timerWaiters isEmpty ifTrue: [^ stopRealTimer].
currentTime: times real.
procFirst: timerWaiters first.
currentTime < procFirst wakeTime ifTrue: [
^ setRealTimer: procFirst wakeTime - currentTime.
].
timerWaiters removeFirst.
procFirst fullyRemoveFromSemaphore. "Remove from
semaphore he is
on (can be
nullSemaphore)."
procFirst status = processStatus waiting ifTrue: [
"Only waiting processes can be woken up by timer
alarms.
For suspended and dead processes, timer alarms are
ignored."
procFirst timerWakeup: true. "Indicate that timer
woke him up."
moveToReadyQ: procFirst.
].
] loop )
#16 (/Users/adamspitz/self/objects/core/scheduler.self:386): value = [
^ sigrealtimer ]
#17 (/Users/adamspitz/self/objects/core/boolean.self:168):
ifTrue:False: = ( | self* = true. :b1 = <12>. :b2 = nil. | b1 value )
#18 (/Users/adamspitz/self/objects/core/boolean.self:235): ifTrue: = (
| self* = true. :b = <12>. | ifTrue: b False: nil )
#19 (/Users/adamspitz/self/objects/core/scheduler.self:384):
dispatchSignal: = ( | self* = <1>. :sig = 'sigrealtimer'. |
"Should order these by frequency, but don't know best
order. Ole /9/94"
"Why not use a peform? Because it is slower and not so
clear."
debug ifTrue: [ sig printLine ].
'sigcputimer' = sig ifTrue: [^ sigcputimer].
'sigrealtimer' = sig ifTrue: [^ sigrealtimer].
'sigchild' = sig ifTrue: [^ sigchild].
'sighup' = sig ifTrue: [^ sighup].
'sigint' = sig ifTrue: [^ sigint].
'sigio' = sig ifTrue: [^ sigio].
'sigpipe' = sig ifTrue: [^ sigpipe].
'sigquit' = sig ifTrue: [^ sigquit].
'sigterm' = sig ifTrue: [^ sigterm].
'sigurg' = sig ifTrue: [^ sigurg].
'siguser1' = sig ifTrue: [^ siguser1].
'siguser2' = sig ifTrue: [^ siguser2].
'sigwinch' = sig ifTrue: [^ sigwinch].
'scheduler: ignoring unknown signal: ' print. sig printLine.
self )
# 20 - # 23: skipped, stack print limit is 20
#24 (/Users/adamspitz/self/objects/core/block.self:259): loop = ( |
self* = <13>. | value. _Restart )
#25 (/Users/adamspitz/self/objects/core/block.self:532): whileTrue: = (
| self* = <14>. :b = <15>. | [ value ifFalse: [ ^ nil ]. b value. ]
loop )
#26 (/Users/adamspitz/self/objects/core/integer.self:805):
to:ByPositive:Do: = ( | self* = 1. :end = 2. :step = 2. :block = <16>.
i <- 1 "nil". |
i: self.
[ i <= end ] whileTrue: [
block value: i With: i.
i: i + step. ].
nil )
#27 (/Users/adamspitz/self/objects/core/integer.self:775): value = [ ^
to: end ByPositive: step Do: block ]
#28 (/Users/adamspitz/self/objects/core/boolean.self:168):
ifTrue:False: = ( | self* = true. :b1 = <17>. :b2 = nil. | b1 value )
#29 (/Users/adamspitz/self/objects/core/boolean.self:235): ifTrue: = (
| self* = true. :b = <17>. | ifTrue: b False: nil )
#30 (/Users/adamspitz/self/objects/core/integer.self:775): to:By:Do: =
( | self* = 1. :end = 2. :step = 2. :block = <16>. |
0 < step ifTrue: [ ^ to: end ByPositive: step Do: block ].
0 > step ifTrue: [ ^ to: end ByNegative: step Do: block ].
error: 'step is zero in to:By:Do: loop' )
#31 (/Users/adamspitz/self/objects/core/scheduler.self:944): signal = (
| self* = <1>. n <- 1 "0". |
"result[0] contains number of different signals. Every
signal
is represented as a pair of array elements (name and
count).
Currently, the counts are just ignored."
n: (result at: 0).
1 to: 2*n By: 2 Do: [|:i| dispatchSignal: (result at: i)].
self )
#32 (/Users/adamspitz/self/objects/core/scheduler.self:360): value = [
^ signal ]
#33 (/Users/adamspitz/self/objects/core/boolean.self:168):
ifTrue:False: = ( | self* = true. :b1 = <18>. :b2 = nil. | b1 value )
#34 (/Users/adamspitz/self/objects/core/boolean.self:235): ifTrue: = (
| self* = true. :b = <18>. | ifTrue: b False: nil )
#35 (/Users/adamspitz/self/objects/core/scheduler.self:359):
dispatchOnTwainsReturnValue: = ( | self* = <1>. :rv = 'signal'. |
"Should order these by frequency, but I don't know best
ordering. Ole, 9/94."
"Why not perform here? It is slower and harder to
understand."
debug ifTrue: [ rv printLine].
'signal' = rv ifTrue: [^ signal].
'yielded' = rv ifTrue: [^ yielded].
'aborted' = rv ifTrue: [^ aborted].
'couldntAllocateStack' = rv ifTrue: [^
couldntAllocateStack].
'finishedActivation' = rv ifTrue: [^ finishedActivation].
'lowOnSpace' = rv ifTrue: [^ lowOnSpace].
'noActivationError' = rv ifTrue: [^ noActivationError].
'noProcessError' = rv ifTrue: [^ noProcessError].
'nonLifoBlock' = rv ifTrue: [^ nonLifoBlock].
'singleStepped' = rv ifTrue: [^ singleStepped].
'stackOverflow' = rv ifTrue: [^ stackOverflow].
'terminated' = rv ifTrue: [^ terminated].
'twainsFailed' = rv ifTrue: [^ twainsFailed].
'schedulder: ignoring unexpected TWAINS return value: '
print. rv printLine.
self )
#36 (/Users/adamspitz/self/objects/core/scheduler.self:580): value = [
| p <- <2> "nil". res <- 'signal' "nil". |
p: schedule. "find next process to run"
currentProcess: p.
p setProcessStatus: processStatus running.
p swapInNotify.
res: (transfer: p).
p swapOutNotify.
p status = processStatus running ifTrue: [
"If no other event caused the process to change
state away from
running (such as blocking on a semaphore), now
demote its state
from running to ready."
p setProcessStatus: processStatus ready.
].
dispatchOnTwainsReturnValue: res. "handle event which
caused TWAINS to return."
]
#37 (/Users/adamspitz/self/objects/core/block.self:518): value = [
value ifTrue: [ ^ nil ]. b value. ]
#38 (/Users/adamspitz/self/objects/core/block.self:259): loop = ( |
self* = <19>. | value. _Restart )
#39 (/Users/adamspitz/self/objects/core/block.self:518): whileFalse: =
( | self* = <20>. :b = <21>. |
[ value ifTrue: [ ^ nil ]. b value. ] loop )
#40 (/Users/adamspitz/self/objects/core/scheduler.self:579): loop = ( |
self* = <1>. |
[stopping] whileFalse: [|res. p|
p: schedule. "find next process to run"
currentProcess: p.
p setProcessStatus: processStatus running.
p swapInNotify.
res: (transfer: p).
p swapOutNotify.
p status = processStatus running ifTrue: [
"If no other event caused the process to change
state away from
running (such as blocking on a semaphore), now
demote its state
from running to ready."
p setProcessStatus: processStatus ready.
].
dispatchOnTwainsReturnValue: res. "handle event which
caused TWAINS to return."
].
self )
#41 (/Users/adamspitz/self/objects/core/scheduler.self:1083): start = (
| self* = <1>. |
"fixes sched wont restart bug--dmu"
schedulerProcess onSemaphore: nullSemaphore.
readyQ sorter: prioritySorter.
timerWaiters sorter: wakeupSorter.
errorLevel: 0.
schedulerProcess causeOfBirth: 'scheduler'.
schedulerProcess resetCauseOfError.
timerWaiters removeAll.
cleanupQ: readyQ.
cleanupQ: suspendedQ.
cleanupQ: waitingQ.
fileTable mapBy: [semaphore copyBinary wait].
os_file startAsync.
activateCPUTimer.
stopRealTimer.
stopping: false.
snapshotAction schedulerInitial.
loop.
os_file stopAsync.
schedulerProcess causeOfBirth: 'initial process'.
self )
#42 (/Users/adamspitz/self/objects/core/snapshotAction.self:233):
postRead = ( | self* = <22>. |
sendMessages: postReadMessages.
scheduler start.
self )
#43 (<postRead Snapshot>:1): <top level expr> = ( | self* = lobby. |
snapshotAction postRea )
VM#