[Bug 917] New: plugin crashes when calling javascript function

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Wed Apr 11 02:09:17 PDT 2012


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=917

             Bug #: 917
           Summary: plugin crashes when calling javascript function
    Classification: Unclassified
           Product: IcedTea-Web
           Version: 1.2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Plugin
        AssignedTo: dbhole at redhat.com
        ReportedBy: doko at ubuntu.com
                CC: unassigned at icedtea.classpath.org


reported for icedtea-web-1.2, forwarded from
https://launchpad.net/bugs/755036

Working with chrome on ubuntu, have a basic java applet and javascript
interaction. The javascript to java goes fine, but when I try having the java
fire a javascript method, the chrome java plugin crashes. This all works fine
in Fire Fox.

The Error:

    The following plug-in has crashed: icedTea NPR Web Broweser Plugin (using
IcedTea6 1.9.7 (6b20-1.9.7-0ubuntu1~10.04.1))

The HTML:

    <object height='300' id='thisappletawesome'
name='thisappletawesome'type='application/x-java-applet' width='550'>
        <param name='classid' value='java:JSHelloWorld.class'>
        <param name='codebase' value='/java/'>
    </object>

The Javascript:

    function updateWebPage(){
        alert("java is touching me");
        document.thisappletawesome.setText("hihihi")
    }

The Java:

    import java.applet.*;
    import java.awt.*;
    import netscape.javascript.*;
    import javax.swing.*;

    public class JSHelloWorld extends JApplet {
    JTextArea txt = new JTextArea(100,100);

    public void init(){
     JSObject jso = JSObject.getWindow(this);
     try {
      jso.call("updateWebPage", new String[] {"Hihi"});
        }
        catch (Exception ex) {
           ex.printStackTrace();
        }
    }

    public JSHelloWorld() {
        txt.setText("Hello World");
        getContentPane().add(txt);
    }

    public void setText(String s)
    {
        txt.setText(s);
    }
}

-- 
Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the distro-pkg-dev mailing list