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

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Dec 16 14:01:04 UTC 2019


Hi Marcel!


2.: As mentioned in the past, I would generally like to get rid of the separate Debugger subclasses (keep dimension of inheritance free for real features instead of implementation issues).

All the #openOn:context:label:contents:fullView: implementations share some duplication:

[cid:9e5cc07a-790d-434d-ac5f-6f8c33fbc150]

[cid:f85fdc00-a30a-4c55-8b40-6255d5176a9a]

I think it could be good to revise the method composition here. Ideally, we could have a separate method that only performs the opening itself, and we could wrap it into #setErrorRecursionFlagDuring: by the superclass.

And maybe outsource some UI specific things to the current UIManager ...


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 16. Dezember 2019 14:32:05
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1610.mcz

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/158c4a2e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 34622 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191216/158c4a2e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 54317 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191216/158c4a2e/attachment-0003.png>


More information about the Squeak-dev mailing list