Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access violation error on specific class structure #26

Open
Niatross opened this issue Jun 4, 2024 · 1 comment
Open

Access violation error on specific class structure #26

Niatross opened this issue Jun 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Niatross
Copy link

Niatross commented Jun 4, 2024

LabVIEW crashes with an access violation error when handling very classes with certain combinations of private data.

There is a little bit more detail and some example code on this thread

https://forums.ni.com/t5/LabVIEW/Access-Violation-Crash/m-p/4368735
Access Violation Example - Copy (1).zip

The issue is repeatable on multiple versions of LabVIEW on multiple computers.

It appears that the IDE crashes at a different point every time, anecdotally they appear to be mainly in this library and the LabVIEW composition library

I have been in touch with NI and they have said that they cannot support as legally they cannot help to debug a third party library. Apparently the maintainer needs to get in touch directly

@logmanoriginal
Copy link
Owner

Thanks for reporting the issue.

I have read the linked forum post and can confirm that the crash happens in several versions:

Version Result
LabVIEW 2019 SP1 (32-bit)
LabVIEW 2020 SP1 (32-bit)
LabVIEW 2021 SP1 (32-bit)
LabVIEW 2022 Q3 (32-bit)
LabVIEW 2023 Q3 (32-bit)
LabVIEW 2024 Q1 (32-bit) ✔️

The root cause is known issue 1035177, which causes the name of a Set to contain garbage data after reconstructing the Set using the Flattened String To Variant function:

Flattened String To Variant Set

LabVIEW 2019 SP1
image

LabVIEW 2024 Q1
image

The crash happens when composing the object from such a variant. LabVIEW probably expects a null-terminated string and simply reads beyond what it should, resulting in an access violation. It does not happen every time because the name may coincidentally be valid.

Unfortunately, there is nothing we can do to fix the underlying issue in the Flattened String To Variant function. It appears to be fixed in LabVIEW 2024 Q1, which also means that it will not be patched in older versions ☹️

For older versions, using an Array instead of a Set will fix the issue.

I'll keep this issue open in case someone else stumbles upon this problem.

@logmanoriginal logmanoriginal added the bug Something isn't working label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants