Bug in accessing x64 bit Multidimensional Arrays in x64 Release compilation via Enumerator & interface - by Alon Fliess

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


7
0
Sign in
to vote
ID 771109 Comments
Status Closed Workarounds
Type Bug Repros 3
Opened 11/14/2012 12:29:10 PM
Access Restriction Public

Description

When running the application in x64 release mode not under a debugger, an unhandled exception occurs. Sometime it is NullReferenceException and sometimes access violation. In x86, or under a debugger, or in debug mode, it works ok.
Sign in to post a comment.
Posted by Microsoft on 2/21/2014 at 9:45 AM
Hi,
This was fixed in .NET 4.5.1 for Win8+. I am not sure if it is part of .NET 4.5.1 for Win7-.
The fix will be part of all future .NET 4.5 updates on all OS versions.

-Karel
CLR developer
Posted by Tobias Käs on 7/12/2013 at 7:33 AM
Did this get fixed through Windows Update? I can no longer reproduce the bug.

Can someone confirm this got fixed, and if so for which versions of the .NET Framework?
Posted by Microsoft on 2/16/2013 at 7:45 AM
Thank you for reporting this bug to us. It is going to be fixed in the next version of .NET Framework.

The bug is triggered by multidimensional arrays of structs with size 3,5,6 or 7 bytes. The bug does not cause crashes predictably - an unrelated changes in the program can make it come and go. If you need to workaround it reliably, do not use multidimensional arrays for these structs (use jagged arrays instead) or pad your struct with dummy field to avoid the critical size (add "byte dummy" field to struct VPixel in your repro).

Jan Kotas
CLR
Posted by Microsoft on 11/14/2012 at 9:41 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 11/14/2012 at 12:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Eran Stiller on 11/14/2012 at 12:37 PM
Further investigation shows that this might be related to the generic method definition.
If the method definition is changed like this it works:

public static IEnumerable<IPixel> ForEachPixel(this VPixel[,] pixels)
        {
            // ...
        }