01-05-2020 02:09 AM
Hi,
I'm using LabVIEW function MoveBlock previously with 2016 64bits and all was working fine.
I upgrade LabVIEW version to 2019 and since MoveBlock don't work.
When running, execution stay blocked in DLL call function.
It's possible to reproduce problem using this example : http://www.ni.com/example/27242/en/
Execute code with 32 bits version and copy pointer value then go to 64 bits version avec replace pointer creation with pointer value and run example.
Execution stay blocked in DLL call function.
Thank you
Regards,
Solved! Go to Solution.
01-05-2020 04:26 AM - edited 01-05-2020 04:44 AM
Well this example is from 2006. The first LabVIEW version that was available in 64-bit was 2009. It even tells you in the description “passes this pointer as 32-bit pointer to LabVIEW”.
You’ll have to adapt this example to work in 64-bit. The datatype for the pointer return value needs to be changed from 32-bit to pointer sized. Same for the value passed to the MoveBlock.
I already hear you say, but but it worked in 2016!!! No it most likely didn’t and you had just bad luck because memory was differently allocated and it seemed to work. It may have been that the pointer allocated was below the 2GB virtual memory space limit so that the missing upper 32-bit had no influence or it already did corrupt memory somewhere that just didn’t have any visible consequences for you!
And yes I consider it bad luck to use a badly configured Call Library Node that doesn’t crash you. That are nasty bugs hidden in your software that tend to surface in the worst possible moment, usually when you are running an expensive teat that is difficult to repeat. It’s a perfect candidate to trigger several of Murphy’s laws at once 😀
01-05-2020 10:15 AM
Hi Rolf,
Thank you for reply and explaination.
I'll try some tweak to match 64bit pointer.
I'll post here the solution.
Regards