Showing posts with label Microsoft Bugs. Show all posts
Showing posts with label Microsoft Bugs. Show all posts

Thursday, 2 June 2016

Microsoft Bug An UnHandled Microsoft .Net Framework Exception occured in devenv.exe in design mode of winforms forces the Visual Studio to Close

In this post we are going to see a error which forces the development environment crashes and  close because of user code and makes the developers to stand in a some crucial situation.



Click Here to see bug info
https://connect.microsoft.com/VisualStudio/feedback/details/2769909/an-unhandled-microsoft-net-framework-exception-occured-in-devenv-exe-in-design-mode-of-winforms-forces-the-visual-studio-to-close














    Normally Development environment DevEnv.exe is used to develop the code which needs to run in windows Machines , ya it is Visual studio exe. The purpose of this Development environment is used to give a users a sophisticated way for development like Giving intellisense, showing performance reports, Exeception handling like capturing the errors , notifying to users in run time as well as in design time. In some cases it is fails Let we see the cases where it is failed


Example Design time errors capture in Component in Visual studio while development










     Developing a component is usually a good idea in a application, because we can add anything to the control what ever we thought, like wise developing we have to check each and every stage of that control by dragging it in to Form and see the appearance and properties.After finishing the development we will run the Form and see the visual appearance of the control in the UI.



     When i am developing a custom control , when i tried to drag and drop and see the UI, it looks good . Then later again i changes something in the  Control. Now i got an error says "Not implemented" in the  control which is placed on the form, Then i implemented that functionality, Then again the control in the UI, shows another error in design time like Null Reference, again i implemented that steps for the Control, Again it works correctly, so whenever we design a control development environment visual studio will capture the design time errors and show it in Control itself in design.








    But in this case Now the Form Freezes and closes after a certain time, again when ever i open the form which have that custom control crashes the DEvEnv.exe. I get wondered how The development can gets crashes for a user code which is in development mode, because devenv.exe will capture the design time errors and show it in UI, because then only developers can develop the thing in that development editor , that is the purpose of that editor.









     When the UI freezes , it launches a pop screen with  a message that An UnHandles Microsoft .Net Framework Exception occured in devenv.exe in design mode of winforms, Ya here i am using the Winforms as platform.







            I raised a issue to microsoft , i know that my code is buggy, because it is still under development, but how editor gets closed for used buggy code in development, if it is runtime it is acceptable because we are running in CLR, but in design editor should handle everything and shows it to users













  


  After raising the issue i got a feed back from microsoft like below, it is ideally should not crash visual studio but happening in this case, they are saying cases for unhandling the exceptions.



Click Here to see bug info
https://connect.microsoft.com/VisualStudio/feedback/details/2769909/an-unhandled-microsoft-net-framework-exception-occured-in-devenv-exe-in-design-mode-of-winforms-forces-the-visual-studio-to-close

















Note : 
We cant rely on users code to be correct while developing or in design mode, because it is under changes, so devenv.exe should capture the errors in design mode and show in control in design mode, if it is runtime or running the app we can say that we are rely on users code to be correct for stack overflow exceptions .... 




From this post you can see a Microsoft Bug which persists in visual studio , which is an unhandled exception






Friday, 14 November 2014

Microsoft delivered a Patch for a Two decades old windows security Bug.

        Microsoft had given a patch for there customers, which consists of a patch for a security bug that exists for a two decades from the stage of when windows OS, reached the people.The Bug has been actually seen by anyone before, but now IBM research team find out the real big bug of that Microsoft products which is exists for a long term.



So What kind of Bug is this ? 
   An IBM find out a Bug earlier this year, IBM's describing this Bug has rare and unicorn-like both because it presents of all internet explorer's and windows. It is unseen for long time.

IBM team up with the Microsoft to fix, before all find it existence.This security based bug was discovered in May by IBM.

This Bug is used to remotely run a code on a computer. If a user views a malicious webpage using Internet explorer, then attackers start attacking the computer and take control the computer.

This Bug is existed in the all types of Operating systems of windows.IBM researcher Robert Freeman said in his blog post Tuesday.

Freeman is part of the IBM X-Force Research team that discovered the Bug. From the Microsoft point they had explained about this bug to the users. i.e 

