Systrace 输出错误 [英] Systrace Output Error

查看:34
本文介绍了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天全站免登陆