Giter Club home page Giter Club logo

Comments (7)

aaronholla avatar aaronholla commented on July 17, 2024

I also had gotten this bug when I moved the output window to the left pane instead of the right one and then clicked on the IRC status link in the bottom left of the atom window. I am not sure exactly what is causing this to happen or how to fix it. Wanted to share what is causing this error.

from atom-irc.

aaronholla avatar aaronholla commented on July 17, 2024

Weird. So I loaded up atom dev to fix this bug and I can not seem to reproduce it. Seems like it is fixed at least for the steps that I took to produce the error. It now just moves the pane to the right pane when you open when it is already open on another split pane.

Not sure how or what could be causing this unless the original poster can share the steps taken to produce the error.

from atom-irc.

cjsaylor avatar cjsaylor commented on July 17, 2024

I wonder if it is specific to an older atom version. I'll work on trying to reproduce it in a current version.

from atom-irc.

coldfumonkeh avatar coldfumonkeh commented on July 17, 2024

Hi. I must admit I am not sure what version number of Atom I was using at that time - my apologies, I should have added that in to the ticket. I'm currently running 0.194.0 and will see if it happens again.

from atom-irc.

coldfumonkeh avatar coldfumonkeh commented on July 17, 2024

Just tested and same issue cropped up.

Steps to reproduce:

  • Open IRC from menu (should default to right-hand panel)
  • Drag IRC panel to the left in the editor and drop it. It may remove the split view (it does for me)
  • Click the IRC link in the bottom bar. The error should then display

Just to confirm this using Atom v 0.194.0

On a side note i am able to receive messages in the plugin but whatever I send isn't sent to the channel.

from atom-irc.

cjsaylor avatar cjsaylor commented on July 17, 2024

Thanks for the update, @coldfumonkeh.

The not being able to send probably is the nick service rejecting your password or something to that effect.

from atom-irc.

cjsaylor avatar cjsaylor commented on July 17, 2024

@coldfumonkeh @aaronholla

I implemented a fix for this (partially) in 4d070cc.

I made use of atom.workspace.getPaneItems() which I noticed contained instances of the view (most likely the culprit of the original error. It seems internally they are using a WeakMap which uses an object as a key. Since they are adding the IrcView to a weakmap, you can't have more than one. It seems that they have a concept of separation between panes, but internally they are all one weakmap (or at least they keep a weakmap that contains all).

When we were moving the view from the right pane to the left, the weakmap lookup on the right-side pane did not find the view, so it attempted to add it, however the overarching weakmap did still have it and was not checked prior.

The solution here was to check for the existence of the view and use it to focus instead of attempting to create a new one. However, the one part of this fix I didn't figure out for the time being was if the irc view is not visible, then clicking the toggle does not reveal the chat tab.

If either of you guys have a good idea on how to deal with that, let me know.

Edit: I'm not saying atom is at fault in their weak-map usage, it's more my implementation of a single instantiation of the IrcView that I am using. If I constructed a new one (which ultimately might be the best approach) it would work fine, however would requiring storing a buffer of messages that is currently automatically handled by the view.

from atom-irc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.