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 'getScrollTop' of null #273

Closed
bkarr opened this issue Feb 16, 2015 · 5 comments
Closed

Uncaught TypeError: Cannot read property 'getScrollTop' of null #273

bkarr opened this issue Feb 16, 2015 · 5 comments

Comments

@bkarr
Copy link

bkarr commented Feb 16, 2015

[Enter steps to reproduce below:]

  1. ...Toggled off minimap
  2. ...

Atom Version: 0.179.0
System: linux 3.13.0-24-generic
Thrown From: minimap package, v4.2.0

Stack Trace

Uncaught TypeError: Cannot read property 'getScrollTop' of null

At /home/bryk/.atom/packages/minimap/lib/minimap.coffee:179

TypeError: Cannot read property 'getScrollTop' of null
  at Minimap.module.exports.Minimap.getTextEditorScrollRatio (/home/bryk/.atom/packages/minimap/lib/minimap.coffee:179:16)
  at Minimap.module.exports.Minimap.getCapedTextEditorScrollRatio (/home/bryk/.atom/packages/minimap/lib/minimap.coffee:186:50)
  at Minimap.module.exports.Minimap.getScrollTop (/home/bryk/.atom/packages/minimap/lib/minimap.coffee:256:15)
  at Minimap.module.exports.Minimap.getLastVisibleScreenRow (/home/bryk/.atom/packages/minimap/lib/minimap.coffee:247:17)
  at Minimap.module.exports.DecorationManagement.emitRangeChanges (/home/bryk/.atom/packages/minimap/lib/mixins/decoration-management.coffee:167:31)
  at Minimap.module.exports.DecorationManagement.emitDecorationChanges (/home/bryk/.atom/packages/minimap/lib/mixins/decoration-management.coffee:159:6)
  at Minimap.module.exports.DecorationManagement.removeDecoration (/home/bryk/.atom/packages/minimap/lib/mixins/decoration-management.coffee:188:6)
  at /home/bryk/.atom/packages/minimap/lib/mixins/decoration-management.coffee:144:8
  at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Decoration.module.exports.Decoration.destroy (/opt/atom/resources/app/src/decoration.js:59:20)
  at MinimapSelectionView.module.exports.MinimapSelectionView.removeDecorations (/home/bryk/.atom/packages/minimap-selection/lib/minimap-selection-view.coffee:34:17)
  at MinimapSelectionView.module.exports.MinimapSelectionView.destroy (/home/bryk/.atom/packages/minimap-selection/lib/minimap-selection-view.coffee:20:6)
  at /home/bryk/.atom/packages/minimap-selection/lib/minimap-selection.coffee:35:23
  at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Minimap.module.exports.Minimap.destroy (/home/bryk/.atom/packages/minimap/lib/minimap.coffee:74:14)
  at /home/bryk/.atom/packages/minimap/lib/main.coffee:145:15
  at Map.forEach (native)
  at Main.toggle (/home/bryk/.atom/packages/minimap/lib/main.coffee:144:25)
  at atom-workspace.Main.subscriptionsOfCommands.add.atom.commands.add.minimap:toggle (/home/bryk/.atom/packages/minimap/lib/main.coffee:102:29)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app/src/command-registry.js:243:29)
  at CommandRegistry.handleCommandEvent (/opt/atom/resources/app/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/opt/atom/resources/app/src/command-registry.js:156:19)
  at EventEmitter.<anonymous> (/opt/atom/resources/app/src/window-event-handler.js:65:30)
  at EventEmitter.emit (events.js:116:17)

Commands

  3x -0:50.2 core:page-down (atom-text-editor.editor)
 21x -0:27.4 core:move-down (atom-text-editor.editor.is-focused)
 33x -0:25.6 core:move-up (atom-text-editor.editor.is-focused)
     -0:03.2 minimap:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "destroyEmptyPanes": false
  },
  "minimap": {
    "plugins": {
      "selection": true,
      "git-diff": true,
      "find-and-replace": true
    }
  }
}

Installed Packages

# User
autocomplete-clang, v0.6.2
autocomplete-plus, v2.1.6
indent-guide-improved, v1.1.1
linter, v0.11.1
linter-clang, v2.25.1
minimap, v4.2.0
minimap-find-and-replace, v3.1.0
minimap-git-diff, v3.1.1
minimap-selection, v4.0.1

# Dev
No dev packages
@abe33
Copy link
Contributor

abe33 commented Feb 16, 2015

Thanks for the report, the patch is coming.

@abe33 abe33 closed this as completed in 23f1349 Feb 16, 2015
@diegognt
Copy link

Happen to me, right now

@anjerodesu
Copy link

Happened to me today. Very rare moment as this is the first time I encounter such bug. Anyway, what I'm doing is closing tabs, probably fast enough that this error came up.

@abe33
Copy link
Contributor

abe33 commented Aug 28, 2015

@diegognt & @anjerodesu If you you have the same Atom version as the initial reporter I urge you to update (Atom has moved past the 1.0.0 milestone now so maintaining old pre-1.0 version is a no go).

If not, can you open a new issue with some details about the context? (the stack of the initial report is irrelevant then).

@anjerodesu
Copy link

@abe33 yep, sorry about that. Kinda busy earlier that I forgot to check whether the issue is still open or not.

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