Pulsar-Edit-Highlights / selected

@Pulsar-Edit package for highlighting occurrences of your selection.
https://web.pulsar-edit.dev/packages/highlight-selected
MIT License
248 stars 67 forks source link

Uncaught TypeError: markerLayer.clear is not a function #186

Open ahmedsamir17296 opened 6 years ago

ahmedsamir17296 commented 6 years ago

i can't close any tab because of that problem

richrace commented 6 years ago

Do you have a full stack trace?

barisdemiray commented 6 years ago

I have the same problem with version 0.14.0 but with two error notifications opening. I copy-paste both of them below (second one in a separate message), feel free to ask for further information.

Thanks.

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.13.0 Electron Version: 1.3.13 System: Ubuntu 18.04.1 Thrown From: highlight-selected package, v0.14.0

Stack Trace

Failed to activate the highlight-selected package

At markerLayer.clear is not a function

TypeError: markerLayer.clear is not a function
    at HighlightedAreaView.module.exports.HighlightedAreaView.removeMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:234:17)
    at /home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1
    at Array.forEach (native)
    at HighlightedAreaView.module.exports.HighlightedAreaView.removeAllMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:226:42)
    at HighlightedAreaView.removeAllMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at HighlightedAreaView.module.exports.HighlightedAreaView.handleSelection (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:123:6)
    at HighlightedAreaView.handleSelection (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at HighlightedAreaView.module.exports.HighlightedAreaView.subscribeToActiveTextEditor (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:109:6)
    at new HighlightedAreaView (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:33:6)
    at Object.activate (/home/baris/.atom/packages/highlight-selected/lib/highlight-selected.coffee:52:21)
    at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:191:19)
    at /usr/share/atom/resources/app.asar/src/package.js:164:32
    at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:94:15)
    at /usr/share/atom/resources/app.asar/src/package.js:157:26
    at Package.module.exports.Package.activate (/usr/share/atom/resources/app.asar/src/package.js:154:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:550:34)
    at /usr/share/atom/resources/app.asar/src/package-manager.js:531:29
    at Config.module.exports.Config.transactAsync (/usr/share/atom/resources/app.asar/src/config.js:337:18)
    at PackageManager.module.exports.PackageManager.activatePackages (/usr/share/atom/resources/app.asar/src/package-manager.js:526:19)
    at PackageManager.module.exports.PackageManager.activate (/usr/share/atom/resources/app.asar/src/package-manager.js:508:46)
    at /usr/share/atom/resources/app.asar/src/atom-environment.js:831:28

Commands

Config

