tanloong / neosca

L2SCA & LCA fork: cross-platform, GUI, without Java dependency
GNU General Public License v3.0
28 stars 7 forks source link

IndexError when running only with subfiles #18

Closed tanloong closed 1 year ago

tanloong commented 1 year ago

How to reproduce

  1. pip install neosca==0.0.38
  2. download sample1.txt and sample2.txt
  3. nsca -c sample1.txt sample2.txt

    Error message

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/tan/projects/neosca/neosca/__main__.py", line 4, in <module>
    main()
  File "/home/tan/projects/neosca/neosca/main.py", line 586, in main
    success, err_msg = ui.run()
  File "/home/tan/projects/neosca/neosca/main.py", line 551, in run
    return self.run_on_ifiles()  # type: ignore
  File "/home/tan/projects/neosca/neosca/main.py", line 514, in wrapper
    func(self, *args, **kwargs)  # type: ignore
  File "/home/tan/projects/neosca/neosca/main.py", line 532, in run_on_ifiles
    analyzer.run_on_ifiles(self.verified_ifile_list)
  File "/home/tan/projects/neosca/neosca/neosca.py", line 150, in run_on_ifiles
    self.write_freq_output()
  File "/home/tan/projects/neosca/neosca/neosca.py", line 174, in write_freq_output
    freq_output = self.get_freq_output(self.oformat_freq)
  File "/home/tan/projects/neosca/neosca/neosca.py", line 159, in get_freq_output
    freq_output = self.counter_lists[0].fields
IndexError: list index out of range

However, nsca -c sample1.txt sample2.txt -- another-file.txt works.