Kelly's Space

Coding 'n stuff

Unexplained failures running debug x64 builds

I was getting random null reference exceptions with a vanilla NetCOBOL for .NET COBOL program.  I tracked it down to a weird behavior in which the .NET runtime was losing my byte array reference inside of an internal struct.  It would be valid before a call to a method, but then upon return the array was empty.  I created a C# sample unrelated to COBOL in C# and sent it to Microsoft.  Apparently, there is a bug introduced in .NET Framework 3.5 SP1.  It is also fixed in .NET Framework 4.0.  The KB article is 974168.

If you are running x64, using NetCOBOL for .NET, and compiling as debug then there is a high probability that you will experience this problem.  Make sure to have the hotfix applied!  You can request it here: http://support.microsoft.com/kb/974168.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: