Bug 186816 - Crash running check-webkit-style on webrtc/.../exceptions.py
Summary: Crash running check-webkit-style on webrtc/.../exceptions.py
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-19 13:54 PDT by Keith Rollin
Modified: 2018-06-19 14:59 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.36 KB, patch)
2018-06-19 14:02 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2018-06-19 13:54:52 PDT
Running check-webkit-style on all of Source results in the following crash on Source/ThirdParty/libwebrtc/Source/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/exceptions.py:

Traceback (most recent call last):
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/check-webkit-style", line 48, in <module>
    sys.exit(CheckWebKitStyle().main())
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/main.py", line 149, in main
    file_reader.process_paths(paths)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/filereader.py", line 147, in process_paths
    self._process_directory(directory=path)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/filereader.py", line 142, in _process_directory
    self.process_file(file_path)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/filereader.py", line 137, in process_file
    self._processor.process(lines, file_path, **kwargs)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/checker.py", line 970, in process
    checker.check(lines)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/checkers/python.py", line 43, in check
    self._check_pylint(lines)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/checkers/python.py", line 71, in _check_pylint
    output = pylinter.run(['-E', self._file_path])
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/style/checkers/python.py", line 106, in run
    lint.Run(['--rcfile', self._pylintrc] + argv, reporter=ParseableTextReporter(output=output), exit=False)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/lint.py", line 879, in __init__
    linter.check(args)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/lint.py", line 502, in check
    self.check_astng_module(astng, walker, rawcheckers)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/lint.py", line 574, in check_astng_module
    walker.walk(astng)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/utils.py", line 528, in walk
    self.walk(child)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/utils.py", line 528, in walk
    self.walk(child)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/utils.py", line 525, in walk
    cb(astng)
  File "/Volumes/Data/dev/webkit/OpenSource/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pylint/checkers/variables.py", line 387, in visit_name
    assert not stmt.root().file.endswith('.py')
AttributeError: 'NoneType' object has no attribute 'endswith'
Comment 1 Radar WebKit Bug Importer 2018-06-19 13:55:07 PDT
<rdar://problem/41262553>
Comment 2 Keith Rollin 2018-06-19 13:56:28 PDT
It's not apparent to me why the crash is occurring. Trying to write a unittest that checks this file in isolation does not reproduce the crash. But the crash goes away when updating to pylint-0.25.2.

(Note that 0.25.2 is still seven years out-of-date, but I'm not sure if I want to try updating to 1.9.2 or 2.0-dev.)
Comment 3 Keith Rollin 2018-06-19 14:02:29 PDT
Created attachment 343095 [details]
Patch
Comment 4 WebKit Commit Bot 2018-06-19 14:59:43 PDT
Comment on attachment 343095 [details]
Patch

Clearing flags on attachment: 343095

Committed r232987: <https://trac.webkit.org/changeset/232987>
Comment 5 WebKit Commit Bot 2018-06-19 14:59:45 PDT
All reviewed patches have been landed.  Closing bug.