Since I’m using Mark’s tools, I figure I may as well steal his blog title scheme…
I had a customer come to me with a question on Standard User Analyzer (SUA), looking for an explanation for why it was coming back with the following error:
Failed to load log file C:\Users\…\AppData\Local\Temp\sua
No (valid) log file is found.
I asked him to try opening it up in Application Verifier, which he was able to do successfully.
So, now we knew that the problem was somewhere between collecting the data and displaying it – we’d narrowed down the surface area rather significantly. What happens in that time? Well, SUA is kind enough to tell you. First, it clears existing logs:
Executing: cmd.exe /c "del /q "C:\Users\…\AppData\Local\Temp\sua""
Returned : 0
Then, we export the logs we just created:
Executing: "C:\Program Files (x86)\Microsoft Application Compatibility Toolkit 5\Standard User Analyzer\SUAnalyzerSrv.exe" exportlogs "C:\Users\…\AppData\Local\Temp\sua" "(symbol file directory)"
Returned : 0
Finally, we view it, but this was the step which was failing. We could browse to the temp directory it was using and discover that it was, indeed, clear, so now we know that the command to export logs was our most likely suspect. But it was returning 0, which presumably meant success, so we had very little to go on.
Fortunately, I was able to find a repro relatively quickly. And, when in doubt, use Process Monitor.
I didn’t even have to go any further than the process tree. I found the call to SUAnalyzerSrv.exe, and it made a call to appverif.exe – Application Verifier. Here was the arguments it was passing:
appverif.exe -export log -for AppVerifier Bug Generator.exe -with To=C:\Users\…\AppData\Local\Temp\sua\AppVerifier Bug Generator.exe.0.xml Log=0 Symbols=(symbol file directory)
It’s when you see this that you probably notice something: the name of the binary … has a space in it.
I renamed the binary to remove the spaces, and it worked. No problems importing. So, I filed a bug against SUA, and it’s going to be fixed for the next release. In the interim, if SUA isn’t working as well as you’d like, well, the EXTREMELY hacky workaround may be to rename the binary…