| Summary: |
XCB codegen should give a meaningful error message on malformed fieldref |
| Product: |
XCB
|
Reporter: |
Trevour <bio_tube> |
| Component: |
Utils | Assignee: |
xcb mailing list dummy <xcb> |
| Status: |
RESOLVED
MOVED
|
QA Contact: |
xcb mailing list dummy <xcb> |
| Severity: |
enhancement
|
|
|
| Priority: |
medium
|
|
|
| Version: |
unspecified | |
|
| Hardware: |
All | |
|
| OS: |
All | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Take the following example protocol: <?xml version="1.0" encoding="utf-8"?> <xcb header="bad" extension-name="bad" extension-xname="BAD"> <request name="BadRequest" code="0"> <field type="CARD32" name="sizeField" /> <list type="CARD8" name="dataVector"> <fieldref>vectorSize</fieldref> </list> </request> </xcb> When running it through XCB's codegen, the result is a backtrace and a TypeError that NoneType can't be concatenated with 'str'. As it stands, the error gives no hint that the issue is that vectorSize isn't a previously defined field in the request, which can be easily overlooked(especially if the error is a simple shift failure). Not having any experience in Python, I can't suggest what would be the best fix, but it looks like adding a check in get_type_impl(state.py) for id == NoneType should be sufficient for a simple "Check your fieldrefs" diagnostic.