browser/applet hanging on close-down - how to debug

E

Ed

Guys,

We have an applet "application" which runs within IE5.5. This
application can spawn another browser window which itself has an
embedded applet.

Often, when we close the second browser window it just hangs - the
only way to get rid of it is to kill the task.

The obvious question is has anyone seen this before.

I am talking about the Sun plug-in by the way. If we run this in
console (debug) mode the problem NEVER happens. So I assume that
either it is a timing issue and the console slows the JVM down or the
console option runs Java in a different way.

Does anyone have any ideas?

TIA

Ed

PS You will see a related message about debugging the plug-in and also
passing start-up parameters.
 
R

Roedy Green

We have an applet "application" which runs within IE5.5. This
application can spawn another browser window which itself has an
embedded applet.

You can open a simple frame. There in no need to spawn an entire
second browser. At the very least you can just open another page in
the same browser, using
 
R

Roedy Green

We have an applet "application" which runs within IE5.5. This
application can spawn another browser window which itself has an
embedded applet.

You can open a simple frame. There in no need to spawn an entire
second browser. At the very least you can just open another page in
the same browser, using

getAppletContext().showDocument( url, window );
 
E

Ed

Guys,

I forgot to say that I do not have the source code for this
application; the supplier says they have not seen it elsewhere (how do
I know whether this is true or not!) ....

The environment is NT running IE5.5 and Plug_in 1.4.2.

Sounds like no-one recognises the problem so the main question is can
I debug an applet running in IE using say Eclipse's debugger?

cheers

Ed
 
A

Andrew Thompson

...
I forgot to say that I do not have the source code for this
application; the supplier says they have not seen it elsewhere (how do
I know whether this is true or not!) ....

What does that mean? The supplier of the
app. does not have the source?
The environment is NT running IE5.5 and Plug_in 1.4.2.

...you do know where the Java Console is, don't you?
Sounds like no-one recognises the problem so the main question is can
I debug an applet running in IE using say Eclipse's debugger?

I don't know Eclipse.

And, ..could I ask you not to top-post?
It makes threads difficult for me to understand.
<http://www.physci.org/codes/javafaq.jsp#netiquette>
 
P

Pedro

Guys,

I forgot to say that I do not have the source code for this
application; the supplier says they have not seen it elsewhere (how do
I know whether this is true or not!) ....

The environment is NT running IE5.5 and Plug_in 1.4.2.

Sounds like no-one recognises the problem so the main question is can
I debug an applet running in IE using say Eclipse's debugger?

cheers

Ed
I have not tried debugging the Java plugin myself, but I remember from debugging Tomcat within
Eclipse, you must add -Xrunjdwp=transport=dt_socket,server=y,address=localhost:8000 as runtime
parameter to the Tomcat java executable. In Eclipse, you must use a "Remote Java application" run
configuration (menu Run->Debug..., select "Remote Java application", press New) with Host and Port
matching the address given in -Xrunjdwp (localhost:8000).

In the Java control panel you can specify Java runtime parameters. I'm currently running 1.5.0b2,
but I'm fairly sure in 1.4.2 you can too. In the 1.5.0 control panel, select "Java" tab and press
"View" of "Java applet runtime settings" and add the -Xrunjdwp parameter.

I'll try it out myself in a moment.

Regards,
Pedro
 
P

Pedro

I have not tried debugging the Java plugin myself, but I remember from
debugging Tomcat within
Eclipse, you must add
-Xrunjdwp=transport=dt_socket,server=y,address=localhost:8000 as runtime
parameter to the Tomcat java executable. In Eclipse, you must use a
"Remote Java application" run configuration (menu Run->Debug..., select
"Remote Java application", press New) with Host and Port matching the
address given in -Xrunjdwp (localhost:8000).

In the Java control panel you can specify Java runtime parameters. I'm
currently running 1.5.0b2, but I'm fairly sure in 1.4.2 you can too. In
the 1.5.0 control panel, select "Java" tab and press "View" of "Java
applet runtime settings" and add the -Xrunjdwp parameter.

I'll try it out myself in a moment.
OK, I've just tried it, and it works like a charm (Win2000, Java 1.5.0b2, Eclipse 2.1.2, Mozilla 1.6
& IE6). I could add breakpoints and single step through an applet I once wrote.


One *important* thing: use -Xrunjdwp:transport=dt_socket,server=y,address=localhost:8000 instead of
-Xrunjdwp=transport... (i.e. use ':' after -Xrunjdwp, '=' caused a crash of my browser :-( ).

Further I added ',suspend=n' so the applet/browser does not wait until Eclipse establishes the debug
session. The plugin runtime parameter I used was
-Xrunjdwp:transport=dt_socket,server=y,address=localhost:9999,suspend=n

See http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html#Invocation for more details on
-Xrunjdwp parameters.

P.S.: Remember to remove the parameter from the Java control panel after you're done with debugging.
Otherwise the browser/plugin keeps listenening for debug sessions on the specified port (might be a
security risk).

Regards,
Pedro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top