The bot quits in the middle of lookUpWorldName() and then returns to idling, as soon as it reaches line 817 where it tries to create a new position struct to hold the JSON values in. It's believed this is an internal issue with the bot trying to read the data from the iterator *key.
The bot quits in the middle of lookUpWorldName() and then returns to idling, as soon as it reaches line 817 where it tries to create a new position struct to hold the JSON values in. It's believed this is an internal issue with the bot trying to read the data from the iterator *key.
Narrowed it down to this line causing the issue: details.position.x = (*key)["position"][0];
all 3 lines after which set the other axis y and z and rotation are affected.
One thing I can't believe I didn't see before: the contents of the array inside of the JSON are stored as STRINGS and not integers:
Simply changing the values to integers fixes the bug. Tourbot was attempting to store a string into an integer within markEntry.position.x, there was no error handler in place and the compiler did not catch this as there was no way it could have foreseen this would happen since the input that caused it was outside the program (and the return value from json["key"] can be any type).
This probably does not need further fixing, however, adding error handling to detect when this happens and cast the string to an integer for the administrator's sake, a fairly easy thing to do, should be added to the todo list.
Narrowed it down to this line causing the issue:
`details.position.x = (*key)["position"][0];`
all 3 lines after which set the other axis y and z and rotation are affected.
One thing I can't believe I didn't see before: the contents of the array inside of the JSON are stored as STRINGS and not integers:
```
"atlantis": {
"name": "Atlantis",
"url": "http://files.worlio.com/users/aujourd/atlantis/atlantis.world",
"room": "atlantis#beach",
"position": [
"11544",
"7828",
"220",
"203"
],
"blacklist": false
}
```
Simply changing the values to integers fixes the bug. Tourbot was attempting to store a string into an integer within markEntry.position.x, there was no error handler in place and the compiler did not catch this as there was no way it could have foreseen this would happen since the input that caused it was outside the program (and the return value from json["key"] can be any type).
This probably does not need further fixing, however, adding error handling to detect when this happens and cast the string to an integer for the administrator's sake, a fairly easy thing to do, should be added to the todo list.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The bot quits in the middle of lookUpWorldName() and then returns to idling, as soon as it reaches line 817 where it tries to create a new position struct to hold the JSON values in. It's believed this is an internal issue with the bot trying to read the data from the iterator *key.
Narrowed it down to this line causing the issue:
details.position.x = (*key)["position"][0];all 3 lines after which set the other axis y and z and rotation are affected.
One thing I can't believe I didn't see before: the contents of the array inside of the JSON are stored as STRINGS and not integers:
Simply changing the values to integers fixes the bug. Tourbot was attempting to store a string into an integer within markEntry.position.x, there was no error handler in place and the compiler did not catch this as there was no way it could have foreseen this would happen since the input that caused it was outside the program (and the return value from json["key"] can be any type).
This probably does not need further fixing, however, adding error handling to detect when this happens and cast the string to an integer for the administrator's sake, a fairly easy thing to do, should be added to the todo list.