You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using gcovr on msys2 (windows 10) and an external mingw64 environment to get reports (the same environment works fine with lcov), and get some fatal errors.
gcovr --version, installed with pip install gcovr:
gcovr 4.1
Copyright 2013-2018 the gcovr authors
Copyright 2013 Sandia Corporation
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.
The executed command:
gcovr --gcov-executable /c/dev/libs/compiler_mingw//bin/gcov -r .
(WARNING) Unrecognized GCOV output for /c/dev/workspaces/pkgctrl_workspace/pkgctrl/target/coverage/windows/main/portable/proto/common
_types.pb.cc
This is indicative of a gcov output parse error.
Please report this to the gcovr developers
at <https://github.com/gcovr/gcovr/issues>.
(WARNING) Exception during parsing:
IndexError: string index out of range
(ERROR) Exiting because of parse errors.
You can run gcovr with --gcov-ignore-parse-errors
to continue anyway.
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/gcovr/workers.py", line 71, in worker
work(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 564, in process_datafile
options=options, logger=logger, toerase=toerase, errors=errors, chdir=dir_, tempdir=workdir)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 675, in run_gcov_and_process_files
process_gcov_data(fname, covdata, abs_filename, options)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 117, in process_gcov_data
ignore_parse_errors=options.gcov_ignore_parse_errors)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 233, in parse_all_lines
self.check_unrecognized_lines(ignore_parse_errors=ignore_parse_errors)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 464, in check_unrecognized_lines
raise ex
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 227, in parse_all_lines
self.parse_line(line, exclude_unreachable_branches)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 270, in parse_line
is_code_statement = self.parse_code_line(status, code)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 286, in parse_code_line
firstchar = status[0]
IndexError: string index out of range
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/gcovr/workers.py", line 71, in worker
work(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 564, in process_datafile
options=options, logger=logger, toerase=toerase, errors=errors, chdir=dir_, tempdir=workdir)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 675, in run_gcov_and_process_files
process_gcov_data(fname, covdata, abs_filename, options)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 117, in process_gcov_data
ignore_parse_errors=options.gcov_ignore_parse_errors)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 233, in parse_all_lines
self.check_unrecognized_lines(ignore_parse_errors=ignore_parse_errors)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 464, in check_unrecognized_lines
raise ex
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 227, in parse_all_lines
self.parse_line(line, exclude_unreachable_branches)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 270, in parse_line
is_code_statement = self.parse_code_line(status, code)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 286, in parse_code_line
firstchar = status[0]
IndexError: string index out of range
Traceback (most recent call last):
File "/usr/bin/gcovr", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/gcovr/__main__.py", line 562, in main
contexts = pool.wait()
File "/usr/lib/python3.7/site-packages/gcovr/workers.py", line 160, in __exit__
self.wait()
File "/usr/lib/python3.7/site-packages/gcovr/workers.py", line 151, in wait
raise self.exceptions[0][1]
File "/usr/lib/python3.7/site-packages/gcovr/__main__.py", line 562, in main
contexts = pool.wait()
File "/usr/lib/python3.7/site-packages/gcovr/workers.py", line 151, in wait
raise self.exceptions[0][1]
File "/usr/lib/python3.7/site-packages/gcovr/workers.py", line 71, in worker
work(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 564, in process_datafile
options=options, logger=logger, toerase=toerase, errors=errors, chdir=dir_, tempdir=workdir)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 675, in run_gcov_and_process_files
process_gcov_data(fname, covdata, abs_filename, options)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 117, in process_gcov_data
ignore_parse_errors=options.gcov_ignore_parse_errors)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 233, in parse_all_lines
self.check_unrecognized_lines(ignore_parse_errors=ignore_parse_errors)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 464, in check_unrecognized_lines
raise ex
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 227, in parse_all_lines
self.parse_line(line, exclude_unreachable_branches)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 270, in parse_line
is_code_statement = self.parse_code_line(status, code)
File "/usr/lib/python3.7/site-packages/gcovr/gcov.py", line 286, in parse_code_line
firstchar = status[0]
IndexError: string index out of range
My project uses SCons as build system, and the it builds it in the directory target/coverage/windows, relative to the project root.
My GCC version is:
g++.exe (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 5.1.0
The text was updated successfully, but these errors were encountered:
Thank you for reporting this! The error message indicates that the file generated by gcov includes an empty line. But the gcov format shouldn't contain empty lines…
If the file is otherwise a valid gcov file, you can add the --gcov-ignore-parse-errors option to still get coverage reports. But this doesn't actually solve the problem.
Would it perhaps be possible to see the problematic gcov file, if necessary with the source code in it redacted? When gcovr crashes with the above error message, it should leave a file called _types.pb.cc.gcov somewhere in your target folder.
I am using gcovr on msys2 (windows 10) and an external mingw64 environment to get reports (the same environment works fine with lcov), and get some fatal errors.
gcovr --version, installed with pip install gcovr:
The executed command:
My project uses SCons as build system, and the it builds it in the directory target/coverage/windows, relative to the project root.
My GCC version is:
The text was updated successfully, but these errors were encountered: