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

Runtime Error "SSE Invalid Operation" when Asserting a Real after a String #237

Open
GustlCGN opened this issue Mar 4, 2024 · 0 comments

Comments

@GustlCGN
Copy link

GustlCGN commented Mar 4, 2024

Describe the bug
When running a Test with first an AssertEquals_String with an Empty String and then an AssertEquals_Real a runtime Error can occur. This probably happens because TcUnit is checking all prior assertions which leads to the String being interpreted as a Real which can lead to a Invalid Real and a crash follows. As this check happens with the union of the expected and actual value, the crash also depends on both expected and actual value of the string. My observation is that, one has to be a NaN and the other one has to be really empty for the crash to happen.

To Reproduce
Reproducing the problem is difficult, probably because it is depended on the old data in the memory area allocated to the T_MaxString. But if you do first an AssertEquals_String with an Empty String and then an AssertEquals_Real the runtime Error can occur. Maybe if you write directly to the memory area of the string a more deterministic crash can be achieved.

Expected behavior
The assertion of the Real should not be dependent on asserting a String before.

Screenshots
grafik
The picture shows the NaN when the String is interpreted as a Real.

Software versions
TcUnit 1.3.0,
TwinCAT XAE version 55

Run environment
Desktop development machine

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant