[squeak-dev] The Inbox: Morphic-ct.1610.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Dec 16 13:32:05 UTC 2019


Hi Christoph,

hmm... I would rather not spread that recursion flag to outside Debugger class >> #openOn:... I will look into it. Thanks for those two bug reports that cause endless debuggers:

1. Generator step-over
Generator on: [:g | g yield: #foo].

2. Error in a debugger's build-with method.

Best,
Marcel
Am 16.12.2019 11:53:21 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1610.mcz

==================== Summary ====================

Name: Morphic-ct.1610
Author: ct
Time: 16 December 2019, 11:52:56.435097 am
UUID: 37c022c9-73a9-0648-ba0a-2b1fe98f86ad
Ancestors: Morphic-mt.1608

Prevent infinite debugger chains in case of a failure while building the predebugger window. Complements System-ct.1130.

To reproduce, insert an error like "1/0" into Debugger >> #buildNotifierWith:label:message:.

=============== Diff against Morphic-mt.1608 ===============

Item was changed:
----- Method: MorphicDebugger class>>openOn:context:label:contents:fullView: (in category 'opening') -----
openOn: processToDebug context: context label: title contents: contentsStringOrNil fullView: full

| debugger uiBlock |
debugger := self new
process: processToDebug context: context;
errorWasInUIProcess: (Project current spawnNewProcessIfThisIsUI: processToDebug).

uiBlock := [
full
ifTrue: [debugger openFullNoSuspendLabel: title]
ifFalse: [debugger openNotifierNoSuspendContents: contentsStringOrNil label: title].

"Try drawing the debugger tool at least once to avoid freeze."
debugger topView ifNotNil: [:window | window world displayWorld. "Not safely!!"].
].

"Schedule debugging in a deferred UI message if necessary. Note that only the ui process should execute ui code."
(Project current uiProcess isActiveProcess not or: [processToDebug isActiveProcess])
+ ifTrue: [Project current addDeferredUIMessage: [
+ Processor activeProcess setErrorRecursionFlagDuring: uiBlock]]
- ifTrue: [Project current addDeferredUIMessage: uiBlock]
ifFalse: uiBlock.

processToDebug suspend.

"Get here only if active process is not the process-to-debug. So in tests, use a helper process if you want to access this return value."
^ debugger!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191216/f77e8606/attachment.html>


More information about the Squeak-dev mailing list