jasongilman / proto-repl

A Clojure Development Environment package for the Atom editor
https://atom.io/packages/proto-repl
MIT License
563 stars 50 forks source link

Uncaught TypeError: Cannot read property 'row' of undefined #229

Closed ckampfe closed 6 years ago

ckampfe commented 7 years ago
  1. open build.boot
  2. From Packages menu attempt to proto-repl > start REPL from open project.clj/build.boot

Atom: 1.14.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.3 Thrown From: proto-repl package 1.4.14

Stack Trace

Uncaught TypeError: Cannot read property 'row' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:824

TypeError: Cannot read property 'row' of undefined
    at Function.module.exports.Point.fromObject (/app.asar/node_modules/text-buffer/lib/point.js:30:23)
    at Point.module.exports.Point.traverse (/app.asar/node_modules/text-buffer/lib/point.js:115:21)
    at TextBuffer.textEditor.buffer.applyChange (/packages/proto-repl/lib/views/repl-text-editor.coffee:156:38)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:557:19)
    at /app.asar/node_modules/text-buffer/lib/text-buffer.js:538:26
    at TextBuffer.module.exports.TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:819:18)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:536:21)
    at TextBuffer.module.exports.TextBuffer.insert (/app.asar/node_modules/text-buffer/lib/text-buffer.js:561:19)
    at /packages/proto-repl/lib/views/repl-text-editor.coffee:217:47
    at ReplTextEditor.module.exports.ReplTextEditor.modifyTextWith (/packages/proto-repl/lib/views/repl-text-editor.coffee:99:5)
    at ReplTextEditor.module.exports.ReplTextEditor.appendText (/packages/proto-repl/lib/views/repl-text-editor.coffee:215:8)
    at ReplTextEditor.module.exports.ReplTextEditor.stdout (/packages/proto-repl/lib/views/repl-text-editor.coffee:229:6)
    at /packages/proto-repl/lib/process/local-repl-process.coffee:120:17
    at /app.asar/src/task.js:126:25
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at /app.asar/src/task.js:78:34)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at process.nextTick (internal/child_process.js:744:12)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Commands

     -0:45.5.0 command-palette:toggle (atom-pane.pane.active)
     -0:44.5.0 editor:consolidate-selections (input.hidden-input)
     -0:44.5.0 core:cancel (input.hidden-input)
     -0:44 command-palette:toggle (atom-pane.pane.active)
     -0:43.6.0 editor:consolidate-selections (input.hidden-input)
     -0:43.6.0 core:cancel (input.hidden-input)
     -0:22.6.0 proto-repl:toggle-current-project-clj (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)

Non-Core Packages

browser-plus 0.0.87 
close-on-left 0.7.1 
color-picker 2.2.5 
duotone-light-syntax 2.1.0 
Ensime 0.40.0 
hyperclick 0.0.40 
ink 0.6.2 
intentions 1.1.2 
language-elixir 0.17.0 
language-rust 0.4.9 
language-scala 1.1.8 
linter 1.11.21 
markdown-preview-plus 2.4.1 
nerd-treeview 0.4.3 
open-recent 5.0.0 
Parinfer 1.17.0 
proto-repl 1.4.14 
vim-mode-plus 0.82.0 
vim-modeline 0.5.2 
aaimnr commented 7 years ago

Same here, all other non-core packages disabled. To be clear - there's no way for me to launch proto-repl now, the error appears right away.

  1. create new project with lein
  2. open the default src/core.clj file
  3. open repl via ctrl+, L

1.14.1 x64 Electron: 1.3.13 OS: Microsoft Windows 10 Enterprise Thrown From: proto-repl package 1.4.14

Stack Trace

Uncaught TypeError: Cannot read property 'row' of undefined

At C:\Users\amiran.chyb\AppData\Local\atom\app-1.14.1\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:824

