UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
-
- Posts: 21
- Joined: Thu 28. Apr 2022, 14:48
UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
Sometimes function UDSApi.Initialize_2013() fails with code PUDS_STATUS_NOT_INITIALIZED.
Arguments: channel = cantp_handle.PCANTP_HANDLE_USBBUS1 .. 16; baudrate = PCANTP_BAUDRATE_250K.
The PCAN-VIEW is connected installed and working, PCAN-VIEW is just fine, showing the messages on the line.
However the function UDSApi.Initialize_2013() fails.
When it fails, calling the function again does not solve. Also restaring the application does not solve. Also removing the interface and plugging-in again does not solve.
Sometimes restarting the PC solves the problem temporary; however it may happen again at any randome time.
Just wondering if someone has seen this problem before.
Arguments: channel = cantp_handle.PCANTP_HANDLE_USBBUS1 .. 16; baudrate = PCANTP_BAUDRATE_250K.
The PCAN-VIEW is connected installed and working, PCAN-VIEW is just fine, showing the messages on the line.
However the function UDSApi.Initialize_2013() fails.
When it fails, calling the function again does not solve. Also restaring the application does not solve. Also removing the interface and plugging-in again does not solve.
Sometimes restarting the PC solves the problem temporary; however it may happen again at any randome time.
Just wondering if someone has seen this problem before.
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
Hello Fabio,
Unfortunately I've never seen this issue. When this occurs, could you try connecting to that device/channel with PCANBasicExample.exe included in the PCANBasic package?
This will help us to know if the problem lies in the higher API or not.
Thank you.
Unfortunately I've never seen this issue. When this occurs, could you try connecting to that device/channel with PCANBasicExample.exe included in the PCANBasic package?
This will help us to know if the problem lies in the higher API or not.
Thank you.
Best regards,
Fabrice
Fabrice
-
- Posts: 21
- Joined: Thu 28. Apr 2022, 14:48
Re: UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
Thanks for answering.
I downloaded and launched PCANBasicExample.exe.
The dropdown list on the top-left shows PCAN_DNG (31h) and PCAN_ISA 1 to 8. The USB interface is not listed. Clicking the button "initialize" I get the error "driver not loaded".
Now I will reboot the PC and try again
Fabio
I downloaded and launched PCANBasicExample.exe.
The dropdown list on the top-left shows PCAN_DNG (31h) and PCAN_ISA 1 to 8. The USB interface is not listed. Clicking the button "initialize" I get the error "driver not loaded".
Now I will reboot the PC and try again
Fabio
-
- Posts: 21
- Joined: Thu 28. Apr 2022, 14:48
Re: UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
Some more info.
The application was calling Initialize_2013 and Uninitialize_2013 several times during operation. After many calls, something bad happens in the lower layer and you must reboot windows. However PCAN-View keeps working.
Another way to reproduce the problem is calling Initialize_2013 and then terminating the application without calling Uninitialize_2013. I am using visual studio and terminate the application through the debugger. Do that a few times and Initialize_2013 will start returning PUDS_STATUS_NOT_INITIALIZED and you must reboot windows.
I've changed the application, now I am calling Initialize_2013 just one time at the beginning, then I make sure to call Uninitialize_2013 before to exit. This way my application is usable; as long as the user do no terminate the application with the task manager.
I came to the conclusion that ther must be a bug in some of the layers: peak libraries or drivers, I do not know. If someone in PEAK wants to dig deeper, understand and fix, I am willing to support with testing, experiments, ...
The application was calling Initialize_2013 and Uninitialize_2013 several times during operation. After many calls, something bad happens in the lower layer and you must reboot windows. However PCAN-View keeps working.
Another way to reproduce the problem is calling Initialize_2013 and then terminating the application without calling Uninitialize_2013. I am using visual studio and terminate the application through the debugger. Do that a few times and Initialize_2013 will start returning PUDS_STATUS_NOT_INITIALIZED and you must reboot windows.
I've changed the application, now I am calling Initialize_2013 just one time at the beginning, then I make sure to call Uninitialize_2013 before to exit. This way my application is usable; as long as the user do no terminate the application with the task manager.
I came to the conclusion that ther must be a bug in some of the layers: peak libraries or drivers, I do not know. If someone in PEAK wants to dig deeper, understand and fix, I am willing to support with testing, experiments, ...
Re: UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
Hello,
Thanks in advance for your help on this.
yes, we are always interested to find and fix any problem that our APIs may have.fabio.parodi@technoleader.it wrote: ↑Fri 5. May 2023, 08:42I came to the conclusion that ther must be a bug in some of the layers: peak libraries or drivers, I do not know. If someone in PEAK wants to dig deeper, understand and fix, I am willing to support with testing, experiments, ...
We didn't manage to see the problem by trying this. Probably we are not doing the same. Could you provide us with a minimalistic test-project for problem reproduction and a description of how the CAN environemnt should be to get the error (sening/writing, bitrate, etc)?fabio.parodi@technoleader.it wrote: ↑Fri 5. May 2023, 08:42Another way to reproduce the problem is calling Initialize_2013 and then terminating the application without calling Uninitialize_2013. I am using visual studio and terminate the application through the debugger. Do that a few times and Initialize_2013 will start returning PUDS_STATUS_NOT_INITIALIZED and you must reboot windows.
Thanks in advance for your help on this.
Best regards,
Keneth
Keneth
-
- Posts: 21
- Joined: Thu 28. Apr 2022, 14:48
Re: UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
minimalistic test-project attached
- Attachments
-
- bugreport-2023-05-09-fp.zip
- (2.29 MiB) Downloaded 972 times
Re: UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
Hello,
thanks for the test-project.
thanks for the test-project.
Best regards,
Keneth
Keneth
-
- Software Development
- Posts: 305
- Joined: Mon 9. Sep 2013, 12:21
Re: UDSApi.Initialize_2013 fails with PUDS_STATUS_NOT_INITIALIZED
Issue fixed in PCAN-ISO-TP v3.5.0 and PCAN-UDS v2.3.1.
Best regards,
Fabrice
Fabrice