This is a migrated thread and some comments may be shown as answers.

"Aw Snap!" error closing Radwindow on Chrome

12 Answers 207 Views
Window
This is a migrated thread and some comments may be shown as answers.
alan
Top achievements
Rank 1
alan asked on 18 Sep 2010, 03:24 PM

Hi,

 

I've run into a problem using standard server side code injecting javascript into a label to close a radwindow. The code works fine in IE and FF.

 

ASPX

 

        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)
            return oWindow;
        }

        function CloseWindow() {
            GetRadWindow().Close();
        }


<body style="background-color: #EDF3FE; font-family: Arial; font-size: 12px; color: Navy;
    padding: 0px; margin: 4px; overflow: hidden">
    <form id="form1" runat="server">
    <asp:Label ID="lblJS" runat="server"></asp:Label>
etc...

aspx.cs

 

        protected void cmdCancel_Click(object sender, EventArgs e)
        {
            lblJS.Text = "<script language='javascript'>CloseWindow()</script>";
        }

When I execute the button click Chrome just displays "Aw Snap!"

Looking at Chrome's error console I see:

Failed To Load Resource http://localhost:50163/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a3bbfe379-348b-450d-86a7-bb22e53c1978%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.2.826.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a86f56c91-febb-4172-ae71-6c2ba2372421%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3a1e771326%3aaa288e2d%3a8674cba1%3ab7778d6c%3ac08e9f8a%3aa51ee93e%3a59462f1

Any idea what's going on please?

Regards

Alan

 

 

12 Answers, 1 is accepted

Sort by
0
Courouble Damien
Top achievements
Rank 1
answered on 20 Sep 2010, 05:54 PM
Hi all, 

I've exactly the same issue here ..

Version of chrome : 6.0.472.62
Version of Telerik : 2010 Q2 SP1

There's no way to close a radwindow, even from closing all windows from the manager using the .CloseAll();

Does anyone know a quick fix ? it's very urgent on my side ..

Thanks guys, 

D.
0
Michael Palavido
Top achievements
Rank 1
answered on 20 Sep 2010, 07:33 PM
I have been using RadWindow extensively for the past several months.  Everything has worked fine across IE, FireFox, Opera, and Chrome.

I just upgraded to the 2010 Q2 SP1 (verson 2010.2.826) yesterday.  Since upgrading, anytime we attempt to close a window via javascript...Chrome throws the Aw Snap! error page...

0
Georgi Tunev
Telerik team
answered on 21 Sep 2010, 03:26 PM
Hello guys,

Can you please send a sample project that reproduces this problem? I tried to reproduce it locally but everything is working as expected. What I can suggest at this point  (based on the code excerpt from Alan) is
1. Not to use a Label for outputting the JavaScript, but ScriptManager's RegisterStartupScript.
2. Try to call (in the JS function) GetRadWindow().close() with a small timeout.

I hope this helps.


Sincerely yours,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mike
Top achievements
Rank 2
answered on 21 Sep 2010, 09:19 PM
Same problem here - but it seems to be localized to windows that display pdf's.
When 'DestroyOnClose=true'  the AwSnap message appears right away, when false the Aw Snap message appears when navigating away from the page.

Doesn't seem to be an issue w/ Chrome on OSX.


The following code causes the issue as long as there is a 'sample.pdf' available:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
  
    <script type="text/javascript">
        //Put your JavaScript code here.
  
        function buttonClicked() {
            radopen(null, "rwView");
        }
    </script>
  
    <input id="button" type="button" value="Click Me!" onclick="buttonClicked();" />
  
    <telerik:RadWindowManager ID="radWindowManager" runat="server"  VisibleStatusbar="False" 
    Behaviors="Close, Move, Resize,Maximize" DestroyOnClose="true" >
    <Windows>
        <telerik:RadWindow ID="rwView" Width="600px" Height="600px" runat="server" 
            NavigateUrl="sample.pdf">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
  
    <div>
  
    </div>
    </form>
