Skip to content

visionipc: fix assert in getAvailableStreams#562

Closed
deanlee wants to merge 2 commits intocommaai:masterfrom
deanlee:vipc_fix_get_available_streams
Closed

visionipc: fix assert in getAvailableStreams#562
deanlee wants to merge 2 commits intocommaai:masterfrom
deanlee:vipc_fix_get_available_streams

Conversation

@deanlee
Copy link
Copy Markdown
Contributor

@deanlee deanlee commented Dec 11, 2023

the vipc client still can connect to the ipc path even if the camerad is not running. This could be due to the camerad not shutting down properly and the ipc path not being removed.

ipc_sendrecv_with_fds will returns -1 In this case. this causes the following assertion to fail.

ui: cereal/visionipc/visionipc_client.cc:133: static std::set VisionIpcClient::getAvailableStreams(const std::string &, bool): Assertion `(r >= 0) && (r % sizeof(VisionStreamType) == 0)' failed.

This bug can be reproduced by clicking “preview driver camera" button quickly and continuously in the UI interface.

@deanlee
Copy link
Copy Markdown
Contributor Author

deanlee commented Dec 19, 2023

VipcClient::recv and vipcClient::connect have similar problems, e.g. vipcClient:connect will returns true even if an attempt is made to connect to a non-existent stream type.considering use another pr to fix these issues.

@adeebshihadeh : In addition, vipc currently only uses yuv type buffs, and rgb seems to have been deprecated. Can this part of the code be deleted? This can make vipc's code much cleaner.

@adeebshihadeh
Copy link
Copy Markdown
Contributor

Doesn't the map still use it?

@deanlee
Copy link
Copy Markdown
Contributor Author

deanlee commented Dec 20, 2023

the map_render creates vipc buffer as yuv. Looks like a bug, though it probably doesn't actually affect the result.
https://github.com/commaai/openpilot/blob/5f045176775c8c2cdd7f85e7229f78cf26f0c013/selfdrive/navd/map_renderer.cc#L92

@deanlee
Copy link
Copy Markdown
Contributor Author

deanlee commented Jun 26, 2024

closed , moved to #624

@deanlee deanlee closed this Jun 26, 2024
@deanlee deanlee deleted the vipc_fix_get_available_streams branch June 26, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants