hardbyte / hardbyte/python-can
CANalyst-II can't reopen device
- Ngôn ngữ chính
- Python
- Star
- 1.6k
- Fork
- 697
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hello! I use your library with CANalyst-II device and it works pretty well, thank you!
But I have one problem, first run of program is fully successful, but when I quit it and start again it throws error like:
```
msg = self.bus.recv(1)
File "/home/anton/.local/lib/python3.8/site-packages/can/bus.py", line 94, in recv
msg, already_filtered = self._recv_internal(timeout=time_left)
File "/home/anton/.local/lib/python3.8/site-packages/can/interfaces/canalystii.py", line 177, in _recv_internal
self.poll_received_messages()
File "/home/anton/.local/lib/python3.8/site-packages/can/interfaces/canalystii.py", line 157, in poll_received_messages
(channel, raw_msg) for raw_msg in self.device.receive(channel)
File "/home/anton/.local/lib/python3.8/site-packages/canalystii/device.py", line 259, in receive
assert len(rx_data) % self.MESSAGE_BUF_LEN == 0
AssertionError
free(): double free detected in tcache 2
```
If I replug device everything is Ok again.
In code it is looks like:
```python
self.bus = can.interface.Bus(bustype="canalystii", channel="0", bitrate=125000)
...
while True:
msg = self.bus.recv(1)
...
self.bus.shutdown()
```
OS and version: Kubuntu 20.04
Python version: 3.8.10
python-can version: 4.0.0
python-can interface/s: canalystii==0.1
Any ideas?
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.