Memory Problems with PCAN USB X6

A free API for the transfer of data packages according to ISO-TP (ISO 15765-2)
Post Reply
Bukaza
Posts: 1
Joined: Mon 21. Aug 2023, 11:01

Memory Problems with PCAN USB X6

Post by Bukaza » Mon 21. Aug 2023, 11:22

Hello together,

i need help. I'm currently working with PCAN-USB X6 (Firmware: 3.2.0)
Pcan_usb.sys (Vers: 4.4.0.16619)
And in C# im using the following .dlls:
PCANBasic.dll (Vers. 4.7.1.818)
PCAN-UDS.dll (Vers. 2.3.0.265)
PCAN-ISO-TP.dll (Vers. 3.4.0.313)

We got some parts which are showing a really weird behavior on the Can bus during the power on process. After recording the CAN Trace with a vector box we figured out that the Can messages show no anomalies.
After the power on process of the ECU we checked the memory of the PC where we are debugging the C# program. The memory is running completely full in under a few milliseconds.
Image

Why is this happening? Are there any failures from my side?
If im powering off the PCAN Usb Device, it is decreasing. What am i doing wrong?

EDIT: One more thing. If im removing the ECU, the memory stays full. Only after turning off the pcan device, it is decreasing again.

It looks like that a buffer is running full. But why we are not seeing any difference between a "good" part and a "bad" part (good - part which shows no memory problems; bad - part which shows memory problems in windows)

Thanks in advance. You could also write in german, it is probably easier for both sides :) Thanks!

Best regards,

Dominik

EDIT2:
It looks like that the ECU is triggering a problem in your .dll
Image

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: Memory Problems with PCAN USB X6

Post by K.Wagner » Tue 22. Aug 2023, 09:30

Hello,
Bukaza wrote:
Mon 21. Aug 2023, 11:22
We got some parts which are showing a really weird behavior on the Can bus during the power on process. After recording the CAN Trace with a vector box we figured out that the Can messages show no anomalies.
After the power on process of the ECU we checked the memory of the PC where we are debugging the C# program. The memory is running completely full in under a few milliseconds.
Not sure how to understand this. You say first that it was "a really weird behavior on the Can bus", and that after you say "we figured out that the Can messages show no anomalies", so, is there a problem with the CAN data you are seeing or not? and if yes, why is it weird?
Bukaza wrote:
Mon 21. Aug 2023, 11:22
After the power on process of the ECU we checked the memory of the PC where we are debugging the C# program. The memory is running completely full in under a few milliseconds.
Why is this happening? Are there any failures from my side?
If im powering off the PCAN Usb Device, it is decreasing. What am i doing wrong?
I cannot say much without knowing what you are doing and how you are doing it. You are using 3 APIs from us but I do not know how you are calling them, whether those are used together or separated, using more than one channel of the USB X6 device or only one, if all channels of the USB X6 device are participating in the same communication, etc. Note that using ISO-TP/UDS you have to allocate message structures for handling large protocol packages. If for any reason you are not deallocating those again, then it could be cause of the memory raising you are seeing. Check your code for such meamory leaks.
Bukaza wrote:
Mon 21. Aug 2023, 11:22
It looks like that the ECU is triggering a problem in your .dll
It is unlikely that an ECU is causing a problem in a DLL, but rather a problem in the software that uses the DLL. If you still think that the problem is in the APIs and not in your software, then please send us an email to support[at]peak-system.com (also in german if you prefer), and we will do more investigations on this.
Best regards,
Keneth

Post Reply