Page 1 of 1

PCAN consecutive flash Problem

Posted: Fri 24. Nov 2023, 08:54
by Ken0711
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!

Re: PCAN consecutive flash Problem

Posted: Fri 24. Nov 2023, 11:12
by K.Wagner
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.