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

Revert "Also check the disconnect handler to really fix the error on suspend" #257

Merged
merged 1 commit into from
Sep 26, 2021

Conversation

jonian
Copy link
Member

@jonian jonian commented Sep 26, 2021

Reverts #256

@jonian
Copy link
Member Author

jonian commented Sep 26, 2021

@njsf reverting this as it stops any signal from disconnecting, you can try it by adding a log inside the if clause.

@jonian jonian merged commit 713e4c3 into master Sep 26, 2021
@njsf
Copy link
Contributor

njsf commented Sep 26, 2021

@njsf reverting this as it stops any signal from disconnecting, you can try it by adding a log inside the if clause.

Ok, will looking into it.

@jonian
Copy link
Member Author

jonian commented Sep 26, 2021

@njsf the issue is caused in this line. My guess is that the problem begins here, it uses Main.panel.get_children() instead of explicitly connecting to left, center and right panel boxes. If another extension adds children to Main.panel it is possible to have signal connections to objects that no longer exist. Can you try with the fix below:

activate() {
  this.signals = new Handlers.Signals()

  const boxes = [
    Main.panel._leftBox,
    Main.panel._centerBox,
    Main.panel._rightBox
  ]

  for (const box of boxes) {
    this.signals.connect(
      box, 'actor_added', this._onActorAdded.bind(this)
    )
  }

  this._onActorAdded()
}

I have already pushed this fix on master branch

@jonian jonian deleted the revert-256-Fix_error_on_suspend branch September 26, 2021 20:52
@njsf
Copy link
Contributor

njsf commented Sep 26, 2021

Indeed the issue is gone. I suspect you can revert #255 also.
Thanks for looking at this

@jonian
Copy link
Member Author

jonian commented Sep 26, 2021

Thanks confirming the issue is resolved. I will keep #255 as it is just a safety check and it does not cause issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants