This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Uncaught TypeError: Cannot read property 'dispose' of undefined #183
Copy link
Copy link
Closed
Labels
Description
[Enter steps to reproduce below:]
- Open Git-Log: Show
- Try to close tab
Atom Version: 0.210.0
System: Mac OS X 10.10.3
Thrown From: tabs package, v0.81.0
Stack Trace
Uncaught TypeError: Cannot read property 'dispose' of undefined
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/composite-disposable.js:25
TypeError: Cannot read property 'dispose' of undefined
at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/composite-disposable.js:25:28
at Set.forEach (native)
at CompositeDisposable.module.exports.CompositeDisposable.dispose (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/composite-disposable.js:24:26)
at tabs-tab.module.exports.TabView.destroy (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-view.js:194:14)
at TabBarView.module.exports.TabBarView.removeTabForItem (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:364:15)
at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:174:24
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.removeItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:379:20)
at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:442:16)
at TabBarView.module.exports.TabBarView.closeTab (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:419:26)
at Object.addElementCommands.tabs:close-tab (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:95:26)
at space-pen-ul.commandsWithPropagationStopped.(anonymous function) (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:86:36)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:153:19)
at [object Object].jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:64:23)
at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:75:67)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:169:7)
at EventEmitter.ipc.sendSync (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/ipc.js:21:31)
at BrowserWindow.RemoteMemberFunction [as emit] (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:110:29)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:150:33)
at HTMLDocument.handler (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
at HTMLDocument.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
Commands
-4:55.8.0 pane:close (atom-text-editor.editor.is-focused)
-4:38.9.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.autocomplete-active.is-focused)
-4:37.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
6x -3:36.2.0 core:backspace (atom-text-editor.editor.is-focused)
-3:16.8.0 core:delete (atom-text-editor.editor.is-focused)
-3:14 core:move-down (atom-text-editor.editor.is-focused)
-3:13.3.0 editor:select-line (atom-text-editor.editor.is-focused)
-3:13.1.0 editor:delete-to-beginning-of-line (atom-text-editor.editor.is-focused)
-3:12.7.0 core:save (atom-text-editor.editor.is-focused)
-0:27.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:24 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:24 git-log:show (atom-text-editor.editor)
-0:20 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:12.7.0 core:close (div.git-log)
Config
{
"core": {
"themes": [
"seti-ui",
"saturated-dark"
],
"projectHome": "/Users/mothership/Code",
"destroyEmptyPanes": false,
"disabledPackages": [
"language-javascript-semantic",
"tidy-markdown",
"atom-beautify",
"atom-typescript",
"pigments"
],
"audioBeep": false
}
}Installed Packages
# User
.bin, vundefined
angularjs, v0.3.0
color-picker, v2.0.5
emmet, v2.3.10
fonts, v0.4.2
git-log, v0.4.1
git-plus, v5.1.2
git-tab-status, v1.9.2
linter, v0.12.7
linter-eslint, v0.5.9
linter-jscs, v1.12.0
minimap, v4.10.0
minimap-find-and-replace, v4.2.0
minimap-git-diff, v4.1.3
minimap-selection, v4.2.0
project-manager, v1.15.10
saturated-dark, v0.4.0
seti-ui, v0.7.1
zentabs, v0.8.4
# Dev
No dev packages
Activity
fank commentedon Jun 19, 2015
I got the same error, with the same package. Open the git log, close it before it show content and close it.
Atom Version: 0.210.0
System: Ubuntu 15.04
Thrown From: tabs package, v0.81.0
Stack Trace
Uncaught TypeError: Cannot read property 'dispose' of undefined
Commands
Config
{ "core": { "disabledPackages": [ "snippets", "linter-perl", "atom-auto-uglify", "save-session", "highlight-selected", "minimap-highlight-selected", "atom-2048", "achievements" ], "autoHideMenuBar": true } }Installed Packages
DjebbZ commentedon Jun 20, 2015
Same here, it happened to me just now.
When the error happens, it become impossible to close the Git-Log tabs. Even "Close All tabs" leaves one open. A closed tab just stays in the "not active" one. Click this tab open a new tab with the content of "Git Log", but the useless tab remains.
filipesilva commentedon Jun 22, 2015
I also have this problem.
denysdovhan commentedon Jun 22, 2015
I have same problem
damm commentedon Jun 22, 2015
same here... Nothing fancy started atom closed 2 windows and ..
**Atom Version_: 0.211.0
_System*: Mac OS X 10.10.3
Thrown From: tabs package, v0.81.0
Stack Trace
Uncaught Error: The workspace can only contain one instance of item [object Object]
Commands
Config
{ "core": { "disabledPackages": [ "metrics", "sourcegraph-atom", "snippets", "autocomplete-atom-api" ] } }Installed Packages
nrozic commentedon Jun 25, 2015
Same here
[Enter steps to reproduce below:]
Atom Version: 1.0.0
System: Mac OS X 10.10.3
Thrown From: tabs package, v0.81.0
Stack Trace
Uncaught TypeError: Cannot read property 'dispose' of undefined
Commands
Config
{ "core": { "themes": [ "atom-material-ui", "atom-material-syntax" ] } }Installed Packages
crucialfelix commentedon Jun 28, 2015
I'm the author of the atom supercollider package. I get the same issue all the time. I would guess its because there isn't a real document in that pane. Its a REPL post window.
damm commentedon Jun 28, 2015
+1 what @crucialfelix said; I was trying to close several tabs and it looked like it spawned a bunch of empty tabs in error (with no documents)
I had to just quit Atom and start it back up and it worked
weiher commentedon Jun 29, 2015
Off-Topic: I really love the "This issue has already been reported. View Issue" Function in Atom Editor. You know that there is a bug, you know how it can be reproduce and as all of your users are developers, they can handle this type of information!
On-Topic: Had the same problem, window:reload as suggested by @alexbuzzbee works for me.
mradzinski commentedon Jun 30, 2015
[Enter steps to reproduce below:]
Atom Version: 1.0.0
System: Unknown Windows Version
Thrown From: tabs package, v0.81.0
Stack Trace
Uncaught TypeError: Cannot read property 'dispose' of undefined
Commands
Config
{ "core": { "audioBeep": false } }Installed Packages
motjuste commentedon Jul 1, 2015
Atom Version: 1.0.0
System: Mac OS X 10.10.3
Thrown From: tabs package, v0.81.0
Stack Trace
Uncaught TypeError: Cannot read property 'dispose' of undefined
Commands
Config
{ "core": { "disabledPackages": [ "autocomplete-jedi", "clipboard-plus", "color-picker", "vim-mode-clipboard-plus", "linter-cpplint", "linter", "linter-pep8" ], "destroyEmptyPanes": false } }Installed Packages
as-cii commentedon Jul 7, 2015
This seems to be the culprit for
git-log-view: https://github.com/NikhilKalige/git-log/blob/master/lib/git-log-view.js#L183-L189. I think those two functions were implemented because at some point intabshistory they were mandatory: the package, however, is not actually using them and unfortunately returnsnull. As a result, we are adding anundefinedobject to theCompositeDisposablethat, of course, hasn’t got adisposefunction. To solve this issue I am going to:event-kit, allowing to add to aCompositeDisposableonly those objects that respond todispose. This should allow package authors to catch these kinds of issues early;git-log-viewand delete those two methods, as they are not mandatory to respectTabViewcontract;/cc: @benogle @kevinsawicki
🔥 Remove `onDidChange` callbacks
thomasjo commentedon Jul 7, 2015
Nice catch @as-cii
ManasN commentedon Aug 15, 2015
Can I overcome this issue temporarily and still use the plugin? Won't mind doing some extra settings or pressing extra keys.
I love atom. Slickest at it's best.
as-cii commentedon Aug 19, 2015
@ManasN: there's a pending PR where we have discussed how to properly address this problem. We have settled on adding a check to verify that clients properly implement the
Disposablecontract and, once it lands, you should be able to use thegit-logpackage (even if nikhilkalige/git-log#60 doesn't get merged).Sorry this is taking a while to get fixed, but I'll try to make time this week to push the resolution forward. Thanks for understanding! 🙏
gsscoder commentedon Aug 28, 2015
TL;DR
I also had this issue...
filipesilva commentedon Aug 28, 2015
Cheers for the fix!
gsscoder commentedon Aug 28, 2015
👍