activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ipsi <nzi...@gmail.com>
Subject Internet Explorer 'Stack Overflow at Line 0'
Date Mon, 18 Aug 2008 06:52:37 GMT

I'm getting some strange behavior when testing in IE code that worked fine on
Firefox. Version of IE is 6.0.

I'm using Geronimo 2.1.1, and whatever version of ActiveMQ comes with it,
though my own code references ActiveMQ 5.0.0 JARs. Anyway, it all seems to
work fine in Firefox 2.0, but when I load a virtual machine to try and test
on IE (my local machine is running Ubuntu 7.10, and is also running
Geronimo), I load the page, click a button to subscribe to a Queue, then
click a button to add a handler to receive messages, and that works. Shortly
after that, it'll come up with a message saying 'Stack overflow at line: 0',
which indicates to me that it may be a problem with the ActiveMQ Javascript
files.

Sometimes, rather than just showing one pop-up box, it'll show lots and
lots, like it's hit an infinite loop or something. I keep clicking them away
until I get the above message, at which point it won't receive any further
messages, even if I send them. Trying to receive them from Firefox works
fine, so if I send a message the ActiveMQ broker it will get it and send a
reply, but IE won't acknowledge the message. Firefox will, however.

Here's the page I'm using for testing.

<html>
	<head>
		<title>AJAX Testing Page</title>
		<script type="text/javascript" src="amq/amq.js"></script>
		<script type="text/javascript">amq.uri='amq';</script>
		<script type="text/javascript">
			/* Copyright Simon Willison (C) May 2004 */
			function addLoadEvent(func)
			{
				var oldonload = window.onload;
				if (typeof window.onload != 'function')
				{
					window.onload = func;
				}
				else
				{
					window.onload = function() {
						if (oldonload)
						{
							oldonload();
						}
						func();
					}
				}
			}

			//addLoadEvent(onLoad);
		
			function onLoad()
			{
				addHandler();
				sendMsg();
			}
			
			var privateQueue = "queue.tmpq";
			var tmp;
			
			function rcvMessage(message)
			{ 
				alert("received " + message.firstChild.firstChild.nodeName + ";" +
message.firstChild.firstChild.firstChild.nodeValue);
				privateQueue = message.firstChild.firstChild.firstChild.nodeValue;
				alert("DONE");
			}
			
			function rcvPrivate(message)
			{
				alert("received " + message.nodeValue);
				tmp = message;				
			}
			

			function addHandler()
			{
				amq.addListener("ResponseQueue", "ResponseQueue", rcvMessage);
				alert("handler added");
			}

			function sendMsg()
			{
				amq.sendMessage("RequestQueue", "<message>hello</message>"); 
				alert("message sent");
			}

			function removeHandler()
			{
				amq.removeListener("ResponseQueue", "ResponseQueue");
				alert("Removed Handler");
			}
			
			function receivePrivateMessage()
			{
				alert(privateQueue);
				amq.addListener(privateQueue, privateQueue, rcvPrivate);
			}
			
			function removePrivateMessage()
			{
				amq.removeListener(privateQueue, privateQueue);
			}
			
			function sendTmp()
			{
				amq.sendMessage(privateQueue, privateQueue,
"<message>MESSAGE</message>");
				alert("SENT");
			}
		</script>
	</head>
	<body>
		<h1>Initial Heading</h1>
		<input type="button" value="Request" onclick="sendMsg()" />
		<input type="button" value="Receive" onClick="addHandler()" />
		<input type="button" value="RemoveH" onClick="removeHandler()" />
		<input type="button" value="Subpriv" onClick="receivePrivateMessage()" />
		<input type="button" value="Rempriv" onClick="removePrivateMessage()" />
		<input type="button" value="SendTmp" onClick="sendTmp()" />
	</body>
</html>

The response from the server is always the same:

<response><private><queue>QUEUE{NANO}</queue></private></response>

Where Nano is the system time in Nanoseconds.

If anyone could shed some light on this it would be fantastic.
-- 
View this message in context: http://www.nabble.com/Internet-Explorer-%27Stack-Overflow-at-Line-0%27-tp19026699p19026699.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message