Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Open
Description
Bug description:
I'm runningpython -m profiling.sampling replay prof.bin --heatmap after having captured some profile and it crashes.
When I dropped a breakpoint in I saw the dump somehow has ended up with one instance wherestat.filename == '\x00'
Error:Failedtoexportheatmap:embeddednullbyteTraceback (mostrecentcalllast):File"<frozen runpy>",line196,in_run_module_as_mainFile"<frozen runpy>",line87,in_run_codeFile"/.../lib/python3.15/profiling/sampling/__main__.py",line65,in<module>main()~~~~^^File"/.../lib/python3.15/profiling/sampling/cli.py",line788,inmain_main()~~~~~^^File"/.../lib/python3.15/profiling/sampling/cli.py",line922,in_mainhandler(args)~~~~~~~^^^^^^File"/.../lib/python3.15/profiling/sampling/cli.py",line1206,in_handle_replaycollector.export(filename)~~~~~~~~~~~~~~~~^^^^^^^^^^File"/.../lib/python3.15/profiling/sampling/heatmap_collector.py",line725,inexportself._generate_file_reports(output_dir,file_stats)~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^File"/.../lib/python3.15/profiling/sampling/heatmap_collector.py",line766,in_generate_file_reportsself._generate_file_html(~~~~~~~~~~~~~~~~~~~~~~~~^file_path,^^^^^^^^^^ ...<3lines>...stat^^^^ )^File"/.../lib/python3.15/profiling/sampling/heatmap_collector.py",line905,in_generate_file_htmlsource_lines=Path(filename).read_text(encoding='utf-8',errors='replace').splitlines()~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/.../lib/python3.15/pathlib/__init__.py",line985,inread_textwithself.open(mode='r',encoding=encoding,errors=errors,newline=newline)asf:~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/.../lib/python3.15/pathlib/__init__.py",line969,inopenreturnio.open(self,mode,buffering,encoding,errors,newline)~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ValueError:embeddednullbyte
Don't yet have a minimal repro, but maybe the issue is apparent to you
CPython versions tested on:
3.15
Operating systems tested on:
macOS