PCAN consecutive flash Problem

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
Ken0711
Posts: 21
Joined: Wed 19. Jul 2023, 03:04

PCAN consecutive flash Problem

Post by Ken0711 » Fri 24. Nov 2023, 08:54

Good Morning PeakCan Support,

When i used Pcan UDS to Flash ,the First time Flash is Ok,but when i consecutive Flash second time(not close the flash device ), and the PCAN will not response

and VS2019 prompt as shown below

result_uds Cannot obtain value of the local variable or argument because it is not available at this instruction pointer, possibly because it has been optimized away. Peak.Can.Uds.TPUDSStatus


when i first time flashed success,after i have uninitialized the PCAN Hardware Ok !

so what's the reason of the PCAN haven't response when the consecutive flash?

thanks!

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

Re: PCAN consecutive flash Problem

Post by K.Wagner » Fri 24. Nov 2023, 11:12

Hello,

this seems to be a programming problem, not to do with our API, so out of scope.

Nevertheless, here a hint: If you are using C# or any other .NET programming language, then it can be that the garbage collector is freeing the variable "result_uds" or better, the object containing it. Review your code to see where you may be overwriting that object. Or implement the IDispose interface on that class.
Best regards,
Keneth

Post Reply