Sunday, March 11, 2012

CommonToolkitScripts is undefined

Hi - we've seen a few reports of this sort of thing but haven't been able to get to the bottom of it.

A couple questions:

1) Does the CollapsiblePanel work properly after this happens?

2) If you break into the debugger (IE or FireBug) and click through the loaded scripts, is one of them the CommonToolkitScripts? It will start with:

// (c) Copyright Microsoft Corporation.

// This source is subject to the Microsoft Permissive License.

// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.

// All other rights reserved.

// Add common toolkit scripts here. To consume the scripts on a control add

//

// [RequiredScript(typeof(CommonToolkitScripts))]

// public class SomeExtender : ...

//

// to the controls extender class declaration.

So I'm trying to get a feel for whether this is just a timing issue - e.g. for some reason the control initializes before all the scripts are loaded, or if the script itself is failing to load.

Hopefully with some more pieces of info we can get this resolved for everyone. I'm not sure if it's a Toolkit issue or an Atlas issue but if we can identify it, we should be able to do something about it.

Thanks,

Shawn


Hi Shawn,

Thanks for the quick reply. To answer your questions:

1. No it doesn't appear to work, at least in my latest test.

2.

When debugging the call stack looks like to:

The first line in the callstack comes from a file that starts off with the following of the page:

// (c) Copyright Microsoft Corporation.

// This source is subject to the Microsoft Permissive License.

// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.

// All other rights reserved.

Type.registerNamespace('AtlasControlToolkit');

//

// this class is a workaround for an Atlas March CTP issue where the

// events for started/ended don't get fired. Once that is fixed,

// this class will be removed.

//

AtlasControlToolkit.NumberAnimination = function() {

539 -e.style.width = CommonToolkitScripts.getCurrentStyle(_parentDiv, 'width');

The rest of the call stack is in a page that starts with the following :

//----------------------

// Copyright (C) Microsoft Corporation. All rights reserved.

//----------------------

// Atlas.js

// Atlas Framework.

//----------------------

// Copyright (C) Microsoft Corporation. All rights reserved.

//----------------------

// AtlasRuntime.js

// Atlas Runtime Framework.

var RuntimeVersion = "2.021006.A";

Function.abstractMethod = function() {

Line 138 - this._setupParentDiv();

Line 305 -this.initialize();

Line 1897 -_pendingEndUpdates[i].endUpdate();

Line 2338 ofAtlasRuntime.js -markupContext.close();

Line 32 ofAtlasRuntime.js -return method.apply(instance, arguments);

Line 1821 of AtlasRuntime.js -completionCallback(callbackContext);

Cheers,

Duncan


Hi Shawn,

Thanks for the quick reply. To answer your questions:

1. No it doesn't appear to work, at least in my latest test.

2.

When debugging the call stack looks like to:

The first line in the callstack comes from a file that starts off with the following of the page:

// (c) Copyright Microsoft Corporation.

// This source is subject to the Microsoft Permissive License.

// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.

// All other rights reserved.

Type.registerNamespace('AtlasControlToolkit');

//

// this class is a workaround for an Atlas March CTP issue where the

// events for started/ended don't get fired. Once that is fixed,

// this class will be removed.

//

AtlasControlToolkit.NumberAnimination = function() {

539 -e.style.width = CommonToolkitScripts.getCurrentStyle(_parentDiv, 'width');

The rest of the call stack is in a page that starts with the following :

//----------------------

// Copyright (C) Microsoft Corporation. All rights reserved.

//----------------------

// Atlas.js

// Atlas Framework.

//----------------------

// Copyright (C) Microsoft Corporation. All rights reserved.

//----------------------

// AtlasRuntime.js

// Atlas Runtime Framework.

var RuntimeVersion = "2.021006.A";

Function.abstractMethod = function() {

Line 138 - this._setupParentDiv();

Line 305 -this.initialize();

Line 1897 -_pendingEndUpdates[i].endUpdate();

Line 2338 ofAtlasRuntime.js -markupContext.close();

Line 32 ofAtlasRuntime.js -return method.apply(instance, arguments);

Line 1821 of AtlasRuntime.js -completionCallback(callbackContext);

Cheers,

Duncan


In the ScriptExplorer there's a bunch of scripts loaded, starting with WebResource.axd?...

I wanted you to click through each of these (you may need to double click your aspx file first, there's a bug in the script explorer) and see if any were the CommonScripts file.

The question is whether CommonToolkitScripts failed to load or just wasn't all the way parsed.

I just spent a bunch of time with one of the Atlas devs staring at the script loading code and we haven't been able to figure out the issue here.

What we really need is a repro, no matter how intermittant that we can run to try to figure out what's going wrong. Is there any way you could pare down your app to a basic repro of this?


When I get the exception I get the following 3 debuggers, is the third one the ScriptExplorer that you refer to?

1. New Instance of Microsoft Script Editor

2. New Instance of VS 2005

3. My Project - Microsoft VS: Visual Stuido 2005

I have tried this one and double clicking on my aspx file does not cause any more scripts other than WebResource.axd to load.

Not knowing where this problem is coming from is going to make this really hard to reduce the code, especially with this only reproducable after about 20 refreshes of a page. Currently my pages are very complex, they I have site maps, Master pages, and a lot of db interaction. I won't have time to do this at the moment, however If this becomes a show stopper during QA I may need to give this a try.

Thanks,

Duncan


Understood. The last two are the same debugger - VS - so either should work.

No comments:

Post a Comment