-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TE8 Mac Chip Tool Darwin: Null values returned seem to cause some sort of crash #16146
Comments
The server is sending an invalid response: a valid response to an IdentifyQuery is either a failure status or an IdentifyQueryResponse command, but the server sends a success status. Regular chip-tool logs the response and does no validation. chip-tool-darwin tries to actually parse the response as the intended response type, which fails, and it logs that failure. What exactly is the problem, apart from the server being buggy and regular chip-tool not doing validation that arguably it should do? |
Filed #17133 on the server behavior. |
@bzbarsky-apple Good catch on the server aspect, I agree that should be fixed. However, from a chip-tool-darwin perspective, are we actually crashing here? If so is there a more graceful way to handle this? Something along the lines of an "accessory out of compliance error" may help in future scenarios. Not sure how simple of an enhancement that would be for scenarios like this. Ideally we'd never see this behavior with a well-behaved certified accessory, but from my experience even "certified" accessories surprise us from time to time. It might be helpful to have a specific log line for these sort of things. |
We are not. We are logging the error and treating it as a failed command invocation. I agree the logging could be more informative.... I'll take a look into that. |
Created #17194 to improve the logging some, by not losing track of the original error. Now it would say:
Not sure whether that's enough clearer... |
Not a crash issue, and the logging is clearer now. |
Tested the following command using chip-tool-darwin:
./chip-tool-darwin identify identify-query 0x000000000001B674 1
The server will send a response to this command, in my case this response returned a null value. But it looks like this handling causes some sort of crash?
Chip-tool-darwin response handling
I do not see this when testing with the regular "chip-tool".
The text was updated successfully, but these errors were encountered: