Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Uncaught TypeError: Cannot read property 'length' of null #9

Closed
silvernode opened this issue Nov 8, 2016 · 4 comments
Closed

Uncaught TypeError: Cannot read property 'length' of null #9

silvernode opened this issue Nov 8, 2016 · 4 comments

Comments

@silvernode
Copy link

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.11.2
Electron Version: 0.37.8
System: Debian GNU/Linux
Thrown From: crystal package, v0.2.0

Stack Trace

Uncaught TypeError: Cannot read property 'length' of null

At /home/mollusk/.atom/packages/crystal/lib/util/compiler.js:75

TypeError: Cannot read property 'length' of null
    at ChildProcess.<anonymous> (/home/mollusk/.atom/packages/crystal/lib/util/compiler.js:75:13)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:477:12)

Commands

     -1:20.4.0 core:backspace (atom-text-editor.editor.is-focused)
  6x -1:19.4.0 core:move-left (atom-text-editor.editor.is-focused)
     -1:17.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:16.7.0 core:move-down (atom-text-editor.editor.is-focused)
     -1:16.1.0 core:move-right (atom-text-editor.editor.is-focused)
     -1:15.8.0 core:move-left (atom-text-editor.editor.is-focused)
     -1:15.5.0 core:backspace (atom-text-editor.editor.is-focused)
  8x -1:14.4.0 core:move-right (atom-text-editor.editor.is-focused)
     -1:12.8.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -1:11.9.0 core:save (atom-text-editor.editor.is-focused)
     -0:51.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:48.2.0 core:save (atom-text-editor.editor.is-focused)
  2x -0:29.3.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -0:24.9.0 core:save (atom-text-editor.editor.is-focused)
  2x -0:06.3.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -0:03.4.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "telemetryConsent": "limited"
  }
}

Installed Packages

# User
crystal, v0.2.0 (active)
language-crystal-actual, v0.33.0 (active)
language-rust, v0.4.8 (active)
linter, v1.11.18 (active)
linter-rust, v0.7.0 (active)
minimap, v4.25.6 (active)
northem-dark-atom-syntax, v0.21.0 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.2.0 (inactive)
base16-tomorrow-light-theme, v1.2.0 (inactive)
one-dark-ui, v1.6.0 (active)
one-light-ui, v1.6.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.7.0 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.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.201.1 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.59.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v1.0.0 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2-hotfix1 (active)
snippets, v1.0.2 (active)
spell-check, v0.68.2 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.101.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.209.3 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages
@blazerw
Copy link
Contributor

blazerw commented Apr 28, 2017

Change line 75 of /.atom/packages/crystal/lib/util/compiler.js from:

