Pages

Thursday, 28 July 2016

Strange Funny Bug?

Introduction

I was working on a straightforward app on Thursday, July 26, 2016 when I observed something strange. This was around 11 pm. I had just built the solution, a part of which contained the source code shown below.


When I ran the project, I got this:


In case you haven't figured out what the bug is, somehow the period I typed as the last character in the string literal on line 48 became the first character of what was supposed to be the same string when I ran the code.

As a tried different stuff to understand what was happening, it soon became clear that most other punctuation or non-alphanumeric characters where exhibiting similar traits.



I started trying more things to understand what was happening. The images below show how the strings in my source code came out differently on the form.




I tried debugging it but still couldn't figure out what was happening.



I changed the control from System.Windows.Forms.Label to some other similar controls like System.Windows.Forms.LinkLabel and System.Windows.Forms.Button, all to no avail.





And then stranger things started happening..


Necessary Info

  • I wrote this project targeting .NET Framework 4.0
  • I have not tried building this project targeting any other version of .NET Framework, and I have not been able to reproduce it in any of my projects targeting other .NET version
I tried searching for the bug online but it is really hard when you don't know how to describe it to Google (or Bing ☺)

 I have since tried reporting this issue to Microsoft.


The reason I decided to post this issue here is to find out if any other person has come across the issue or something similar. Am I missing something? Am I doing something wrong?

No comments:

Post a Comment