TypeError: Cannot read property 'row' of undefined
    at Function.module.exports.Point.fromObject (/app.asar/node_modules/text-buffer/lib/point.js:30:23)
    at Point.module.exports.Point.traverse (/app.asar/node_modules/text-buffer/lib/point.js:115:21)
    at TextBuffer.textEditor.buffer.applyChange (/packages/proto-repl/lib/views/repl-text-editor.coffee:156:38)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:557:19)
    at /app.asar/node_modules/text-buffer/lib/text-buffer.js:538:26
    at TextBuffer.module.exports.TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:819:18)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:536:21)
    at TextBuffer.module.exports.TextBuffer.insert (/app.asar/node_modules/text-buffer/lib/text-buffer.js:561:19)
    at /packages/proto-repl/lib/views/repl-text-editor.coffee:217:47
    at ReplTextEditor.module.exports.ReplTextEditor.modifyTextWith (/packages/proto-repl/lib/views/repl-text-editor.coffee:99:5)
    at ReplTextEditor.module.exports.ReplTextEditor.appendText (/packages/proto-repl/lib/views/repl-text-editor.coffee:215:8)
    at ReplTextEditor.module.exports.ReplTextEditor.info (/packages/proto-repl/lib/views/repl-text-editor.coffee:223:6)
    at LocalReplProcess.module.exports.LocalReplProcess.start (/packages/proto-repl/lib/process/local-repl-process.coffee:101:15)
    at Repl.module.exports.Repl.startProcessIfNotRunning (/packages/proto-repl/lib/repl.coffee:103:16)
    at Object.toggle (/packages/proto-repl/lib/proto-repl.coffee:218:13)
    at /packages/proto-repl/lib/proto-repl.coffee:115:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -6:04.6.0 command-palette:toggle (atom-pane.pane.active)
     -5:56.5.0 editor:consolidate-selections (input.hidden-input)
     -5:56.5.0 core:cancel (input.hidden-input)
     -5:55.3.0 command-palette:toggle (atom-pane.pane.active)
     -5:53.3.0 editor:consolidate-selections (input.hidden-input)
     -5:53.3.0 core:cancel (input.hidden-input)
  2x -5:44.3.0 editor:select-line (atom-pane.pane.active)
     -5:42.1.0 grammar-selector:show (atom-pane.pane.active)
     -5:17.3.0 core:confirm (input.hidden-input)
  6x -4:59.2.0 core:backspace (input.hidden-input)
     -4:55.7.0 core:confirm (input.hidden-input)
     -4:42.7.0 core:backspace (input.hidden-input)
  2x -4:38.8.0 proto-repl:toggle (input.hidden-input)

Non-Core Packages

Parinfer 1.17.0 
proto-repl 1.4.14 
proto-repl-charts 0.4.0 
proto-repl-sayid 0.1.4 
pmyszka commented 7 years ago

@ckampfe @aaimnr do you have ink and tool-bar packages installed?

aaimnr commented 7 years ago

Hi @pmyszka, as you may see on the dump generated by Atom within the issues above, I only have the following non-core packages installed: Parinfer 1.17.0 proto-repl 1.4.14 proto-repl-charts 0.4.0 proto-repl-sayid 0.1.4

BTW I just deleted them all and problem appears even on fresh Atom installation with just proto-repl package installed.

Dzięki, Amiran

aaimnr commented 7 years ago

Just got the very same error on a fresh install of Atom on a Mac, completely different box/system. It's either something very specific to both these machines (unlikely, but who knows) or something that everyone should get now with the current Atom build.

[Enter steps to reproduce:]

  1. install atom
  2. install proto-repl
  3. open any clj file
  4. hit cmd-opt-L
  5. enjoy the error

Atom: 1.14.2 x64 Electron: 1.3.13 OS: Mac OS X 10.12.2 Thrown From: proto-repl package 1.4.14

Stack Trace

Uncaught TypeError: Cannot read property 'row' of undefined

At /private/var/folders/86/hjttfgmx6zxctl4n9cvtlg4m0000gp/T/AppTranslocation/7C69ABCE-0B6F-49CA-B89B-21EF2D369E68/d/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:824

TypeError: Cannot read property 'row' of undefined
    at Function.module.exports.Point.fromObject (/app.asar/node_modules/text-buffer/lib/point.js:30:23)
    at Point.module.exports.Point.traverse (/app.asar/node_modules/text-buffer/lib/point.js:115:21)
    at TextBuffer.textEditor.buffer.applyChange (/packages/proto-repl/lib/views/repl-text-editor.coffee:156:38)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:557:19)
    at /app.asar/node_modules/text-buffer/lib/text-buffer.js:538:26
    at TextBuffer.module.exports.TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:819:18)
    at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:536:21)
    at TextBuffer.module.exports.TextBuffer.insert (/app.asar/node_modules/text-buffer/lib/text-buffer.js:561:19)
    at /packages/proto-repl/lib/views/repl-text-editor.coffee:217:47
    at ReplTextEditor.module.exports.ReplTextEditor.modifyTextWith (/packages/proto-repl/lib/views/repl-text-editor.coffee:99:5)
    at ReplTextEditor.module.exports.ReplTextEditor.appendText (/packages/proto-repl/lib/views/repl-text-editor.coffee:215:8)
    at ReplTextEditor.module.exports.ReplTextEditor.info (/packages/proto-repl/lib/views/repl-text-editor.coffee:223:6)
    at LocalReplProcess.module.exports.LocalReplProcess.start (/packages/proto-repl/lib/process/local-repl-process.coffee:101:15)
    at Repl.module.exports.Repl.startProcessIfNotRunning (/packages/proto-repl/lib/repl.coffee:103:16)
    at Object.toggle (/packages/proto-repl/lib/proto-repl.coffee:218:13)
    at /packages/proto-repl/lib/proto-repl.coffee:115:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -4:52.7.0 core:save-as (input.hidden-input)
     -2:11.8.0 application:open (input.hidden-input)
     -1:44.9.0 settings-view:open (input.hidden-input)
     -1:27.5.0 command-palette:toggle (input.hidden-input)
     -1:18.3.0 editor:consolidate-selections (input.hidden-input)
     -1:18.3.0 core:cancel (input.hidden-input)
  2x -1:17.4.0 proto-repl:toggle (input.hidden-input)
     -0:42.9.0 core:backspace (input.hidden-input)
     -0:32.6.0 core:save-as (input.hidden-input)
     -0:10.4.0 proto-repl:toggle (input.hidden-input)

