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

Discussion in 'Java' started by Ed, May 26, 2004.

  1. Ed

    Ed Guest

    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.
     
    Ed, May 26, 2004
    #1
    1. Advertising

  2. Andrew Thompson, May 26, 2004
    #2
    1. Advertising

  3. Ed

    Roedy Green Guest

    On 26 May 2004 01:56:36 -0700, (Ed) wrote or
    quoted :

    >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

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, May 26, 2004
    #3
  4. Ed

    Roedy Green Guest

    On 26 May 2004 01:56:36 -0700, (Ed) wrote or
    quoted :

    >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 );

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, May 26, 2004
    #4
  5. On Wed, 26 May 2004 09:35:39 GMT, Roedy Green wrote:

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


    See the source of the JavaVersionApplet
    for an example..
    <http://www.physci.org/codes/display.jsp?fl=/codes/java/JavaVersionApplet.java#62>

    (Used here..)
    <http://www.physci.org/codes/jre.jsp>

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, May 26, 2004
    #5
  6. Ed

    Ed Guest

    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


    Roedy Green <> wrote in message news:<>...
    > On 26 May 2004 01:56:36 -0700, (Ed) wrote or
    > quoted :
    >
    > >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 );
     
    Ed, May 27, 2004
    #6
  7. On 27 May 2004 08:30:27 -0700, Ed wrote:
    > Roedy Green <> wrote in message news:...
    >> (Ed) wrote or quoted :
    >>
    >>>We have an applet "application" which runs within IE5.5. This
    >>>application can spawn another browser window which itself has an
    >>>embedded applet.

    ...
    > 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>

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, May 27, 2004
    #7
  8. Ed

    Pedro Guest

    On 27-5-2004 17:30, Ed wrote:

    > 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
     
    Pedro, May 31, 2004
    #8
  9. Ed

    Pedro Guest

    On 31-5-2004 17:10, Pedro wrote:

    > On 27-5-2004 17:30, Ed wrote:
    >
    >> Guys,
    >> 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.
    >

    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
     
    Pedro, May 31, 2004
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Denon
    Replies:
    1
    Views:
    587
    Saravana [MVP]
    Nov 14, 2003
  2. VB Programmer

    ZoneAlarm hanging ASPX page in debug mode

    VB Programmer, Jan 19, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    427
    Ken Cox [Microsoft MVP]
    Jan 19, 2005
  3. Iñaki Baz Castillo
    Replies:
    7
    Views:
    893
    Iñaki Baz Castillo
    Jan 12, 2010
  4. Perl debug hanging

    , Sep 6, 2005, in forum: Perl Misc
    Replies:
    2
    Views:
    114
    John W. Krahn
    Sep 6, 2005
  5. Replies:
    0
    Views:
    516
Loading...

Share This Page