</body>
</html>
0
Georgi Tunev
Telerik team
answered on 22 Sep 2010, 01:00 PM
Hello again guys,

Another customer of ours just sent a sample project that reproduces the problem with the JavaScript outputted from the server. Again DestroyOnClose was set to true in that project. In such case you need to make sure that the script will be executed only when the content page is completely loaded.
e.g.
function CloseWindow()
{
    Sys.Application.add_load(function ()
    {
        var rWindow = GetRadWindow();
        rWindow.close();
    });
}


Mike, unfortunately at this point I cannot provide a solution for your scenario. I was able to reproduce the problem and I logged it in our database (and updated your points). We will examine it and do our best to provide a solution as soon as possible.

Sincerely yours,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mike
Top achievements
Rank 2
answered on 22 Sep 2010, 03:41 PM
This may be a workaround for the time being: 
Add a OnClientBeforeClose handler and wrap an explicit call to radWindow.close() in a try catch block, stuffing any exceptions.

In Chrome the window will flash black before closing as the method seems to be called more than once - but will eliminate the Aw Snap message. Other browsers seem to close normally. Problem is after repeated openings and closings - eventually the crash returns.


    <script type="text/javascript">
        //Put your JavaScript code here.
 
        function buttonClicked() {
            radopen(null, "rwView");
        }
 
        function CloseWindow(sender, args) {
 
            try {
                sender.close();
            } catch (err) {
                //alert("Caught Exception: " + err.description);
                return 0;
            }
 
           // sender = null;
 
 
        }
    </script>
 
    <input id="button" type="button" value="Click Me!" onclick="buttonClicked();" />
 
    <telerik:RadWindowManager ID="radWindowManager" runat="server"  VisibleStatusbar="False"
    Behaviors="Close, Move, Resize,Maximize" DestroyOnClose="true" OnClientBeforeClose="CloseWindow" >
    <Windows>
        <telerik:RadWindow ID="rwView" Width="600px" Height="600px" runat="server"
            NavigateUrl="sample.pdf">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
0
alan
Top achievements
Rank 1
answered on 22 Sep 2010, 05:41 PM

Hi Again,

 

Have been tied up with something else for a couple of days but I can confirm that this problem didn't exist before upgrading to the latest build last week.

 

Have tested on windows 7 with an older version of chrome and vista sp1 with the latest version of chrome and the problem occurs with with vs2008's Cassini server and also on our remote test server running IIS 7.5

If you need any more specific information, please let me know.

Regards

Alan

0
Georgi Tunev
Telerik team
answered on 23 Sep 2010, 11:59 AM
Hi guys,

I just wanted to notify you that we found the reason for the problem - it comes from the new feature in Chrome which provides additional security:
http://blog.chromium.org/2010/05/security-in-depth-html5s-sandbox.html

This new feature interferes with the way we dispose the RadWindow and we are currently investigating the possible fixes. I will write back once we have more information.


Best wishes,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mathieu ladroue
Top achievements
Rank 1
answered on 10 Oct 2010, 05:31 AM
Any news on this issue?
0
Georgi Tunev
Telerik team
answered on 11 Oct 2010, 11:19 AM
Hi Jean,

There are several solutions to this problem that we currently evaluate - we want to make sure that the new logic will not cause problems in various scenarios. The fix should be present in the Q3 BETA that we will release next week.


Regards,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
mathieu ladroue
Top achievements
Rank 1
answered on 11 Oct 2010, 06:16 PM
Thanks.
0
alan
Top achievements
Rank 1
answered on 11 Oct 2010, 07:48 PM
Thanks from me too.
Tags
Window
Asked by
alan
Top achievements
Rank 1
Answers by
Courouble Damien
Top achievements
Rank 1
Michael Palavido
Top achievements
Rank 1
Georgi Tunev
Telerik team
Mike
Top achievements
Rank 2
alan
Top achievements
Rank 1
mathieu ladroue
Top achievements
Rank 1
Share this question
or