-
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
Chef crashes when building .zap file without -r #20421
Comments
rwells1703
added a commit
to Cascoda/connectedhomeip
that referenced
this issue
Jul 7, 2022
andy31415
pushed a commit
that referenced
this issue
Jul 7, 2022
woody-apple
added a commit
that referenced
this issue
Jul 7, 2022
Co-authored-by: Richard Wells <rwells1703@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Using chef tool on linux (commit 126f6b2) crashes when building an .zap file generated from zap tool. This only occurs when the Pigweed RPC (-r) flag is not specified in the chef.py command line options.
This is due to the
options.do_rpc
value beingNone
by default. During building, this value is converted to an integer, which crashes due toint()
not being able to take input asNoneType
.$ ./chef.py -zb -d my-device -t linux
Proposed Solution
Converting to an integer is unnecessary, as we are embedding the
options.do_rpc
value in a Python fstring. Removing this function call fixes the functionality of the -r flag to enable/disable RPC.Although removing the
![image](https://user-images.githubusercontent.com/13154431/177770912-9a0c5442-ba22-44d0-83cc-7d51af319672.png)
int()
call fixes the issue on its own, this means that the value ofCONFIG_ENABLE_PW_RPC
is either "1" or "None" which is a little inconsistent. To correct this, set the value to "1" ifoptions.do_rpc
is enabled, else set the value to "0" if not, ie. whenoptions.do_rpc == None
:Result
$ ./chef.py -zb -d my-device -t linux
$ ./chef.py -zbr -d my-device -t linux
The text was updated successfully, but these errors were encountered: