I am using scan-view command to view the results generated by scan-build. Yesterday, I was able to navigate through individual files to analyse the warnings raised in them but now it shows the following error.
Error response
Error code 404.
Message: File not found.
Error code explanation: 404 = Nothing matches the given URI.
scan-build by default writes its output to a temporary folder
why you haven't been able to access the files at a later time.
In order to keep the files and save them to a another path,
you can specify the output location with '-o' (see scan-build
-h for more details).
I have an additional query.
After scan-build completes, it says, Run ‘scan-view /Users/malharthakkar/Desktop/scan-build-isl/2017-05-30-161222-546-1’ to examine bug reports.
When I run the above command, it somehow opens the results which I obtained 4 days ago (look at the dates in the browser window and the terminal in the attached screenshot). Any idea why that is happening?
Also, when I ran scan-build along with -o, only a few files were compiled and analyzed, not the entire codebase (How do I build the entire codebase?).
Actually, I am trying to build the ISL codebase with scan-build using the following command.
Did you clean the built project before running scan-build again? Since scan-build interposes on calls to the compiler, if the build system doesn’t build a source file then scan-build won’t see it. This is a common pitfall — we should really mention this in the documentation for scan-build!
Thank you Dr. Devin. That really helped clarify my query regarding scan-build.
But, I still don’t understand why scan-view shows older results even after specifying the correct directory.
Like mentioned in my previous email, scan-view /Users/malharthakkar/Desktop/scan-build-isl/2017-05-30-161222-546-1 opens a directory which was created on 26th of May when it should’ve opened the one created today (i.e., 30th of May).
This seems mysterious and i couldn't immediately reproduce it. Could you check that the port you're connecting to with your browser (eg. http://127.0.0.1:8181) matches the port scan-view dumps on the command line (eg.
$ scan-view /tmp/scan-build-2017-05-31-155455-89354-1
Starting scan-view at: http://127.0.0.1:8181
Use Ctrl-C to exit.
)?
If nothing helps, i'd probably suggest, as a workaround, that you can open index.html from the results directory directly into your browser and it'd be the same thing just without an intermediate web server running on your machine.
This seems mysterious and i couldn't immediately reproduce it.
Could you check that the port you're connecting to with your
browser (eg. http://127.0.0.1:8181) matches the port scan-view
dumps on the command line (eg.
$ scan-view /tmp/scan-build-2017-05-31-155455-89354-1
Starting scan-view at: http://127.0.0.1:8181
Use Ctrl-C to exit.
)?
It is evident from the screenshot that I sent in one of my previous emails that both the ports (seen in the browser and the command line) are the same.