Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Uncaught TypeError: Cannot read property 'names' of undefined #274

Closed PC888 closed 8 years ago

PC888 commented 8 years ago

[Enter steps to reproduce below:]

  1. ...Open a new blank file(untitled) and set it as PHP
  2. ...Line1 - Type <?p -->Error before you can finish typing php.
  3. ...If you save the file as filename.php before entering any code --> No error
  4. ...If you have an existing PHP file open in another tab when you create a new blank file and set it as PHP --> No error

Atom Version: 1.8.0 System: Mac OS X 10.11.5 Thrown From: atom-autocomplete-php package, v0.18.9

Stack Trace

Uncaught TypeError: Cannot read property 'names' of undefined

At /Users/paulcarter/.atom/packages/atom-autocomplete-php/lib/autocompletion/function-provider.coffee:27

TypeError: Cannot read property 'names' of undefined
    at FunctionProvider.module.exports.FunctionProvider.fetchSuggestions (/Users/paulcarter/.atom/packages/atom-autocomplete-php/lib/autocompletion/function-provider.coffee:27:23)
    at FunctionProvider.module.exports.AbstractProvider.getSuggestions (/Users/paulcarter/.atom/packages/atom-autocomplete-php/lib/autocompletion/abstract-provider.coffee:30:17)
    at /Users/paulcarter/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:310:56
    at Array.forEach (native)
    at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/Users/paulcarter/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:289:17)
    at AutocompleteManager.getSuggestionsFromProviders (/Users/paulcarter/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
    at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/Users/paulcarter/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:276:19)
    at /Users/paulcarter/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61

Commands

     -0:16.2.0 editor:newline (atom-text-editor.editor.is-focused)
  6x -0:13.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:09.7.0 grammar-selector:show (atom-text-editor.editor)

Config

{
  "core": {
    "disabledPackages": [
      "markdown-preview"
    ],
    "themes": [
      "seti-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-autocomplete-php, v0.18.9
autocomplete-wordpress-hooks, v0.2.0
file-type-icons, v1.3.0
highlight-line, v0.11.1
highlight-selected, v0.11.2
less-than-slash, v0.13.0
markdown-preview-plus, v2.4.0
open-recent, v5.0.0
project-manager, v2.9.7
seti-ui, v1.3.1
tabs-to-spaces, v1.0.2
wordpress-api, v1.2.2

# Dev
No dev packages
Peekmo commented 8 years ago

Hi, I didn't reproduced it.

It seems to be a really specific use case, I keep this issue opens, if someone with the problem can investigate, it's fine 👍

pabit commented 8 years ago

i confirm that...

System: Linux Ubuntu 16.04

Installed packages:

atom-autocomplete-php, v0.18.9 autocomplete-api wordpress-hooks, v0.2.0 php-cs-fixer v2.5.9 php-integrator-tooltips-master v1.0.3 qolor v0.2.4

zrzut ekranu z 2016-09-06 20-58-01

PC888 commented 8 years ago

Yeah still happening here too.

Peekmo commented 8 years ago

Thank you, thanks to the screenshot I reproduced it.

Should be fixed in last release.