{
  "core": {
    "disabledPackages": [
      "symbols-view"
    ],
    "telemetryConsent": "limited",
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "highlight-selected": {
    "highlightInPanes": false
  }
}

Installed Packages

# User
atom-beautify, v0.30.6 (inactive)
atom-ctags, v5.1.2 (inactive)
emmet, v2.4.3 (inactive)
highlight-selected, v0.14.0 (inactive)
linter, v1.11.23 (inactive)
linter-gcc, v0.7.1 (inactive)
atom-dark-syntax, v0.28.0 (inactive)
atom-dark-ui, v0.53.0 (inactive)
atom-light-syntax, v0.29.0 (inactive)
atom-light-ui, v0.46.0 (inactive)
base16-tomorrow-dark-theme, v1.4.0 (inactive)
base16-tomorrow-light-theme, v1.4.0 (inactive)
one-dark-ui, v1.8.2 (inactive)
one-light-ui, v1.8.2 (inactive)
one-dark-syntax, v1.6.0 (inactive)
one-light-syntax, v1.6.0 (inactive)
solarized-dark-syntax, v1.1.1 (inactive)
solarized-light-syntax, v1.1.1 (inactive)
about, v1.7.2 (inactive)
archive-view, v0.62.0 (inactive)
autocomplete-atom-api, v0.10.0 (inactive)
autocomplete-css, v0.14.1 (inactive)
autocomplete-html, v0.7.2 (inactive)
autocomplete-plus, v2.33.1 (inactive)
autocomplete-snippets, v1.11.0 (inactive)
autoflow, v0.29.0 (inactive)
autosave, v0.23.2 (inactive)
background-tips, v0.26.1 (inactive)
bookmarks, v0.43.2 (inactive)
bracket-matcher, v0.85.1 (inactive)
command-palette, v0.39.1 (inactive)
deprecation-cop, v0.55.1 (inactive)
dev-live-reload, v0.47.0 (inactive)
encoding-selector, v0.22.0 (inactive)
exception-reporting, v0.40.0 (inactive)
find-and-replace, v0.204.5 (inactive)
fuzzy-finder, v1.4.0 (inactive)
git-diff, v1.2.0 (inactive)
go-to-line, v0.31.2 (inactive)
grammar-selector, v0.48.2 (inactive)
image-view, v0.60.0 (inactive)
incompatible-packages, v0.26.1 (inactive)
keybinding-resolver, v0.35.0 (inactive)
line-ending-selector, v0.5.1 (inactive)
link, v0.31.2 (inactive)
markdown-preview, v0.159.1 (inactive)
metrics, v1.1.2 (inactive)
notifications, v0.65.1 (inactive)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.2 (inactive)
settings-view, v0.244.0 (inactive)
snippets, v1.0.4 (inactive)
spell-check, v0.68.5 (inactive)
status-bar, v1.6.0 (inactive)
styleguide, v0.48.0 (inactive)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.1 (inactive)
timecop, v0.33.2 (inactive)
tree-view, v0.211.1 (inactive)
update-package-dependencies, v0.10.0 (inactive)
welcome, v0.35.1 (inactive)
whitespace, v0.35.0 (inactive)
wrap-guide, v0.39.0 (inactive)
language-c, v0.54.0 (inactive)
language-clojure, v0.22.1 (inactive)
language-coffee-script, v0.48.1 (inactive)
language-csharp, v0.13.0 (inactive)
language-css, v0.40.1 (inactive)
language-gfm, v0.88.0 (inactive)
language-git, v0.15.0 (inactive)
language-go, v0.43.0 (inactive)
language-html, v0.47.1 (inactive)
language-hyperlink, v0.16.1 (inactive)
language-java, v0.24.0 (inactive)
language-javascript, v0.122.0 (inactive)
language-json, v0.18.3 (inactive)
language-less, v0.29.6 (inactive)
language-make, v0.22.2 (inactive)
language-mustache, v0.13.0 (inactive)
language-objective-c, v0.15.1 (inactive)
language-perl, v0.37.0 (inactive)
language-php, v0.37.3 (inactive)
language-property-list, v0.8.0 (inactive)
language-python, v0.45.1 (inactive)
language-ruby, v0.70.2 (inactive)
language-ruby-on-rails, v0.25.1 (inactive)
language-sass, v0.57.0 (inactive)
language-shellscript, v0.23.0 (inactive)
language-source, v0.9.0 (inactive)
language-sql, v0.25.0 (inactive)
language-text, v0.7.1 (inactive)
language-todo, v0.29.1 (inactive)
language-toml, v0.18.1 (inactive)
language-xml, v0.34.12 (inactive)
language-yaml, v0.27.1 (inactive)

# Dev
No dev packages
barisdemiray commented 6 years ago

And the second one.

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.13.0 Electron Version: 1.3.13 System: Ubuntu 18.04.1 Thrown From: highlight-selected package, v0.14.0

Stack Trace

Uncaught TypeError: markerLayer.clear is not a function

At /home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:234

TypeError: markerLayer.clear is not a function
    at HighlightedAreaView.module.exports.HighlightedAreaView.removeMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:234:17)
    at /home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1
    at Array.forEach (native)
    at HighlightedAreaView.module.exports.HighlightedAreaView.removeAllMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:226:42)
    at HighlightedAreaView.removeAllMarkers (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at HighlightedAreaView.module.exports.HighlightedAreaView.handleSelection (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:123:6)
    at HighlightedAreaView.handleSelection (/home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:1:1)
    at /home/baris/.atom/packages/highlight-selected/lib/highlighted-area-view.coffee:88:8

Commands

Config

{
  "core": {
    "disabledPackages": [
      "symbols-view"
    ],
    "telemetryConsent": "limited",
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "highlight-selected": {
    "highlightInPanes": false
  }
}

Installed Packages

# User
atom-beautify, v0.30.6 (active)
atom-ctags, v5.1.2 (active)
emmet, v2.4.3 (active)
highlight-selected, v0.14.0 (active)
linter, v1.11.23 (active)
linter-gcc, v0.7.1 (active)
atom-dark-syntax, v0.28.0 (inactive)
atom-dark-ui, v0.53.0 (inactive)
atom-light-syntax, v0.29.0 (active)
atom-light-ui, v0.46.0 (active)
base16-tomorrow-dark-theme, v1.4.0 (inactive)
base16-tomorrow-light-theme, v1.4.0 (inactive)
one-dark-ui, v1.8.2 (inactive)
one-light-ui, v1.8.2 (inactive)
one-dark-syntax, v1.6.0 (inactive)
one-light-syntax, v1.6.0 (inactive)
solarized-dark-syntax, v1.1.1 (inactive)
solarized-light-syntax, v1.1.1 (inactive)
about, v1.7.2 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.14.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.33.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.29.0 (inactive)
autosave, v0.23.2 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.43.2 (active)
bracket-matcher, v0.85.1 (active)
command-palette, v0.39.1 (inactive)
deprecation-cop, v0.55.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.204.5 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.2.0 (active)
go-to-line, v0.31.2 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.1 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.159.1 (active)
metrics, v1.1.2 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.2 (inactive)
settings-view, v0.244.0 (active)
snippets, v1.0.4 (active)
spell-check, v0.68.5 (active)
status-bar, v1.6.0 (active)
styleguide, v0.48.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.1 (active)
timecop, v0.33.2 (active)
tree-view, v0.211.1 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.39.0 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.1 (active)
language-csharp, v0.13.0 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.47.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (active)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages
richrace commented 6 years ago

I haven't experienced this. Are you able to reproduce it consistently?

barisdemiray commented 6 years ago

On my Linux box (where I collected the error reports above) it happens all the time, I had to deactivate highlight-selected. On my Windows box it never happens.

I just noticed that Atom on my Linux (Ubuntu 18.04.1 LTS) is pretty old although the highlight-selected version is the same (both 0.14.0).

Windows> atom --version
Atom    : 1.31.2
Electron: 2.0.7
Chrome  : 61.0.3163.100
Node    : 8.9.3
Linux$ atom --version
Atom    : 1.13.0
Electron: 1.3.13
Chrome  : 52.0.2743.82
Node    : 6.5.0