-
Notifications
You must be signed in to change notification settings - Fork 96
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
something wrong with the message type #164
Comments
Raw messages triggering trouble would definitely help. |
I have the same problem when testing message['id'] and I believe that I have isolated the bad message. In my case the bad message was parsing just fine and the error occurred on the following message. I have isolated it down to this, working from master:
Output
It appears that something happens in decode() that breaks python |
I'm going to write some tests for 6:1:4 messages.
Note the non-zero data in some of the spare blocks :( |
In function Lines 409 to 436 in 538908f
Two pylists of length 26 are constructed. However the for loop runs to index 128/2, and calls Changing the calls to |
Thanks @jamtho There is still lots more wrong with 6:1:4 starting with needing tests, but this should help. |
Spotted by @jamtho via schwehr#164
f2419b4 is a better 6:1:4, but probably could still be better... e.g. handle if there is a non-standard amount of spare. |
If anyone has test messages that are crashing libais, please create a new issue with them. |
Has anyone else seen the following problem? It occurs intermittently,
I receive and parse a message. I get the message id from message['id']
I test:
if message_id in (1, 2, 3, 18, 19, 27):
do something
On the if statement, python throws an exception: list assignment index out of range (IndexError)
It is accompanied by an error: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
This is confusing because the if statement is not doing an index assignment.
My guess is that internally python is comparing message_id with the values in the tuple, and one of them does not compare properly. Perhaps because message_id came from C++ and was not properly converted to a legal python value. When I try to print it, message_id prints as "6".
I started seeing this on Nov 13.
On Nov 15, there were six such errors around 00:42 UTC and another six at 12:04.
If it would help, I can get the raw messages that triggered these errors.
The text was updated successfully, but these errors were encountered: