azizur / atom-wordpress-api

WordPress API support for Atom (https://atom.io/)
21 stars 4 forks source link

Plugin crash #12

Closed ScrambledBits closed 8 years ago

ScrambledBits commented 9 years ago

[Enter steps to reproduce below:]

  1. Open Atom
  2. Change language syntax to Wordpress

Atom Version: 1.0.19 System: Microsoft Windows 10 Pro Insider Preview Thrown From: Atom Core

Stack Trace

Uncaught Error: end pattern with unmatched parenthesis

At C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:31

Error: end pattern with unmatched parenthesis
  at Error (native)
  at Scanner.module.exports.Scanner.createScanner (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:31:24)
  at Scanner.module.exports.Scanner.getScanner (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:37:31)
  at Scanner.module.exports.Scanner.findNextMatch (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:56:22)
  at Rule.module.exports.Rule.findNextMatch (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\rule.js:99:28)
  at Rule.module.exports.Rule.getNextTags (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\rule.js:141:21)
  at Grammar.module.exports.Grammar.tokenizeLine (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\grammar.js:150:44)
  at TokenizedBuffer.module.exports.TokenizedBuffer.buildTokenizedLineForRowWithText (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:557:28)
  at TokenizedBuffer.module.exports.TokenizedBuffer.buildTokenizedLineForRow (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:543:19)
  at TokenizedBuffer.module.exports.TokenizedBuffer.tokenizeNextChunk (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:294:43)
  at C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:271:26
  at C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\underscore-plus\node_modules\underscore\underscore.js:666:47

Commands

 13x -0:50.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:48.5.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:45.7.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:45.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:45.1.0 snippets:available (atom-text-editor.editor)
     -0:42.2.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:42.2.0 core:cancel (atom-text-editor.editor.mini.is-focused)
  2x -0:40.5.0 wp-snippets:toggle (atom-text-editor.editor.is-focused)
     -0:38.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  5x -0:34.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:30.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:30.7.0 application:open-your-snippets (atom-text-editor.editor)
 24x -0:27.8.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:20.3.0 core:close (atom-text-editor.editor.is-focused)
     -0:17.7.0 grammar-selector:show (atom-text-editor.editor.is-focused)
     -0:16.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "steam-pirate-ui",
      "one-dark-syntax"
    ]
  },
  "editor": {
    "invisibles": {}
  }
}

Installed Packages

# User
api-docs, v0.0.3
atom-wordpress, v0.3.0
color-picker, v2.0.12
emmet, v2.3.12
express-complete, v0.2.0
language-nginx, v0.6.0
minimap, v4.13.4
node-debugger, v1.1.8
nodejs-snippets, v1.0.2
remote-edit, v1.8.21
SFTP-deployment, v1.0.2
steam-pirate-ui, v0.6.1
wordpress, v0.2.0
wordpress-api, v1.2.1
wp-snippets, v0.2.10

# Dev
No dev packages
azizur commented 9 years ago

Could you try disabling other wordpress packages?

ScrambledBits commented 9 years ago

It still shows the error, pasting error report:

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.19 System: Microsoft Windows 10 Pro Insider Preview Thrown From: Atom Core

Stack Trace

Uncaught Error: end pattern with unmatched parenthesis

At C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:31

Error: end pattern with unmatched parenthesis
  at Error (native)
  at Scanner.module.exports.Scanner.createScanner (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:31:24)
  at Scanner.module.exports.Scanner.getScanner (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:37:31)
  at Scanner.module.exports.Scanner.findNextMatch (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\scanner.js:56:22)
  at Rule.module.exports.Rule.findNextMatch (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\rule.js:99:28)
  at Rule.module.exports.Rule.getNextTags (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\rule.js:141:21)
  at Grammar.module.exports.Grammar.tokenizeLine (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\first-mate\lib\grammar.js:150:44)
  at TokenizedBuffer.module.exports.TokenizedBuffer.buildTokenizedLineForRowWithText (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:557:28)
  at TokenizedBuffer.module.exports.TokenizedBuffer.buildTokenizedLineForRow (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:543:19)
  at TokenizedBuffer.module.exports.TokenizedBuffer.tokenizeNextChunk (C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:294:43)
  at C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\src\tokenized-buffer.js:271:26
  at C:\Users\emili\AppData\Local\atom\app-1.0.19\resources\app.asar\node_modules\underscore-plus\node_modules\underscore\underscore.js:666:47

Commands

     -1:13.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  7x -1:07.8.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:06.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:06.3.0 settings-view:view-installed-packages (atom-text-editor.editor)
     -0:24.9.0 grammar-selector:show (atom-text-editor.editor.is-focused)
     -0:22.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "steam-pirate-ui",
      "one-dark-syntax"
    ],
    "disabledPackages": [
      "wordpress",
      "atom-wordpress"
    ]
  },
  "editor": {
    "invisibles": {}
  }
}

Installed Packages

# User
api-docs, v0.0.3
color-picker, v2.0.12
emmet, v2.3.12
express-complete, v0.2.0
language-nginx, v0.6.0
minimap, v4.13.4
node-debugger, v1.1.8
nodejs-snippets, v1.0.2
remote-edit, v1.8.21
steam-pirate-ui, v0.6.1
wordpress-api, v1.2.1

# Dev
No dev packages
forivall commented 8 years ago

I made a quick and dirty validation checker, and it seems that your grammar file has an invalid regex.

> npm i -g seaworthy
> seaworthy grammars/wordpress.cson 

source.function.wordpress.php: (?i)bdo_(shortcode|action)(?=s*()
end pattern with unmatched parenthesis
azizur commented 8 years ago

@forivall thank you for spotting this. I'll update it now.