Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Uncaught TypeError: undefined is not a function on Undo operations for special panes #6587

Closed

Description

@DepthDeluxe

Steps to recreate.

  1. Open Timecop or the Styleguide
  2. Perform an Undo (Redo also causes problem in Timecop)

Atom Version: 0.193.0
System: linux 3.19.3-3-ARCH
Thrown From: Atom Core

Stack Trace

Uncaught TypeError: undefined is not a function

At /usr/share/atom/resources/app.asar/src/window-event-handler.js:164

TypeError: undefined is not a function
  at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:164:20)
  at HTMLDocument.handler (/usr/share/atom/resources/app.asar/src/space-pen-extensions.js:115:32)
  at HTMLDocument.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
  at HTMLDocument.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:238:29)
  at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:153:19)
  at EventEmitter.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:71:30)
  at emitOne (events.js:77:13)
  at EventEmitter.emit (events.js:166:7)

Commands

     -3:31 timecop:view (atom-text-editor.editor.vim-mode.command-mode)
     -2:29 core:undo (div.timecop.pane-item.native-key-bindings)
     -1:40.7.0 settings-view:open (div.timecop.pane-item.native-key-bindings)
     -1:36.5.0 core:undo (div.settings-view.pane-item)
     -1:34.8.0 core:redo (div.settings-view.pane-item)
     -1:29 open-on-github:file (div.timecop.pane-item.native-key-bindings)
     -1:06.5.0 core:undo (div.timecop.pane-item.native-key-bindings)
     -0:00.5.0 core:redo (div.timecop.pane-item.native-key-bindings)

Config

{
  "core": {
    "useReactEditor": true,
    "disabledPackages": [
      "minimap",
      "symbols-view"
    ]
  },
  "editor": {
    "softWrap": true,
    "invisibles": {},
    "fontFamily": "monospace",
    "fontSize": 17
  }
}

Installed Packages

# User
atom-ctags, v3.2.0
atom-html-preview, v0.1.6
autocomplete-plus, v2.12.1
color-picker, v1.7.0
language-puppet, v0.11.0
linter, v0.12.1
linter-cpplint, v0.1.4
linter-jshint, v0.1.2
linter-pep8, v0.1.0
vim-mode, v0.45.0

# Dev
No dev packages

Activity

  1. winstliu commented on Apr 30, 2015

    @winstliu
    Contributor

    Confirmed on latest master.

  2. croaker000 commented on May 12, 2015

    @croaker000

    ctrl-ins causes this on Settings->keybindings page when trying to copy contents of command column.

  3. added
    linux
    on May 13, 2015
  4. izuzak commented on May 13, 2015

    @izuzak
    Contributor

    I've been able to reproduce this on Linux, but not on OSX.

  5. sebastianrosik commented on May 23, 2015

    @sebastianrosik

    This can be also reproduced by using the asciidoc-preview package: create a preview pane for the asciidoc document and move it to a new Atom window.

    Atom version 0.198.0 on ubuntu 15.04 3.19.0-15-generic

  6. carstenhag commented on May 28, 2015

    @carstenhag

    Getting something similar when trying to Split a html-tab tab.

    Atom 0.201.0, Windows 10 x64, color-picker, linter, minimap, html-tab, autoclose-html installed.

    C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:293
    Hide Stack Trace
    TypeError: undefined is not a function
      at TabBarView.module.exports.TabBarView.copyItem (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:293:133)
      at TabBarView.module.exports.TabBarView.splitTab (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:283:31)
      at space-pen-ul.subscriptions.add.atom.commands.add.tabs:split-down (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:77:26)
      at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\command-registry.js:238:29)
      at CommandRegistry.handleCommandEvent (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\command-registry.js:3:61)
      at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\command-registry.js:153:19)
      at [object Object].jQuery.fn.trigger (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\space-pen-extensions.js:64:23)
      at EventEmitter.<anonymous> (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\window-event-handler.js:76:67)
      at emitTwo (events.js:87:13)
      at EventEmitter.emit (events.js:169:7)
      at EventEmitter.ipc.sendSync (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\atom.asar\renderer\api\lib\ipc.js:21:31)
      at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\atom.asar\renderer\api\lib\remote.js:110:29)
      at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\context-menu-manager.js:170:31)
      at HTMLDocument.<anonymous> (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\window-event-handler.js:149:33)
      at HTMLDocument.handler (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\src\space-pen-extensions.js:112:34)
      at HTMLDocument.jQuery.event.dispatch (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
      at HTMLDocument.elemData.handle (C:\Users\Carsten\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
    
  7. arl commented on May 29, 2015

    @arl

    Getting exactly the same stack trace as @DepthDeluxe (issue creator) :

    • freshly installed atom, from .deb file on ubuntu 14.10 x64 (atom 0.204.0)
    • no additional packages installed

    Now i can't provide you with the steps to reproduce because i can't reproduce it but what i did when it happened was :

    • launch atom for the 1st time
    • open a folder
    • open a markdown file (*.md) in my project
    • open Markdown preview
    • did some changes
    • at one point, i undo'ed something
      and that's when it happened

    BTW @DepthDeluxe how did you get that list of commands you put in your comment?

  8. DepthDeluxe commented on May 30, 2015

    @DepthDeluxe
    Author

    @aurelien-rainone, the exception window includes a button that copies the whole thing onto the clipboard. You still have to write out what you did to cause the bug.

    screenshot from 2015-05-30 09-43-02

  9. DepthDeluxe commented on May 30, 2015

    @DepthDeluxe
    Author

    @aurelien-rainone it looks like this issue also affects Markdown-Preview.

    I think Atom should either handle that type of exception for editor commands and fail silently or have some type of NULL function that gets registered to handlers by default.

  10. arl commented on Jun 11, 2015

    @arl

    @DepthDeluxe thanks for the explaination
    BTW yes Mardown-Preview is also affected that's where i had the bug

  11. vbrozik commented on Jul 4, 2015

    @vbrozik

    For me this error happened when I pressed Shift+Delete by accident in markdown-preview.

    Steps to reproduce

    1. Open a markdown file.
    2. Start markdown-preview: Ctrl+Shift+m
    3. Press Shift+Delete or Shift+Insert.

    Atom Version: 1.0.0
    System: Ubuntu 14.04.2
    Thrown From: Atom Core

    Stack Trace

    Uncaught TypeError: undefined is not a function

    At /usr/share/atom/resources/app.asar/src/window-event-handler.js:165
    
    TypeError: undefined is not a function
      at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:165:20)
      at HTMLDocument.handler (/usr/share/atom/resources/app.asar/src/space-pen-extensions.js:115:32)
      at HTMLDocument.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
      at HTMLDocument.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)
      at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:29)
      at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
      at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
      at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
      at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:180:20)
    
    

    Commands

     11x -8:42.1.0 markdown-preview:toggle (atom-text-editor.editor.is-focused)
         -0:00.4.0 core:cut (div.markdown-preview.native-key-bindings)
    

    Config

    {
      "core": {},
      "editor": {
        "invisibles": {}
      }
    }

    Installed Packages

    # User
    No installed packages
    
    # Dev
    No dev packages
  12. added 2 commits that reference this issue on Jul 7, 2015
    030648a
    a4d716c
  13. lock commented on Jan 21, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  14. locked as resolved and limited conversation to collaborators on Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglinuxuncaught-exception

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions