Hacker News new | ask | show | jobs
by taspeotis 4454 days ago
Probably code that relies on implementation details and only works by coincidence.

We had a bug in our application that only manifested on Windows 8 and later.

The problem was that we were passing NULL instead of some other sentinel value (MSDN said to use a specific sentinel value). XP/Vista/7 took NULL anyway and the effect was the same as the sentinel value but in Windows 8 it did something different.

2 comments

I remember Microsoft had "strict" builds of libraries (and Windows itself, IIRC) that did parameter checks. You would boot the machine with that software and run your program (more slowly) and some functions that would work on a consumer OS would generate errors on it.

Do they still do it?

Yes, you can download the checked build from the MSDN Subscriber Downloads.

But last time I checked the .NET Framework abused some Win32 API calls [1] so if you had some WinForms application you'd end up with loads of errors in code that wasn't yours.

Might be fixed, it's been a while since I looked.

[1] http://connect.microsoft.com/VisualStudio/feedback/details/3...

That's exactly something that an app compatibility shim should fix.