New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Command failed: clang-format -style=file -cursor=97 -lines=4:11 -assume-filename=... #34

Closed
k4rtik opened this Issue Jul 17, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@k4rtik

k4rtik commented Jul 17, 2015

[Enter steps to reproduce below:]

Refactoring C++ code sometimes causes this. My main complaint about the issue is that, I end up in a situation that I can't save the file being currently edited.

Atom Version: 1.0.2
System: Mac OS X 10.10.4
Thrown From: clang-format package, v1.14.0

Stack Trace

Uncaught Error: Command failed: clang-format -style=file -cursor=97 -lines=4:11 -assume-filename=/Users/k4rtik/Projects/test_driven_cpp/src/factors/factors.cpp

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:774

Error: Command failed: clang-format -style=file -cursor=97 -lines=4:11 -assume-filename=/Users/k4rtik/Projects/test_driven_cpp/src/factors/factors.cpp
    at checkExecSyncError (child_process.js:1334:13)
    at execSync (child_process.js:1374:13)
    at ClangFormat.module.exports.ClangFormat.format (/Users/k4rtik/.atom/packages/clang-format/lib/clang-format.coffee:84:16)
    at /Users/k4rtik/.atom/packages/clang-format/lib/clang-format.coffee:40:28
    at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:740:18)
    at /Users/k4rtik/.atom/packages/clang-format/lib/clang-format.coffee:39:27
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:985:20)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:978:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:579:26)

Commands

     -0:28.3.0 editor:select-to-first-character-of-line (atom-text-editor.editor.is-focused)
  2x -0:27.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:27.2.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:24.6.0 core:save (atom-text-editor.editor.is-focused)
  7x -0:14 core:move-up (atom-text-editor.editor.is-focused)
     -0:11.9.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:11.3.0 core:move-up (atom-text-editor.editor.is-focused)
 17x -0:10.8.0 core:move-down (atom-text-editor.editor.is-focused)
  7x -0:08.4.0 core:move-up (atom-text-editor.editor.is-focused)
  5x -0:07.5.0 core:move-down (atom-text-editor.editor.is-focused)
  2x -0:06.7.0 core:move-up (atom-text-editor.editor.is-focused)
     -0:05.0 core:move-down (atom-text-editor.editor.is-focused)
  7x -0:04.3.0 core:select-up (atom-text-editor.editor.is-focused)
     -0:02.8.0 editor:select-to-first-character-of-line (atom-text-editor.editor.is-focused)
     -0:01.8.0 editor:auto-indent (atom-text-editor.editor.is-focused)
     -0:00.9.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "projectHome": "/Users/k4rtik/Projects"
  }
}

Installed Packages

# User
autocomplete-clang, v0.8.7
clang-format, v1.14.0
language-elixir, v0.5.1
linter-clang, v2.26.2
minimap, v4.12.0
pigments, v0.8.4

# Dev
No dev packages
@k4rtik

This comment has been minimized.

Show comment
Hide comment
@k4rtik

k4rtik Jul 17, 2015

Probably related to #29

k4rtik commented Jul 17, 2015

Probably related to #29

@LiquidHelium

This comment has been minimized.

Show comment
Hide comment
@LiquidHelium

LiquidHelium Jul 19, 2015

Owner

Sometimes causes this? So it works some of the time fine? Is there any pattern you can see as to when it happens?

Owner

LiquidHelium commented Jul 19, 2015

Sometimes causes this? So it works some of the time fine? Is there any pattern you can see as to when it happens?

@k4rtik

This comment has been minimized.

Show comment
Hide comment
@k4rtik

k4rtik Jul 19, 2015

I had disabled the package as I couldn't even save my code after this issue shows up. Will enable again and try to find a pattern.

But since a critical function such as Saving a file is blocked because of an uncaught error, shouldn't we be doing a generic catch to let the file get saved somehow? (I am not a JS programmer, just trying to connect pieces here)

k4rtik commented Jul 19, 2015

I had disabled the package as I couldn't even save my code after this issue shows up. Will enable again and try to find a pattern.

But since a critical function such as Saving a file is blocked because of an uncaught error, shouldn't we be doing a generic catch to let the file get saved somehow? (I am not a JS programmer, just trying to connect pieces here)

@LiquidHelium

This comment has been minimized.

Show comment
Hide comment
@LiquidHelium

LiquidHelium Aug 1, 2015

Owner

Possibly fixed by 1fa50c4

Owner

LiquidHelium commented Aug 1, 2015

Possibly fixed by 1fa50c4

@k4rtik

This comment has been minimized.

Show comment
Hide comment
@k4rtik

k4rtik Aug 1, 2015

Thanks, I will report back if I see the issue again. Please feel free to close if I don't get back in a week.

k4rtik commented Aug 1, 2015

Thanks, I will report back if I see the issue again. Please feel free to close if I don't get back in a week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment