Ptolemy II 2.0.1 Limitations

The Ptolemy II 2.0.1 Release notes list limitations. The Vergil welcome window has a link to a similar list.

If you find bugs, check the limitations page inside Vergil, then check this page, and then send email to ptolemy at eecs berkeley edu.

In your email, please be sure to list

  • What operating system you are operating under (Windows 2000 SR1? Solaris 8?)
  • What version of Java you are running. (Run java -version, or use our Java Version Applet )
  • Whether the problem occurs in
  • Vergil
  • The local version of the web pages
  • The PtolemyII 2.0.1 website version of the web pages
  • The Web Start version
  • Places to go

  • Online Applet Demonstrations and Documentation
  • Ptolemy II Design Document
  • Contents

  • Installer Limitations
  • Java Version
  • Build Limitations
  • Jini Version
  • Actor Limitations
  • AudioReader
  • ViewScreen
  • User Interface Limitations
  • Renaming Ports
  • Edit Styles
  • MacOS X Limitations
  • CT tree widget
  • Installer Limitations

    Java Version

    If you install Ptolemy II using the Installanywhere installer, and you would like to use a different version of Java, then edit the corresponding .lax file and set your path accordingly.

    For example, under Windows c:/Ptolemy/Ptolemy_II_2.0.1/vergil.lax might contains lines like:

    #   LAX.NL.CURRENT.VM
    #   -----------------
    #   the VM to use for the next launch
    
    lax.nl.current.vm=C:\\jdk1.3.1_04\\jre\\bin\\java.exe
    
    For example, if you wanted use the 1.3.1_07 JDK, comment out the lax.nl.current.vm line and add
    lax.nl.current.vm=C:\\jdk1.3.1_07\\jre\\bin\\java.exe
    
    or if you wanted to use the Java 1.3.1_07 JRE, use:
    lax.nl.current.vm="C:\\Program Files\\JavaSoft\\JRE\\1.3.1_07\\bin\\java.exe"
    
    Then add the appropriate directory to your path, see the Ptolemy II installation instructions for details.

    One workaround is to have only one version of Java on your machine at install time.

    Note that the installer for HyVisual 2.2 release does not have this problem, the HyVisual 2.2 installer includes a dialog that allows the user to choose which version of Java to use.

    Build Limitations

    Jini Version

    The Jini actors in $PTII/ptolemy/actor/lib/jspaces and the demos in $PTII/ptolemy/domains/ct/demo/jspaces require Jini 1.0.1.

    Unfortunately, Jini 1.0.1 is no longer available from Sun. Jini is only required for the actors and demos above, Ptolemy II will compile and run without Jini.

    The workaround is to not compile the jini code in $PTII/ptolemy/actor/lib/jspaces

    The $PTII/configure script looks for a directory called $PTII/vendors/sun/jini1_0_1 and if it is present then the PTJSPACES makefile variable is set to 'jspaces' and $PTII/ptolemy/actor/lib/makefile uses the value of PTJSPACES to decide whether to go into the jspaces subdirectory.

    There is a fairly complete description of the process of how external packages are handled in in $PTII/doc/coding/develsetup.htm which can be found at http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII2.0/ptII2.0.1/doc/coding/develsetup.htm#ExternalPackages

    One trick is to search the web for the jini1_0_1.zip file and use that

    Jim Kleckner discovered this bug, and he included the following part of the Jini release notes:

    Changes since the 1.1 release

    RMI registry-related classes and interfaces have been removed In previous releases of the Jini Technology Starter Kit, Outrigger and Mahalo provided direct support for binding into an RMI registry. This functionality was deprecated in the 1.1 release and has now been removed. Because we no longer support binding of and lookups for Outrigger and Mahalo servers in RMI registries, we have removed a number of related classes and interfaces that were used to find services in RMI registries, or used to manage a service's registration with an RMI registry:
    com.sun.jini.outrigger.RegistryFinder
    com.sun.jini.mahout.RegistryAdmin
    com.sun.jini.mahout.RegistryLocator
    com.sun.jini.mahout.binder.RefHolder

    If you were finding Outrigger or Mahalo services in RMI registries, you should remove this functionality from your code, and use Jini lookup services instead.

    Actor Limitations

    Dragging AudioReader into the canvas results in an error (8/26/02)

    If you drag the AudioReader actor into the canvas, you will get
    ptolemy.kernel.util.IllegalActionException: Error evaluating expression
     "file://" + property("ptolemy.ptII.dir") + 
     "/ptolemy/actor/lib/javasound/test/voice.wav""
        in ..AudioReader2.sourceURL
     Because:
      Failed to evaluate sourceURL 
        '"file://C:\ptII/ptolemy/actor/lib/javasound/test/voice.wav"'
            in ..AudioReader2
     Because:
      C
     at ptolemy.data.expr.Variable.validate(Variable.java:1029)
    ...
    
    The reason the error occurs is because under Windows $PTII will likely have a backslash which causes problems when creating a URL. The fix is to add a new property called ptolemy.ptII.dirAsURL to $PTII/ptolemy/data/expr/UtilityFunction.java and modify $PTII/ptolemy/actor/lib/javasound/AudioReader.java to use it.
    cxh@cooley 161% cvs diff -c -D yesterday UtilityFunctions.java
    Index: UtilityFunctions.java
    ===================================================================
    RCS file: /home/cvs/ptII/ptolemy/data/expr/UtilityFunctions.java,v
    retrieving revision 1.41
    retrieving revision 1.39.2.3
    diff -c -r1.41 -r1.39.2.3
    *** UtilityFunctions.java	2002/04/30 16:05:04	1.41
    --- UtilityFunctions.java	2002/08/27 00:42:36	1.39.2.3
    ***************
    *** 62,68 ****
      types of the arguments.
      
      @author  Neil Smyth, Christopher Hylands, Bart Kienhuis, Edward A. Lee
    ! @version $Id$
      @since Ptolemy II 0.2
      */
      public class UtilityFunctions {
    --- 62,68 ----
      types of the arguments.
      
      @author  Neil Smyth, Christopher Hylands, Bart Kienhuis, Edward A. Lee
    ! @version $Id$
      @since Ptolemy II 0.2
      */
      public class UtilityFunctions {
    ***************
    *** 140,145 ****
    --- 140,148 ----
           *  then this property might not be set, in which case we look
           *  for "ptolemy/kernel/util/NamedObj.class" and set the
           *  property accordingly.
    +      *  <dt> "ptolemy.ptII.dirAsURL"
    +      *  <dd> Return $PTII as a URL.  For example, if $PTII was c:\ptII,
    +      *  then return file:/c:/ptII/.
           *  </dl>
           *  @param propertyName The name of property.
           *  @return A String containing the string value of the property.
    ***************
    *** 161,166 ****
    --- 164,185 ----
      	if (property != null) {
      	    return property;
      	}
    + 	if (propertyName.equals("ptolemy.ptII.dirAsURL")) {
    +             // Return $PTII as a URL.  For example, if $PTII was c:\ptII,
    +             // then return file:/c:/ptII/
    +             File ptIIAsFile = new File(getProperty("ptolemy.ptII.dir"));
    +             
    +             try {
    +                 URL ptIIAsURL = ptIIAsFile.toURL();
    +                 return ptIIAsURL.toString();
    +             } catch (java.net.MalformedURLException malformed) {
    +                 throw new InternalErrorException(null, malformed,
    +                         "While trying to find '" + propertyName 
    +                         + "', could not convert '"
    +                         + ptIIAsFile + "' to a URL");
    +             }
    +         }
    + 
      	if (propertyName.equals("ptolemy.ptII.dir")) {
      
      	    String namedObjPath = "ptolemy/kernel/util/NamedObj.class";
    cxh@cooley 162% 
    
    cxh@cooley 152% cvs diff -c -D yesterday AudioReader.java
    Index: AudioReader.java
    ===================================================================
    RCS file: /home/cvs/ptII/ptolemy/actor/lib/javasound/AudioReader.java,v
    retrieving revision 1.21
    retrieving revision 1.19.2.3
    diff -c -r1.21 -r1.19.2.3
    *** AudioReader.java	2002/05/17 22:29:59	1.21
    --- AudioReader.java	2002/08/27 00:44:10	1.19.2.3
    ***************
    *** 92,98 ****
      

    Note: Requires Java 2 v1.3.0 or later. @author Brian K. Vogel, Christopher Hylands ! @version $Id$ @since Ptolemy II 1.0 @see ptolemy.media.javasound.LiveSound @see SoundWriter --- 92,98 ----

    Note: Requires Java 2 v1.3.0 or later. @author Brian K. Vogel, Christopher Hylands ! @version $Id$ @since Ptolemy II 1.0 @see ptolemy.media.javasound.LiveSound @see SoundWriter *************** *** 113,121 **** public AudioReader(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException { super(container, name); ! sourceURL.setExpression("\"file://\" " ! + "+ property(\"ptolemy.ptII.dir\") " ! + "+ \"/ptolemy/actor/lib/javasound/" + "test/voice.wav\""); } --- 113,122 ---- public AudioReader(CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException { super(container, name); ! // The property() method is defined in ! // ptolemy.data.expr.UtilityFunctions.java ! sourceURL.setExpression("property(\"ptolemy.ptII.dirAsURL\") " ! + "+ \"ptolemy/actor/lib/javasound/" + "test/voice.wav\""); } cxh@cooley 153%

    ViewScreen

    The GR ViewScreen actor may display a black image. The fix is to patch ptII/ptolemy/domains/gr/lib/ViewScreen.java: Change this
    ***************
    *** 265,271 ****
              while (branches.hasMoreElements()) {
                  BranchGroup branchGroup = (BranchGroup) branches.nextElement();
                  if (branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) {
    !                 simpleUniverse.getLocale().removeBranchGraph(branchGroup);
                  }
              }
      
    
    
    to
    --- 265,274 ----
              while (branches.hasMoreElements()) {
                  BranchGroup branchGroup = (BranchGroup) branches.nextElement();
                  if (branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) {
    !                 if (!(branchGroup instanceof
    !                             com.sun.j3d.utils.universe.ViewingPlatform)) {
    !                     simpleUniverse.getLocale().removeBranchGraph(branchGroup);
    !                 }
                  }
              }
    
    If you downloaded the source version, you can edit the file yourself or download a fixed version of ViewScreen.java and recompile with:
    cd $PTII/ptolemy/domains/gr/lib
    make
    
    If you downloaded the Windows installer, then you can download experimentalDomains.zip uncompress it, which will create experimentalDomains.jar and replace Ptolemy_II_2.0.1/ptolemy/domains/experimentalDomains.jar with the new version.
    Usually, the file to be replaced will be at c:/Ptolemy/Ptolemy_II_2.0.1/ptolemy/domains/experimentalDomains.jar

    This bug was reported by Jim Kleckner.

    Here is how to I replicated the bug:

    1. On a Window XP laptop, uninstalled all previous versions of the Java SDK, JRE and Java 3d.
    2. Rebooted
    3. Installed Java 1.4.1_01 SDK
    4. Installed Java 3d 1.3 Direct X. Note that Java 3d 1.3.1-beta is also available
    5. Installed Ptolemy II 2.0.1 by using the Windows installer.
    6. Ran the GR demos, the demos run, but nothing but a black window is displayed.

    User Interface Limitations

    Renaming Ports

    On 9/11/02, in comp.soft-sys.ptolemy, Devin Baker Pratt from BYU writes:
    I've been consistently having problems renaming ports from Vergil. When I click on a port and try to rename it I always get this stack trace (note it only shows up in my terminal, Vergil doesn't tell me anything):
    Exception occurred during event dispatching:
     java.util.NoSuchElementException: No item named "Show name" in the query box.
         at ptolemy.gui.Query.booleanValue(Query.java:409)
         at ptolemy.actor.gui.RenameConfigurer.apply(RenameConfigurer.java:128)
         at ptolemy.actor.gui.RenameDialog._handleClosing(RenameDialog.java:71)
         at ptolemy.gui.ComponentDialog$1.propertyChange(ComponentDialog.java:200)
         at  javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:156)
    
    The name of the port remains unchanged. This error occurred in 2.0beta and 2.0.1.

    Is there something I'm doing wrong? So far the only way I've come across to rename a port is to edit the xml.

    Yep, this is a bug, below is a patch to PtolemyII2.0.1 Basically, what happened is that in the devel tree, there is a facility that allows the user to show the name of the port by right clicking on a port and selecting 'Customize Name' The Rename port window has a 'Show Name' check box for whether the name is displayed. Unfortunately, at the time we did the code split, there was a problem where the name was displayed twice, so we removed this facility from the release branch. (I think the problem is now fixed in the devel tree, but folding that change into the release tree would be very difficult.) When we pulled out the 'Show Name' facility we introduced this bug that you are seeing now.

    cxh@DOPLAP03 /cygdrive/c/ptII2.0.2/ptolemy/actor/gui
    $ cvs diff -c RenameConfigurer.java
    Index: RenameConfigurer.java
    ===================================================================
    RCS file: /home/cvs/ptII/ptolemy/actor/gui/RenameConfigurer.java,v
    retrieving revision 1.10.2.1
    diff -c -r1.10.2.1 RenameConfigurer.java
    *** RenameConfigurer.java       2002/04/08 16:49:17     1.10.2.1
    --- RenameConfigurer.java       2002/09/11 15:42:29
    ***************
    *** 125,131 ****
                  moml.append(newName);
                  moml.append("\"/>");
                  // Remove or show name.
    !             boolean showName = booleanValue("Show name");
                  if (_object instanceof Port) {
                      if (showName) {
                          moml.append("<property name=\"_showName\" "
    --- 125,140 ----
                  moml.append(newName);
                  moml.append("\"/>");
                  // Remove or show name.
    !             boolean showName = false;
    !             if (!(_object instanceof Port)) {
    !                 // FIXME: There is a bug in diva that results in the
    !                 // port name being displayed twice if Show Name is selected.
    !                 // John Reekie thinks it is because there is one too many
    !                 // Listeners.  So for Ptolemy II 2.0.2, we comment
    !                 // this out so that if the object is a port, we
    !                 // do not show the name.
    !                 showName = booleanValue("Show name");
    !             }
                  if (_object instanceof Port) {
                      if (showName) {
                          moml.append("<property name=\"_showName\" "
    
    cxh@DOPLAP03 /cygdrive/c/ptII2.0.2/ptolemy/actor/gui
    $
    
    

    Edit Styles button does not do anything

    If you double click on an actor that has parameters, then the 'Edit Parameters' window comes up. That window has an 'Edit Styles' button. In Ptolemy II 2.0.1, that button does not do anything, a fix is below.

    The reason the bug occurred is because the development tree includes a file chooser style that was incomplete, so it did not ship with the release.

    The change below to ptII2.0.1/ptolemy/actor/gui/style/StyleConfigurer.java fixes this bug.

    cxh@DOPLAP03 /cygdrive/c/ptII2.0.2/ptolemy/actor/gui/style
    $ cvs diff -c StyleConfigurer.java
    Index: StyleConfigurer.java
    ===================================================================
    RCS file: /home/cvs/ptII/ptolemy/actor/gui/style/StyleConfigurer.java,v
    retrieving revision 1.17.2.1
    diff -c -r1.17.2.1 StyleConfigurer.java
    *** StyleConfigurer.java        2002/02/25 17:56:42     1.17.2.1
    --- StyleConfigurer.java        2002/09/11 15:59:18
    ***************
    *** 95,101 ****
                // existing styles).
                  // Don't ship with the FileChooser enabled.
                // parameterStyles = new ParameterEditorStyle[5];
    !           // parameterStyles = new ParameterEditorStyle[4];
                parameterStyles[0] = new LineStyle();
                parameterStyles[0].setName("Line");
                parameterStyles[1] = new CheckBoxStyle();
    --- 95,101 ----
                // existing styles).
                  // Don't ship with the FileChooser enabled.
                // parameterStyles = new ParameterEditorStyle[5];
    !           parameterStyles = new ParameterEditorStyle[4];
                parameterStyles[0] = new LineStyle();
                parameterStyles[0].setName("Line");
                parameterStyles[1] = new CheckBoxStyle();
    
    cxh@DOPLAP03 /cygdrive/c/ptII2.0.2/ptolemy/actor/gui/style
    $
    

    MacOS X Limitations

    The CT specific actors tree widget fails to open
    Exception occurred during event dispatching
    java.awt.AWTError: Finish this
      at com.apple.mrj.internal.awt.graphics.setRGBPen.drawImage(setRGBPen.java:300)
      at com.apple.mrj.internal.awt.graphics.PenGraphics.drawImage(PenGraphics.java:420)
    
    
    This occurs under MacOS 10.1.5 with Java 1.3.1