if (match.length === 2) {

to

if (!match && match.length === 2) {

Only been testing for 1 minute, though.

@blazerw
Copy link
Contributor

blazerw commented Apr 28, 2017

PR: #14
Fork w/ fix: https://github.com/blazerw/atom-crystal

@keplersj keplersj closed this as completed May 5, 2017
@rustomax
Copy link

rustomax commented Jul 5, 2017

Still appears to be an issue. Gets thrown on occasion

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.12.5
Thrown From: crystal package 0.2.1

Stack Trace

Uncaught TypeError: Cannot read property 'length' of null

At /Users/<username>/.atom/packages/crystal/lib/util/compiler.js:75

TypeError: Cannot read property 'length' of null
    at /packages/crystal/lib/util/compiler.js:75:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Commands

  2x -2:48.6.0 core:move-right (input.hidden-input)
     -2:47.1.0 core:backspace (input.hidden-input)
 15x -2:45.9.0 core:move-right (input.hidden-input)
  3x -2:43 core:select-right (input.hidden-input)
     -2:41.8.0 core:backspace (input.hidden-input)
     -2:41.2.0 core:move-right (input.hidden-input)
     -2:40.4.0 core:move-up (input.hidden-input)
  5x -2:39.4.0 core:move-right (input.hidden-input)
  5x -2:38.3.0 core:select-right (input.hidden-input)
     -2:35.9.0 core:backspace (input.hidden-input)
     -2:34.5.0 autocomplete-plus:cancel (input.hidden-input)
     -2:34.2.0 core:move-down (input.hidden-input)
  5x -2:33.9.0 core:move-left (input.hidden-input)
 23x -2:33.1.0 core:select-right (input.hidden-input)
  2x -2:27.1.0 core:save (input.hidden-input)
  2x -0:08.8.0 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)

Non-Core Packages

atom-beautify 0.30.3 
atom-material-syntax 1.0.6 
autocomplete-elixir 1.5.14 
busy 0.7.0 
busy-signal 1.4.3 
crystal 0.2.1 
file-icons 2.1.8 
flatwhite-syntax 0.8.1 
intentions 1.1.2 
isotope-light-ui 2.2.7 
language-crystal-actual 0.35.0 
language-elixir 0.19.0 
language-rust 0.4.11 
linter 2.2.0 
linter-clang 4.1.1 
linter-elixirc 1.6.0 
linter-rust 0.8.0 
linter-ui-default 1.6.2 
nucleus-dark-ui 0.12.3 
platformio-ide-terminal 2.5.2 
racer 0.20.0 
rustfmt 0.1.3 
rustsym 0.3.1 
symbols-tree-view 0.14.0 

@phongdgm59
Copy link

phongdgm59 commented Aug 4, 2017

This error is always thrown.

[Enter steps to reproduce:]

Open any crystal file
OR
Save any crystal file

Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.12.6
Thrown From: crystal package 0.2.1

Stack Trace

Uncaught TypeError: Cannot read property 'length' of null

At /Users/tecphonik/.atom/packages/crystal/lib/util/compiler.js:75

TypeError: Cannot read property 'length' of null
    at /packages/crystal/lib/util/compiler.js:75:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Commands

  6x -2:48.1.0 core:select-up (input.hidden-input)
     -2:46.2.0 core:move-right (input.hidden-input)
     -2:45.6.0 editor:select-to-first-character-of-line (input.hidden-input)
  6x -2:45.4.0 core:select-up (input.hidden-input)
     -2:43.8.0 core:move-right (input.hidden-input)
     -2:43.4.0 editor:select-to-first-character-of-line (input.hidden-input)
  6x -2:43.1.0 core:select-up (input.hidden-input)
     -2:41.6.0 core:move-right (input.hidden-input)
     -1:30.8.0 editor:newline (input.hidden-input)
     -1:30.3.0 core:save (input.hidden-input)
     -1:25.7.0 editor:select-to-first-character-of-line (input.hidden-input)
  2x -1:25.4.0 core:backspace (input.hidden-input)
     -1:25 core:save (input.hidden-input)
     -1:23.8.0 editor:consolidate-selections (input.hidden-input)
     -1:23.8.0 core:cancel (input.hidden-input)
     -1:18.2.0 core:save (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.4 
auto-detect-indentation 1.3.0 
busy-signal 1.4.3 
crystal 0.2.1 
crystal-block 0.4.0 
crystal-tools 0.3.0 
emmet 2.4.3 
git-diff-details 1.4.0 
highlight-selected 0.13.1 
intentions 1.1.5 
itg-dark-syntax 2.0.0 
itg-flat-dark 0.3.0 
javascript-snippets 1.2.1 
language-crystal-actual 0.35.0 
linter 2.2.0 
linter-rubocop 2.1.1 
linter-ui-default 1.6.3 
minimap 4.29.3 
minimap-highlight-selected 4.6.1 
mukluk-syntax 0.4.0 
predawn-syntax 1.0.4 
razor-atom-syntax-theme 2.2.3 
save-session 0.15.7 
seti-syntax 1.1.3 
seti-ui 1.9.0 
spacegray-black-syntax 0.1.4 
spacegray-dark-syntax 0.2.0 
spacegray-dark-ui 0.13.0 
spacegray-mocha-ui 2.0.0 
spacegray-monokai-ui 2.0.0 
spacegray-peacock-ui 1.0.0 
tree-view-open-files 0.3.0 
vibrant-ink 1.0.1 

@faustinoaq faustinoaq added this to Done in Crystal Tools Apr 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Crystal Tools
  
Done
Development

No branches or pull requests

5 participants