Skip to content
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

Stuck after analyzing all files #27

Closed
mshukla19 opened this issue Jun 12, 2015 · 3 comments
Closed

Stuck after analyzing all files #27

mshukla19 opened this issue Jun 12, 2015 · 3 comments

Comments

@mshukla19
Copy link

When i run infer with ./gradlew build and debug options , it analyses all my java files and then gets stuck. nothing happens after that. if i manually terminate using ctrl+c , then i see infer out directory is generated and captured folder has all the java files in it, but reports.json is missing.

@martinoluca
Copy link
Contributor

Hello @mshukla19, could you please provide more context where possible, e.g. output of Infer, screenshots.
This will give us the possibility to further investigate the root cause of this issue.

Thanks!

@mshukla19
Copy link
Author

yeah for sure, i am attaching screenshot of the initial command and the point where terminal gets stuck. I am running this on an android project (built using android studio with lintoptions set to false).
screen shot 2015-06-12 at 2 34 35 pm
screen shot 2015-06-12 at 2 47 16 pm

i have also tried running infer without incremental option also but still the same result.
After pressing ctrl+c (10 mins) it returned me this -
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/infer", line 142, in
main()
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/infer", line 119, in main
capture_exitcode = imported_module.gen_instance(args, cmd).capture()
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/../lib/capture/gradle.py", line 42, in capture
return util.run_commands(cmds)
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/../lib/capture/util.py", line 34, in run_commands
if not cmd.start():
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/inferlib.py", line 632, in start
if self.capture() == os.EX_OK:
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/inferlib.py", line 400, in capture
return self.run_infer_frontend()
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/inferlib.py", line 391, in run_infer_frontend
self.args.analyzer
File "/Users/manas/Downloads/infer-osx-v0.1.0/infer/infer/bin/inferlib.py", line 309, in run_command
return subprocess.check_call(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(_popenargs, *_kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(_popenargs, *_kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1375, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
return func(*args)
KeyboardInterrupt

@martinoluca
Copy link
Contributor

Thanks for posting the screenshots!
I see from your command line that you are running Infer using the --debug option.
--debug is telling Infer to emit extra internal information during the analysis and this will make it slower than usual.
If you're interested on the internals of Infer and you want to look at the translation information generated during the analysis, then there's nothing wrong with your analysis instance, you should just wait for the analysis to finish (it may take some time, depending on the size of your codebase).

In case you're just interested in what bugs Infer finds on your code, then you should just remove the --debug option and let the analysis run.

Make sure you ./gradlew clean before running it again, to make sure Infer captures all the compilation commands.

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

No branches or pull requests

2 participants