Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StDebuggerExtensionMechanismTest does not clear the debuggers it instanciates, causing errors because it could be still subscribed to extension (de)activation announcements when its context is nil #666

Open
adri09070 opened this issue Jan 23, 2024 · 0 comments · Fixed by #712
Labels
bug Something isn't working debugger
Projects

Comments

@adri09070
Copy link
Contributor

StDebuggerExtensionMechanismTest
 ✗ #testUsesExtensions (17ms)
#isDead was sent to nil
UndefinedObject(Object)>>doesNotUnderstand: #isDead
StSindarinBytecodeDebuggerPresenter>>updatePresenter
StSindarinBytecodeDebuggerPresenter(SpPresenter)>>initializePrivateHooks
StSindarinBytecodeDebuggerPresenter(SpPresenter)>>initialize
StSindarinBytecodeDebuggerPresenter class(SpPresenter class)>>owner:on:
StDebugger(SpPresenter)>>instantiate:on:
StDebugger>>instantiateExtensionToolsPage:
[
		extensionToolsNotebook pages:
			{ (self instantiateExtensionToolsPage: extensionToggled) }
				asOrderedCollection.
		extensionToolsNotebook selectPageIndex: 1.
		stackAndCodeContainer := self stackAndCodeWithExtensionsLayout.
		self layout: self defaultLayout.
		^ self ] in StDebugger>>updateExtensionsFromAnnouncement:
OrderedCollection(Collection)>>ifEmpty:
StDebugger>>updateExtensionsFromAnnouncement:
WeakMessageSend>>value:
WeakMessageSend(MessageSend)>>cull:
WeakMessageSend(MessageSend)>>cull:cull:
[ action cull: anAnnouncement cull: announcer ] in WeakAnnouncementSubscription(AbstractAnnouncementSubscription)>>deliver:
FullBlockClosure(BlockClosure)>>on:do:
FullBlockClosure(BlockClosure)>>on:fork:
WeakAnnouncementSubscription(AbstractAnnouncementSubscription)>>deliver:
[ subscription deliver: anAnnouncement ] in SubscriptionRegistry>>deliver:to:startingAt:
FullBlockClosure(BlockClosure)>>ifCurtailed:
SubscriptionRegistry>>deliver:to:startingAt:
SubscriptionRegistry>>deliver:to:
SubscriptionRegistry>>deliver:
SystemAnnouncer(Announcer)>>announce:
StSindarinBytecodeDebuggerPresenter class>>showInDebugger:
[ :extension |
		| wasActivated |
		wasActivated := oldActivatedExtensions includes: extension.
		extension showInDebugger = wasActivated ifFalse: [
			extension showInDebugger: wasActivated ] ] in StDebuggerExtensionMechanismTest>>tearDown
IdentitySet(Set)>>do:
StDebuggerExtensionMechanismTest>>tearDown

https://github.com/pharo-spec/NewTools/actions/runs/7626013997/job/20771615453?pr=665

Proposed fix:

We just need to introduce an instance variable dbg to be able to clear debuggers in the tearDown. It will unsubscribe the debuggers from the extension toggle announcements

@adri09070 adri09070 added bug Something isn't working debugger labels Jan 23, 2024
@adri09070 adri09070 added this to Issues in Debuggers via automation Jan 23, 2024
@adri09070 adri09070 changed the title StDebuggerExtensionMechanismTest does not clear the debuggers it instanciates, causing errors because it could be still subscribed to extension (de)activation when its context is nil StDebuggerExtensionMechanismTest does not clear the debuggers it instanciates, causing errors because it could be still subscribed to extension (de)activation announcements when its context is nil Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working debugger
Projects
Debuggers
  
Issues
1 participant