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

Uncaught TypeError: Cannot read property 'tokens' of undefined #198

Closed
dstroot opened this issue Jan 7, 2015 · 6 comments
Closed

Uncaught TypeError: Cannot read property 'tokens' of undefined #198

dstroot opened this issue Jan 7, 2015 · 6 comments

Comments

@dstroot
Copy link

dstroot commented Jan 7, 2015

[Enter steps to reproduce below:]

  1. just clicked and tried to drag on minimap as is possible with ST

Atom Version: 0.166.0
System: Mac OS X 10.10.1
Thrown From: minimap package, v3.5.2

Stack Trace

Uncaught TypeError: Cannot read property 'tokens' of undefined

At /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/display-buffer.js:958

TypeError: Cannot read property 'tokens' of undefined
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForPixelPosition (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/display-buffer.js:958:50)
  at MinimapView.module.exports.MinimapView.onMouseDown (/Users/Dan/Dropbox/Mackup/.atom/packages/minimap/lib/minimap-view.coffee:500:38)
  at space-pen-div.<anonymous> (/Users/Dan/Dropbox/Mackup/.atom/packages/minimap/lib/minimap-view.coffee:1:1)

Commands

     -0:00.0 open-recent:open-recent-path-2 (ul.list-inline.tab-bar.inset-panel)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store",
      "._*"
    ],
    "followSymlinks": true,
    "disabledPackages": [
      "sublime-tabs",
      "highlight-line",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-mustache",
      "language-java"
    ],
    "themes": [
      "atom-dark-ui",
      "monokai"
    ],
    "projectHome": "/Users/Dan/Code",
    "destroyEmptyPanes": false
  }
}

Installed Packages

# User
atom-color-highlight, v3.0.2
color-picker, v1.2.6
docblockr, v0.5.8
editorconfig, v0.2.3
file-icons, v1.4.4
language-jade, v0.3.0
linter, v0.9.1
linter-csslint, v0.0.11
linter-jscs, v1.4.9
linter-jshint, v0.1.0
linter-less, v0.3.1
linter-tidy, v0.0.1
local-history, v2.0.0
minimap, v3.5.2
monokai, v0.9.0
open-recent, v2.0.0

# Dev
No dev packages

/cc @atom/core

@abe33
Copy link
Contributor

abe33 commented Jan 7, 2015

Thanks for the report, I'll fix that asap.

@abe33
Copy link
Contributor

abe33 commented Jan 7, 2015

Hmm, I can't reproduce it, does it occurs repeatedly?

I also see that the last command comes from the open-recent package, is there a recent update of this package? Does this error occurs when opening a project the classical way?

@sdouche
Copy link

sdouche commented Jan 7, 2015

Same error here. Just clicked on the minimap
Atom Version: 0.165.0
System: Ubuntu 14.10
Thrown From: minimap package, v3.5.3

Stack Trace

TypeError: Cannot read property 'tokens' of undefined
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForPixelPosition (/opt/atom/resources/app/src/display-buffer.js:940:50)
  at MinimapView.module.exports.MinimapView.onMouseDown (/home/sdouche/.atom/packages/minimap/lib/minimap-view.coffee:500:38)
  at space-pen-div.<anonymous> (/home/sdouche/.atom/packages/minimap/lib/minimap-view.coffee:1:1)

@muchweb
Copy link

muchweb commented Jan 7, 2015

Same error here. Happened when I have split the view and then destroyed the split.

@dstroot
Copy link
Author

dstroot commented Jan 7, 2015

Occurs pretty regularly - I opened a folder without using the 'open-recent' package and same thing but it took me a few attempts with different files to get it to happen. Interestingly my package.json seems to work best.

@abe33 abe33 closed this as completed in a77a94a Jan 7, 2015
@abe33
Copy link
Contributor

abe33 commented Jan 7, 2015

The new click handler now use the same implementation as with v4 preview, meaning that it doesn't rely on screenPositionForPixelPosition to compute the row at position. I hope it'll fix the issue, if not I'll reopen this ticket.

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

No branches or pull requests

4 participants