A website is design to discover this Bug, This bug exploited website is visited through the IE,  then they convince the user to view the website an attacker convince user on taking action, make them to click  link in a email message , or make them to visit the website that they want to visit.

This Bug is based on IE, so the systems which uses the IE most predominantly may affect by this BUG , May be Servers, Terminal and workstations etc.


Few months back Microsoft launch the IE11 bug bounty.but now this kind of Bug makes the usage of IE in a question.






This Bug is fixed along with  others and released there patch in Tuesday earlier this Week. this Patch will install automatically for the users who make automatic updates enabled.



















Friday, 13 December 2013

JQuery Bug in Attr() function replace with Prop() function

This article reveals about the some Jquery function usage and the bug present in it, and how to resolve the bug and get the solution what we need ?


I have decide to do a some Test in Jquery by a sample having a TextArea and a checkbox. when i scroll the textbox from the top  to the bottom , checkbox should be enabled and checked, It the user scrolls upwards then automatically checkbox should be disabled and unchecked. To do this we are code it in Scroll function of text area like below


HTML:


<html>
<head>

    <title></title>
    <link  rel="Stylesheet" href="StyleSheet1.css" />
    <script type="text/javascript" src="jquery-1.9.1.intellisense.js">
    </script>
    <script type="text/javascript" src="jquery-1.9.1.js">
   </script>   
   <script type="text/javascript" src="jquery-1.9.1.min.js">
    </script>


<script type="text/javascript" >

    $(document).ready(function () {

        $('#agree').attr('disabled', true);
        $('#agree').attr('checked', false);


        var scrollheight = $('#area')[0].scrollHeight;
        var innerheight = $('#area').innerHeight();

        $('#area').scroll(function () {


            var scrollposi = $(this).scrollTop();

            var remaim = scrollheight - innerheight;
            $('#feed').text(Math.ceil(remaim));
            // alert(scrollposi);
            if (remaim <= scrollposi) {

                $('#agree').attr('disabled', false);
            }
            else {

                $('#agree').attr('disabled', true);
            }

        });


    });
</script>


</head>
<body align="center">
<div id="feed">dd</div>
<textarea id="area" cols="50" rows="30">
<!-- <textarea id="terms" rows="20" cols="50"> -->
<p>YouTube was founded by Chad Hurley, Steve Chen, and Jawed Karim, who were all early employees of PayPal.[7] Hurley had studied design at Indiana University of Pennsylvania, and Chen and Karim studied computer science together at the University of Illinois at Urbana-Champaign.[8]
According to a story that has often been repeated in the media, Hurley and Chen developed the idea for YouTube during the early months of 2005, after they had experienced difficulty sharing videos that had been shot at a dinner party at Chen's apartment in San Francisco. Karim did not attend the party and denied that it had occurred, but Chen commented that the idea that YouTube was founded after a dinner party "was probably very strengthened by marketing ideas around creating a story that was very digestible".[9]
Karim said that the inspiration for YouTube came from Janet Jackson's role in the 2004 Super Bowl incident, when her breast was exposed during her performance, and from the 2004 Indian Ocean tsunami. Karim could not easily find video clips of either event online, which led to the idea of a video sharing site.[10] Hurley and Chen said that the original idea for YouTube was a video version of an online dating service, and had been influenced by the website Hot or Not.[11][12]
</p>
</textarea>
<p><input type="checkbox" id="agree"  /> : Agree</p>
</body>
</html>




Now the Bug is when you scroll down and reaches the last position of scroll checkbox is checked and when you move up the checkbox is disabled and unchecked . But when you scroll again second time to the last position of scroll the checkbox is not enabled. Because attr function is not working in JQuery version above 1.9 but working in below version it can be resolve by replace with prop functiopn


       $('#area').scroll(function () {


            var scrollposi = $(this).scrollTop();

            var remaim = scrollheight - innerheight;
            $('#feed').text(Math.ceil(remaim));
            // alert(scrollposi);
            if (remaim <= scrollposi) {

                   $('#agree').prop('checked'true);
            }
            else {

                  $('#agree').prop('checked'false);
            }

        });


              

Change in the function attr to prop makes the functionality to work correctly.This bug may be fixed in the future versions


I hope this article will make you to aware of using correct functions in JQuery.