Skip navigation.

Extender Control Just Won't Pick Up LocalizationAll recent postsThe Best Design Coding Guidelines Ever

How Does MS AJAX Manage to Crash Firefox?

Another day, another idiosyncrasy. I’m implementing the IScriptControl interface and have the following line which crashes Firefox upon page unload:

public IEnumerable<ScriptReference> GetScriptReferences ()
{
   yield return new ScriptReference (
      "MyNamespace.MyScriptControl.Panelbar.js", 
      this.GetType ().Asembly.FullName);
}

Firefox crashes cold with this:

Microsoft AJAX crashing Firefox

By trial and error, I figured that the following line does not cause crashes:

public IEnumerable<ScriptReference> GetScriptReferences ()
{
 yield return new ScriptReference (
   Page.ClientScript.GetWebResourceUrl (
     typeof (MyControl), "MyNamespace.MyScriptControl.Panelbar.js"));
}

}

Go figure. On a scale of 1 (a hiccup) to 10 (absolutely weird), this issue scores a 10.

Comments

Comment permalink 1 RichB |
Crikey. Firefox can execute C# natively? That's impressive.
Comment permalink 2 Milan Negovan |
No, C# is not involved here. It's something about disposing of script controls that causes the crash.
Comment permalink 3 Petr Snobelt |
Every software has bugs ...
Report it bck to MS or to Scott Hanselman and hope it will be fixed in next release.
Comment permalink 4 serializer |
@Milan: do you have any further knowledge of this?

I am having a nightmare making FCKeditor work properly as an IScriptControl. The component is *not* being disposed properly on postback, ultimately causing me lots of errors. Even if I work around the errors, it's surely destined for memory leaks since all the "disposed" components are still hanging around somewhere.

Do you know of any way to fix this?

Regards
Comment permalink 5 Milan Negovan |
Unfortunately, I don't. My suspicion is that something was going very wrong during page unload. If I put a delay in the dispose function, Firefox shut down nice and clean. Without a delay it was crashing every single time. I still don't understand how that one line of code caused such a serious issue.

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):