Thursday, March 20, 2008

VS2008 bug crashes the IDE

Hello again.
I was playing with WPF last couple of days and I discovered a strange bug in the VS 2008 IDE. It crashes the whole IDE (devenv.exe) with just single line of XAML !

So, here is the bug report: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=333036

And this is short description how to reproduce:

  1. Create a simple "WPF Windows Application" project.
  2. Open the Window1.xaml
  3. In the XAML view, put TextBlock control
  4. After adding the TextBlock control, the XAML should be like this:
    <Window x:Class="WpfApp.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <Grid>
    <TextBlock Text="DummyTextBlock">
    <!-- put ToolTip here -->
    </TextBlock>
    </Grid>
    </Window>
  5. Now replace the "<!-- put ToolTip here -->" with this:
    <ToolTip>
    And let VS IDE to auto-complete the closing tag.
    1. Caution! Indeed we should have:
      <TextBlock Text="DummyTextBlock">
      <ToolTip></ToolTip>
      </TextBlock>
    2. But not (which is the correct syntax):
      <TextBlock Text="DummyTextBlock">
      <TextBlock.ToolTip>
      <ToolTip></ToolTip>
      </TextBlock.ToolTip>
      </TextBlock>

Now, by the moment the VS auto completes your ToolTip tag and underscores it, the IDE will crash.

Please, if you can confirm the bug, go to https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=333036 and click "Validate".

Cheers,
Anton

No comments: