5

Visual Studio Team system 2008 crashes without any error messages whenever I try to open a specific JavaScript file. I found this thread on social.msdn but installing the KB958502 hotfix didn't fix the problem.

Has anyone else experienced this and solved it?

1
  • 1
    I've just moved from VWD 2008 to Visual Studio 2008 and I'm experiencing this exact same problem. I don't have power commands installed. Any body got any more answers? Commented Oct 7, 2009 at 8:01

2 Answers 2

1

Do you have PowerCommands for Visual Studio 2008 installed? If so, check this post for help:

FIX: PowerCommands for Visual Studio 2008 Crashes IDE

The exact same thing happened to me when I was opening some JavaScript files.

Sign up to request clarification or add additional context in comments.

3 Comments

I don't have PowerCommands installed but that is still good to know, thanks!
Hi Jason, I'm experiencing this issue, and have been redirected to your link for an answer, but the "Fix..." link above no longer points to anything. Could you possible help point me in the right direction. Thanks :-)
@kamgman - there's an archive of the page here: web.archive.org/web/20091208115305/http://…
1

Since this is a different "answer" than my last, I am creating another post/entry.

I did experience this from time to time on a project I was on last year. I was using MochiKit as my toolkit, so take that into consideration.

Basically, I had some code like this in a file called common.js, which ran in the global scope:

if(typeof(DomEvent) == "undefined") {
   DomEvent = {};
   var domEventNames = [
      "onabort", "onblur", "onchange", "onclick", "ondblclick", "onerror", "onfocus", 
      "onkeydown", "onkeypress", "onkeyup", "onload", "onmousedown", "onmousemove", 
      "onmouseout", "onmouseover", "onmouseup", "onreset", "onresize", "onscroll", 
      "onselect", "onsubmit", "onunload"
   ];
   // forEach is a MochiKit function; functionality should be obvious
   forEach(domEventNames, function(eventName) {
      DomEvent[eventName] = eventName;
   });
}

So, it basically dynamically builds an object assigned to the variable DomEvent and creates properties on that object that are have the same name as the value it holds (string representations of common browser events).

Now, I wanted Intellisense to help me with the API in other files, so in other files, I would have the following line in the top of the file:

/// <reference path="common.js"/>

That tells Visual Studio to "import" the API from that JavaScript file for use with Intellisense in the file this declaration is used in.

So I speculated that since the code in the common.js file, which I showed above, was building a global variable's value dynamically, Visual Studio was barfing on it. I felt fairly good about this hypothesis because the JavaScript code itself is sound, and Visual Studio would only crash if I used that XML comment to assist Intellisense. If I removed it, there wasn't a problem.

Hope that helps you or someone else.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.