Systrace输出错误 [英] Systrace Output Error

查看:533
本文介绍了Systrace输出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在android studio项目上运行systrace以便发现一些性能错误,但是在跟踪过程结束后,出现以下错误,并且如果我在chrome中打开trace.html输出文件,则跟踪视图为空:

I ran systrace on my android studio project in order to find some performance bugs but after the end of the tracing process, i get the following error and if i open the trace.html output file in chrome, the trace view is empty:

Starting tracing (10 seconds)
Tracing completed. Collecting output...
Exception in thread Thread-13:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\tracing_agents\atrace_agent.py", line 194, in _collect_and_preprocess
    self._trace_data = self._preprocess_trace_data(trace_data)
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\tracing_agents\atrace_agent.py", line 272, in _preprocess_trace_data
    trace_data = strip_and_decompress_trace(trace_data)
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\tracing_agents\atrace_agent.py", line 332, in strip_and_decompress_trace
    trace_data = zlib.decompress(trace_data)
error: Error -5 while decompressing data: incomplete or truncated stream

Outputting Systrace results...
Tracing complete, writing results
Traceback (most recent call last):
  File "systrace.py", line 49, in <module>
    sys.exit(run_systrace.main())
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\run_systrace.py", line 196, in main
    main_impl(sys.argv)
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\run_systrace.py", line 193, in main_impl
    controller.OutputSystraceResults(write_json=options.write_json)
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\systrace_runner.py", line 68, in OutputSystraceResults
    self._out_filename)
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\output_generator.py", line 98, in GenerateHTMLOutput
    html_file.write(_ConvertToHtmlString(result.raw_data))
  File "C:\Users\Steli\AppData\Local\Android\sdk\platform-tools\systrace\catapult\systrace\systrace\output_generator.py", line 120, in _ConvertToHtmlString
    raise ValueError('Invalid trace result format for HTML output')
ValueError: Invalid trace result format for HTML output

有人对此或任何建议有解决方案吗?

Anyone have a solution for this or any advice?

推荐答案

Systrace.py具有--no-compress选项.使用它应该使跟踪完成,而无需执行失败的解压缩步骤.

Systrace.py has a --no-compress option. Using it should allow the trace to complete without hitting the failing decompression step.

我的Windows 10系统上发生了同样的问题,这为我解决了这个问题.

The same problem was occurring on my Windows 10 system and this solved it for me.

这篇关于Systrace输出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