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

Test flake in bstr.dart #416

Closed
timsneath opened this issue May 3, 2022 · 4 comments
Closed

Test flake in bstr.dart #416

timsneath opened this issue May 3, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@timsneath
Copy link
Contributor

Hey @timsneath, this test is flaky:
https://github.com/timsneath/win32/blob/cc9933f2216b5da247227a050aa3e2f21421abaf/test/bstr_test.dart#L23-L26

If you run this test several times on your computer, you will notice that it sometimes fails.

Originally posted by @halildurmus in #406 (comment)

@timsneath
Copy link
Contributor Author

Yuck - that's annoying. How strange that it's intermittent. I'll take a look.

The BSTR data type is documented here, for my ease of reference later:
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr

@timsneath timsneath added the bug Something isn't working label May 3, 2022
@timsneath timsneath self-assigned this May 3, 2022
@timsneath
Copy link
Contributor Author

Doh! The clue is in my own comment: "A BSTR should end with a word-length null terminator."

And then I go and allocate a DWORD. 🤦

@halildurmus
Copy link
Member

Oops 😂

@timsneath
Copy link
Contributor Author

Should be fixed in 9bc07e4

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