Non-Core Packages

proto-repl 1.4.14 
jasongilman commented 7 years ago

I was using Proto REPL with the latest version of Atom and didn't see this. What were you doing to see this issue?

Sent from my phone

On Feb 15, 2017, at 10:23 AM, aaimnr notifications@github.com wrote:

Just got the very same error on a fresh install of Atom on Mac, completely different system.

[Enter steps to reproduce:]

... ... Atom: 1.14.2 x64 Electron: 1.3.13 OS: Mac OS X 10.12.2 Thrown From: proto-repl package 1.4.14

Stack Trace

Uncaught TypeError: Cannot read property 'row' of undefined

At /private/var/folders/86/hjttfgmx6zxctl4n9cvtlg4m0000gp/T/AppTranslocation/7C69ABCE-0B6F-49CA-B89B-21EF2D369E68/d/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:824

TypeError: Cannot read property 'row' of undefined at Function.module.exports.Point.fromObject (/app.asar/node_modules/text-buffer/lib/point.js:30:23) at Point.module.exports.Point.traverse (/app.asar/node_modules/text-buffer/lib/point.js:115:21) at TextBuffer.textEditor.buffer.applyChange (/packages/proto-repl/lib/views/repl-text-editor.coffee:156:38) at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:557:19) at /app.asar/node_modules/text-buffer/lib/text-buffer.js:538:26 at TextBuffer.module.exports.TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:819:18) at TextBuffer.module.exports.TextBuffer.setTextInRange (/app.asar/node_modules/text-buffer/lib/text-buffer.js:536:21) at TextBuffer.module.exports.TextBuffer.insert (/app.asar/node_modules/text-buffer/lib/text-buffer.js:561:19) at /packages/proto-repl/lib/views/repl-text-editor.coffee:217:47 at ReplTextEditor.module.exports.ReplTextEditor.modifyTextWith (/packages/proto-repl/lib/views/repl-text-editor.coffee:99:5) at ReplTextEditor.module.exports.ReplTextEditor.appendText (/packages/proto-repl/lib/views/repl-text-editor.coffee:215:8) at ReplTextEditor.module.exports.ReplTextEditor.info (/packages/proto-repl/lib/views/repl-text-editor.coffee:223:6) at LocalReplProcess.module.exports.LocalReplProcess.start (/packages/proto-repl/lib/process/local-repl-process.coffee:101:15) at Repl.module.exports.Repl.startProcessIfNotRunning (/packages/proto-repl/lib/repl.coffee:103:16) at Object.toggle (/packages/proto-repl/lib/proto-repl.coffee:218:13) at /packages/proto-repl/lib/proto-repl.coffee:115:32) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29) at /app.asar/src/command-registry.js:3:59 at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22) at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36) at /app.asar/src/window-event-handler.js:3:59) Commands

 -4:52.7.0 core:save-as (input.hidden-input)
 -2:11.8.0 application:open (input.hidden-input)
 -1:44.9.0 settings-view:open (input.hidden-input)
 -1:27.5.0 command-palette:toggle (input.hidden-input)
 -1:18.3.0 editor:consolidate-selections (input.hidden-input)
 -1:18.3.0 core:cancel (input.hidden-input)

2x -1:17.4.0 proto-repl:toggle (input.hidden-input) -0:42.9.0 core:backspace (input.hidden-input) -0:32.6.0 core:save-as (input.hidden-input) -0:10.4.0 proto-repl:toggle (input.hidden-input) Non-Core Packages

proto-repl 1.4.14 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

pmyszka commented 7 years ago

@aaimnr I had the same thing on a fresh install. It worked once I installed ink.

aaimnr commented 7 years ago

@jasongilman I didn't do anything, it crashes on clean Atom install, but as @pmyszka suggested I've just installed Ink and it works now, thanks! So it must be relying on some specific accidental conditions caused by some other packages (I'd assume it's not just Ink, probably something more popular as well).

pedro-w commented 7 years ago

I think that here, there is no newExtent field in the change object; this was removed recently, in this commit.

Hope that helps?

jelmerderonde commented 7 years ago

I also have this error, it started after I upgraded the proto-repl package to its newest version. Is there anything I can do to help diagnose / fix?

pedro-w commented 7 years ago

I've suggested a fix that works for me. The other option is just to make Ink a compulsory dependency. If you have Ink installed and want to reproduce the error you can uncheck the 'Ink Console' option in Settings, then start a REPL.

iteration0zero commented 7 years ago

Just had the same problem, installed the Atom Ink package and the problem was gone.

System: MacOS 10.12.3 Atom 1.14.2

Installed packages: Parinfer 1.17.0 ink 0.6.3 proto-repl 1.4.14

pedro-w commented 7 years ago

I've noticed this error coming back (Atom 1.17/P-R 1.4.20/Ink 0.6.5), only when the Ink console is disabled in the Proto-repl settings. Anyone else seen this? I've not used Atom for a while so may be I've got some stale old code loaded.

jreighley commented 7 years ago

Yes, I seem to be getting this error all of the time now - /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:854

Doesn't seem to matter which project I open, if try to start the repl, I get the uncaught type error on "row" Happens with the Ink console on or off.

Atom 1.17.0 x65Ink 0.6.5 Protorepl 1.4.20 On macbook.

pedro-w commented 7 years ago

Looks like atom has changed the parameters for that function again (commit). It's an internal function, not part of the API so this can happen. I think I can patch it again, but I'd like to know if there is a 'correct' way to do whatever this code does, only using public functions.

mrkaspa commented 7 years ago

@pedro-w I solved this by installing the ink package in atom

pedro-w commented 7 years ago

@mrkaspa That's right; proto-repl has some fallback code to show a repl even if ink isn't installed and that's where the bug is.

timgilbert commented 7 years ago

FWIW, I was also experiencing this error in Atom 1.17.2 / proto-repl 1.4.20, but installing Ink caused it to go away for me as well.

ryanolsonx commented 7 years ago

I'm still experiencing this with proto-repl AND ink installed on Windows with atom 1.18.0 and proto-repl 1.4.21.

turbopape commented 7 years ago

That was fixed for me using by installing the ink package - atom 1.18.0 on mac osx and proto-repl 1.4.21

fmnoise commented 7 years ago

it doesn't work if Ink Console option is turned off, any thoughts how to fight that?

pedro-w commented 7 years ago

My thoughts are:

The only problem is that I can't explain @ryanolsonx 's report; if he has Ink, it ought to work. Whichever option is up to @jasongilman to decide, of course.

fmnoise commented 7 years ago

I prefer non-Ink console as it looks quite better, so I'd consider fixing it rather than making Ink a compulsory dependency. Let me know if I can help with it.

jasongilman commented 7 years ago

This appears to be a problem again. Reopening this issue.

crankyadmin commented 7 years ago

I came up against this error again this morning, installing Ink 0.7.4 solves it.

tsokkonen commented 7 years ago

On a fresh install of atom, and all the plugins set up as instructed in the "opinionated" guide, this error is produced with Ink version 0.7.6. Downgrading to 0.7.4 does not help. I wanted to give the proto-repl-demo a try, but seem unable to do so.

Thingographist commented 6 years ago

just replace https://github.com/jasongilman/proto-repl/blob/ed2f7006b6e73f7bc12152df9fff3853861a6a86/lib/views/repl-text-editor.coffee#L158 with

oldRange: Range(start, start.traverse(oldExtent || start))
turbopape commented 6 years ago

That fixed the problem thank you!

2017-10-07 22:00 GMT+01:00 Thingographist notifications@github.com:

just replace https://github.com/jasongilman/proto-repl/blob/ ed2f7006b6e73f7bc12152df9fff3853861a6a86/lib/views/repl- text-editor.coffee#L158 with

oldRange: Range(start, start.traverse(oldExtent || start))

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jasongilman/proto-repl/issues/229#issuecomment-334965380, or mute the thread https://github.com/notifications/unsubscribe-auth/ACpoHwta5r3NmeixD9XhlVmdchIsOBkSks5sp-ZYgaJpZM4L8Xsx .

--

[image: --]

Rafik Naccache [image: https://]about.me/rafik_naccache https://about.me/rafik_naccache?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links