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

Error: Process exited with no output, code: 0 #96

Closed
jonstaryuk opened this issue May 27, 2016 · 16 comments
Closed

Error: Process exited with no output, code: 0 #96

jonstaryuk opened this issue May 27, 2016 · 16 comments
Assignees

Comments

@jonstaryuk
Copy link

Starting from v1.9.2, I get this error when javac exits with no errors/warnings. (If javac warns about something, the linter still works correctly.) I looked at sb-exec and the base linter package but couldn't figure out where exactly the problem came from...

Error: Process exited with no output, code: 0
    at ChildProcess.<anonymous> (/Users/jonathan/.atom/packages/linter-javac/node_modules/atom-linter/node_modules/sb-exec/lib/index.js:51:20)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
@florianb
Copy link
Contributor

Thanks for reporting @jonstaryuk - i will investigate this issue. Sorry for the inconveniences.

@florianb florianb added the bug label May 27, 2016
@florianb florianb self-assigned this May 27, 2016
@florianb
Copy link
Contributor

@jonstaryuk i couldn't find a general reason for that issue. It seems like your javac-call doesn't return anything, but i don't know why. It would be helpful if you could run the lint with "Verbose Logging" set to true until the issue appears (please remind to turn it off afterwards) and copy & paste the console output (Window: Toggle Dev Tools) here.

I am assuming you're using Java 1.7/.8?

However - it seems we have currently a general issue in the package, too. I guess i will rewrite it the next week. 😩

@jonstaryuk
Copy link
Author

jonstaryuk commented May 27, 2016

Yes, javac version 1.8.0_65.

Manually running javac -Xlint:all *.java produces no output if there are no problems with the code. Is that behavior not normal?

Logs on Atom launch:

linter-javac: requiring modules finished.
linter-javac: providing linter, examining javac-callability.

Lint with no errors/warnings (throws error):

linter-javac: starting to lint.
linter-javac: start searching java-files with " /Users/jonathan/Code/class/cpe103/lab9 " as search-directory.
linter-javac: collected the following arguments: -Xlint:all
linter-javac: adding 2 files to the javac-arguments (from " /Users/jonathan/Code/class/cpe103/lab9/DirectedGraph.java " to " /Users/jonathan/Code/class/cpe103/lab9/DirectedGraphDriver.java ").
linter-javac: calling javac with 5 arguments by invoking " javac ". The approximated command length is 138 characters long, the last argument is: /Users/jonathan/Code/class/cpe103/lab9/DirectedGraphDriver.java

Lint with errors/warnings (works correctly):

linter-javac: starting to lint.
linter-javac: start searching java-files with " /Users/jonathan/Code/class/cpe103/lab9 " as search-directory.
linter-javac: collected the following arguments: -Xlint:all
linter-javac: adding 2 files to the javac-arguments (from " /Users/jonathan/Code/class/cpe103/lab9/DirectedGraph.java " to " /Users/jonathan/Code/class/cpe103/lab9/DirectedGraphDriver.java ").
linter-javac: calling javac with 3 arguments by invoking " javac ". The approximated command length is 132 characters long, the last argument is: /Users/jonathan/Code/class/cpe103/lab9/DirectedGraphDriver.java
linter-javac: parsing:
 /Users/jonathan/Code/class/cpe103/lab9/DirectedGraphDriver.java:23: error: incompatible types: int cannot be converted to String
          graph.addEdge(v1, v2);
                            ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
linter-javac: detecting languages
linter-javac: detected the following language-code: en
linter-javac: returning 1 linter-messages.

(oops, didn't mean to click close)

@florianb
Copy link
Contributor

florianb commented Jun 1, 2016

No worries 😄 -- thanks for the detailed response!

Okay as far as i understood the issue this seems to belong to the fact that this package expect javac to respond to stderr. And the exception is thrown because stderr didn't contain anything.

Since javac behaves that way (so this is normal) i need to find out why your javac-call complains about the missing stderr-output and mine not.

@50Wliu
Copy link

50Wliu commented Jun 2, 2016

I can confirm this on two different Windows computers - one running Atom 1.9.0-dev-d71f6e5/Windows 10 and the other Atom 1.7.4/Windows 7. Both are using linter-javac 1.9.3, though like @jonstaryuk said this exception started happening around 1.9.0 or so. The 1.9.0-dev laptop is using Java 1.8.0_92 while the 1.7.4 one is using Java 6 or 7 (not too sure; I can check tomorrow).

Happy to provide any other information and debug if necessary!

@florianb
Copy link
Contributor

florianb commented Jun 2, 2016

@50Wliu thank you very much - it seems like this is a Windows-related bug. I guess i need to set AppVeyor up. I will need some more time - please be patient. :)

@jskenney
Copy link

jskenney commented Jun 3, 2016

@florianb I am having the same issue with ubuntu 16.04 and java version "1.8.0_91"

@florianb
Copy link
Contributor

florianb commented Jun 3, 2016

@jskenney - thanks a lot, these are bad news. Since it seems there are several people affected, i will try to release a hotfix. 🐞

@Arcanemagus
Copy link
Member

FYI @florianb this should be as simple as setting the allowEmptyStderr flag to true on the exec() options (and making sure the code doesn't blow up with an empty output 😛).

@florianb
Copy link
Contributor

florianb commented Jun 3, 2016

Thanks @Arcanemagus - i already thought about enabling allowEmptyStderr, but i currently can't test that behavior. I would prefer to know what's happening.

May it be that we all will face that issue as soon as steelbrain's exec is rolled out to everybody? I thought greenkeeper would also update the package-dependencies to the explicit latest versions.

florianb added a commit that referenced this issue Jun 3, 2016
- Add argument `allowEmptyStderr` to exec-command
- Add patch-description to changelog
@florianb
Copy link
Contributor

florianb commented Jun 3, 2016

@jonstaryuk, @50Wliu, @jskenney - i recently published a patch (1.9.4) which hopefully fixes that problem. Since i wasn't able to reproduce that error i would really appreciate if you could give me any feedback if that patch solved the issue for you!

Thanks in advance! 🍻

@Arcanemagus
Copy link
Member

Greenkeeper only checks dependencies of the project, leaving updating of sub-dependencies to them (and any necessary updates would then be handled by it).

@jskenney
Copy link

jskenney commented Jun 3, 2016

@florianb That appears to have fixed the issue for me, thanks for the quick fix!

@florianb
Copy link
Contributor

florianb commented Jun 4, 2016

@jskenney: these are good news! Happy coding.. :)

Am 04.06.2016 1:33 vorm. schrieb jskenney notifications@github.com:

@florianbhttps://github.com/florianb That appears to have fixed the issue for me, thanks for the quick fix!

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/96#issuecomment-223718586, or mute the threadhttps://github.com/notifications/unsubscribe/AA8B0wrDk0Iz0jho_oIp5bWD8yYbvTyrks5qILmrgaJpZM4IoHlT.

@jonstaryuk
Copy link
Author

1.9.4 fixed the issue for me on OS X 10.11.6. Thanks Florian!

@florianb
Copy link
Contributor

florianb commented Jun 6, 2016

This sounds great -- thanks to all involved! 👏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants