[kepler-dev] stack overflow problem in some kepler

Dan Higgins higgins at nceas.ucsb.edu
Mon Jul 25 10:39:48 PDT 2005


This is indeed very confusing! I was able to open the workflow with the 
release version of Ptolemy 5.0 on 2 other computers (one a PC and one a 
Mac). I could also open it on a PC with PTII from the head of CVS. 
However, I cannot open it in Kepler.

Dan

Edward A. Lee wrote:

>
> I am not able to open it with the JPG in the same directory as
> the MoML file...  I no longer get the stack overflow error (since
> I fixed diva), but I now get an "error" image instead of the JPG.
>
> This is very confusing... Christopher?  Ideas about why Java
> would sometimes fail to open this file? In the usual Java fashion,
> there is no useful error message or exception that I can find...
> The ImageObserver just returns an ERROR flag.
>
> Edward
>
> At 05:20 PM 7/24/2005 -0700, Dan Higgins wrote:
>
>> Christopher and Edward,
>>
>>     I did some additonal checks of my own and get some confusing 
>> results compared to yours!  I looked at Efrat's moml example 
>> (testIcon.xml) and noted that the path to her xslt.jpg is 
>> kepler-specific, as are several properties. I revised it (see 
>> attached 'testIcon1.xml') so that that the referenced jpg is assumed 
>> in the same directory as the moml file. I then tried opening 
>> testIcon1.xml from Ptolemy II version 5.0 (just downloaded from the 
>> Ptolemy web site). And the workflow opens up just fine! (see image 
>> below). If the path to the jpg is incorrect (i.e. to a location that 
>> does not contain the jpg) then I get the stack overflow error (with 
>> the released version of PT5).  This would seem to indicate that there 
>> is nothing wrong with the jpg itself and java can read and display 
>> the sample jpg file in at least some circumstances.
>>
>>      Plaes let me know it you can open the attached testIcon1.xml 
>> when the jpg is in the same directory as the moml file.
>>
>> Dan
>>
>>
>> from PTII version 5
>>
>>
>> Christopher Brooks wrote:
>>
>>>
>>>
>>> I went ahead and updated diva.jar.
>>>
>>> Three comments:
>>>
>>> 1)  InstallShield 6.0, the expensive ($1500/year) commercial
>>> program we use to build installers has a great bug where if the splash
>>> screen jpg is corrupt, then YOU CAN'T SAVE THE INSTALLER PROJECT.
>>> Obviously, this is totally lame.  It kept me going for 90 minutes last
>>> week.  I reported this as a bug, but I have not yet verified if
>>> this problem exists in InstallShield 7.0.  The upshot is that these
>>> image loading bugs are everywhere, and really a product of Java.
>>>
>>> 2)  Last week when I updated diva.jar, I mentioned that I thought that
>>> Ptolemy started up much faster with jar files than with .class files.
>>> When I was running all demos on Thursday, it seemed like the
>>> Web Start version brought up all the demos much more quickly than
>>> the Windows Installer version.  The primary difference is that the
>>> Web Start version is 100% jar file based, whereas the Windows
>>> Installer version reads the demos from disk.  This could also relate
>>> to the icon issue I alluded to last week.  More experiments are
>>> needed.
>>>
>>>
>>> 3) On Monday, I'm going to try to move the ptII cvs repository over to
>>> the new server.  More news as it develops.
>>>
>>> _Christopher
>>>
>>>
>>>
>>>
>>> --------
>>>
>>>
>>>     I get the stack overflow error with Ptolemy II, so it isn't a 
>>> Kepler
>>>     problem...
>>>
>>>     I've checked in a (partial) fix to diva.  Turns out diva's class
>>>     diva.canvas.toolbox.ImageFigure had a bug where if Java fails to 
>>> load
>>>     a JPG file with an error, it would get a stack overflow.
>>>
>>>     My fix is to replace the image with a generic error image.
>>>
>>>     Christopher: Can you update the diva jar?
>>>
>>>     The reason that this is only a partial fix is that I have
>>>     no idea why Java would fail to load your JPG file.  Other programs
>>>     can load it without error...
>>>
>>>     Edward
>>>
>>>     At 04:51 PM 7/22/2005 -0700, Efrat Frank wrote:
>>>     >Hi Edward,
>>>     >
>>>     >I created a very simple example that uses a jpeg as a 
>>> customized icon that
>>>
>>>     >causes a stackOverflow. Attached are the workflow and the image 
>>> file.
>>>     >
>>>     >Thanks a lot,
>>>     >Efrat
>>>     >
>>>     >Edward A. Lee wrote:
>>>     >
>>>     >>
>>>     >>If you send me the MoML file with the customized icons and the 
>>> jpegs
>>>     >>for the icons, I can try to verify whether it is a Ptolemy II 
>>> problem ...
>>>     >>
>>>     >>Edward
>>>     >>
>>>     >>At 02:47 PM 7/21/2005 -0700, Efrat Frank wrote:
>>>     >>
>>>     >>>Hi Dan,
>>>     >>>
>>>     >>>Thanks a lot for looking into this and detecting the problem! 
>>> It does
>>>     >>>work fine without the customized icons.
>>>     >>>
>>>     >>>- Efrat
>>>     >>>
>>>     >>>Dan Higgins wrote:
>>>     >>>
>>>     >>> > Hi Efrat,
>>>     >>> >
>>>     >>> >    The stack overflow error that we get with the current 
>>> head of CVS
>>>     >>> > on your gravityToShp workflow has been obsessing me the 
>>> last few days
>>>     >>> > - why does it work with your saved version of Kepler and 
>>> not with the
>>>     >>> > head of CVS?
>>>     >>> >
>>>     >>> >    It turns out that the problem occurs when you try to 
>>> open the
>>>     >>> > workflow - i.e. when the workflow moml is being read. I 
>>> finally trace
>>>    d
>>>     >>> > the problem not to any actor code but to the nice icons 
>>> you added for
>>>     >>> > the XSLT actor and the Browser Display actor! (Those icons 
>>> do not
>>>     >>> > appear if those actors are simply dragged to the screen, 
>>> so I assume
>>>     >>> > you used the 'Edit Custom Icon' command.) If you go into 
>>> the moml and
>>>     >>> > remove the properties that attach the custom icons, then 
>>> the workflow
>>>     >>> > will open with the newest CVS version of Kepler!!!  [The
>>>     >>> > registrationModel workflow had a similar problem that is 
>>> fixed by
>>>     >>> > removing the custom icons.]
>>>     >>> >
>>>     >>> >    Now, I don't know why the custom icons cause this 
>>> problem (perhaps
>>>     >>> > some changes in the moml parsing?), but at least we know 
>>> better where
>>>     >>> > to look!
>>>     >>> >
>>>     >>> > Dan
>>>     >>> >
>>>     >>>_______________________________________________
>>>     >>>Kepler-dev mailing list
>>>     
>>> >>><mailto:Kepler-dev at ecoinformatics.org>Kepler-dev at ecoinformatics.org
>>>
>>>  >>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev 
>>>
>>>     >>
>>>     >>
>>>     >>------------
>>>     >>Edward A. Lee
>>>     >>Professor, Chair of the EE Division, Associate Chair of EECS
>>>     >>231 Cory Hall, UC Berkeley, Berkeley, CA 94720
>>>     >>phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
>>>     >><mailto:eal at eecs.Berkeley.EDU>eal at eecs.Berkeley.EDU, 
>>> http://ptolemy.eecs.berkeley.edu/~eal
>>>     >
>>>     >
>>>     >
>>>     ><?xml version="1.0" standalone="no"?>
>>>     ><!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
>>>     >     "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
>>>     ><entity name="testIcon" class="ptolemy.actor.TypedCompositeActor">
>>>     >     <property name="_createdBy"
>>>     > class="ptolemy.kernel.attributes.VersionAttribute" 
>>> value="5.1-devel">
>>>     >     </property>
>>>     >     <property name="SDF Director"
>>>     > class="ptolemy.domains.sdf.kernel.SDFDirector">
>>>     >         <property name="entityId" 
>>> class="org.kepler.moml.NamedObjId"
>>>     > value="urn:lsid:ecoinformatics.org:kepler.300.1">
>>>     >         </property>
>>>     >         <property name="_location" 
>>> class="ptolemy.kernel.util.Location"
>>>     > value="[180.0, 135.0]">
>>>     >         </property>
>>>     >     </property>
>>>     >     <property name="_windowProperties"
>>>     > class="ptolemy.actor.gui.WindowPropertiesAttribute" 
>>> value="{bounds={279,
>>>     > 125, 841, 800}, maximized=false}">
>>>     >     </property>
>>>     >     <property name="_vergilSize" 
>>> class="ptolemy.actor.gui.SizeAttribute"
>>>     > value="[600, 655]">
>>>     >     </property>
>>>     >     <property name="_vergilZoomFactor"
>>>     > class="ptolemy.data.expr.ExpertParameter" value="1.0">
>>>     >     </property>
>>>     >     <property name="_vergilCenter"
>>>     > class="ptolemy.data.expr.ExpertParameter" value="{300.0, 327.5}">
>>>     >     </property>
>>>     >     <entity name="Constant" class="ptolemy.actor.lib.Const">
>>>     >         <property name="entityId" 
>>> class="org.kepler.moml.NamedObjId"
>>>     > value="urn:lsid:localhost:actor:101:1">
>>>     >         </property>
>>>     >         <property name="semanticType" 
>>> class="org.kepler.sms.SemanticType"
>>>
>>>     > value="urn:lsid:lsid.ecoinformatics.org:onto:1:1#ConstantActor">
>>>     >         </property>
>>>     >         <property name="_icon" 
>>> class="ptolemy.vergil.icon.BoxedValueIcon"
>>>    >
>>>     >             <property name="attributeName"
>>>     > class="ptolemy.kernel.util.StringAttribute" value="value">
>>>     >             </property>
>>>     >             <property name="displayWidth"
>>>     > class="ptolemy.data.expr.Parameter" value="40">
>>>     >             </property>
>>>     >         </property>
>>>     >         <property name="_location" 
>>> class="ptolemy.kernel.util.Location"
>>>     > value="[185.0, 250.0]">
>>>     >         </property>
>>>     >     </entity>
>>>     >     <entity name="Display" class="ptolemy.actor.lib.gui.Display">
>>>     >         <property name="_windowProperties"
>>>     > class="ptolemy.actor.gui.WindowPropertiesAttribute">
>>>     >         </property>
>>>     >         <property name="entityId" 
>>> class="org.kepler.moml.NamedObjId"
>>>     > value="urn:lsid:localhost:actor:102:1">
>>>     >         </property>
>>>     >         <property name="_location" 
>>> class="ptolemy.kernel.util.Location"
>>>     > value="{320, 250}">
>>>     >         </property>
>>>     >         <property name="_icon" 
>>> class="ptolemy.vergil.icon.EditorIcon">
>>>     >             <property name="image"
>>>     > class="ptolemy.vergil.kernel.attributes.ImageAttribute">
>>>     >                 <property name="source"
>>>     > class="ptolemy.data.expr.FileParameter" 
>>> value="../../lib/images/xslt.jpg"
>>>    >
>>>     >                 </property>
>>>     >                 <property name="_location"
>>>     > class="ptolemy.kernel.util.Location" value="[-20.0, -25.0]">
>>>     >                 </property>
>>>     >             </property>
>>>     >         </property>
>>>     >     </entity>
>>>     >     <relation name="relation" 
>>> class="ptolemy.actor.TypedIORelation">
>>>     >         <property name="width" 
>>> class="ptolemy.data.expr.Parameter" value=
>>>    "1">
>>>     >         </property>
>>>     >     </relation>
>>>     >     <link port="Constant.output" relation="relation"/>
>>>     >     <link port="Display.input" relation="relation"/>
>>>     ></entity>
>>>
>>>     ------------
>>>     Edward A. Lee
>>>     Professor, Chair of the EE Division, Associate Chair of EECS
>>>     231 Cory Hall, UC Berkeley, Berkeley, CA 94720
>>>     phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
>>>     <mailto:eal at eecs.Berkeley.EDU>eal at eecs.Berkeley.EDU, 
>>> http://ptolemy.eecs.berkeley.edu/~eal
>>>
>>>     _______________________________________________
>>>     Kepler-dev mailing list
>>>     <mailto:Kepler-dev at ecoinformatics.org>Kepler-dev at ecoinformatics.org
>>>     
>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev 
>>>
>>> --------
>>> _______________________________________________
>>> Kepler-dev mailing list
>>> <mailto:Kepler-dev at ecoinformatics.org>Kepler-dev at ecoinformatics.org
>>> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev 
>>>
>>>
>>
>>
>>
>>
>> <?xml version="1.0" standalone="no"?>
>> <!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
>>     "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
>> <entity name="testIcon" class="ptolemy.actor.TypedCompositeActor">
>>     <property name="_createdBy" 
>> class="ptolemy.kernel.attributes.VersionAttribute" value="5.1-devel">
>>     </property>
>>     <property name="SDF Director" 
>> class="ptolemy.domains.sdf.kernel.SDFDirector">
>>         <property name="_location" 
>> class="ptolemy.kernel.util.Location" value="[180.0, 135.0]">
>>         </property>
>>     </property>
>>     <property name="_windowProperties" 
>> class="ptolemy.actor.gui.WindowPropertiesAttribute" 
>> value="{bounds={279, 125, 841, 800}, maximized=false}">
>>     </property>
>>     <property name="_vergilSize" 
>> class="ptolemy.actor.gui.SizeAttribute" value="[600, 655]">
>>     </property>
>>     <property name="_vergilZoomFactor" 
>> class="ptolemy.data.expr.ExpertParameter" value="1.0">
>>     </property>
>>     <property name="_vergilCenter" 
>> class="ptolemy.data.expr.ExpertParameter" value="{300.0, 327.5}">
>>     </property>
>>     <entity name="Constant" class="ptolemy.actor.lib.Const">
>>         <property name="_icon" 
>> class="ptolemy.vergil.icon.BoxedValueIcon">
>>             <property name="attributeName" 
>> class="ptolemy.kernel.util.StringAttribute" value="value">
>>             </property>
>>             <property name="displayWidth" 
>> class="ptolemy.data.expr.Parameter" value="40">
>>             </property>
>>         </property>
>>         <property name="_location" 
>> class="ptolemy.kernel.util.Location" value="[185.0, 250.0]">
>>         </property>
>>     </entity>
>>     <entity name="Display" class="ptolemy.actor.lib.gui.Display">
>>         <property name="_windowProperties" 
>> class="ptolemy.actor.gui.WindowPropertiesAttribute">
>>         </property>
>>         <property name="_location" 
>> class="ptolemy.kernel.util.Location" value="{320, 250}">
>>         </property>
>>         <property name="_icon" class="ptolemy.vergil.icon.EditorIcon">
>>             <property name="image" 
>> class="ptolemy.vergil.kernel.attributes.ImageAttribute">
>>                 <property name="source" 
>> class="ptolemy.data.expr.FileParameter" value="xslt.jpg">
>>                 </property>
>>                 <property name="_location" 
>> class="ptolemy.kernel.util.Location" value="[-20.0, -25.0]">
>>                 </property>
>>             </property>
>>         </property>
>>     </entity>
>>     <relation name="relation" class="ptolemy.actor.TypedIORelation">
>>         <property name="width" class="ptolemy.data.expr.Parameter" 
>> value="1">
>>         </property>
>>     </relation>
>>     <link port="Constant.output" relation="relation"/>
>>     <link port="Display.input" relation="relation"/>
>> </entity>
>
>
> ------------
> Edward A. Lee
> Professor, Chair of the EE Division, Associate Chair of EECS
> 231 Cory Hall, UC Berkeley, Berkeley, CA 94720
> phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
> eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  



-- 
*******************************************************************
Dan Higgins                                  higgins at nceas.ucsb.edu
http://www.nceas.ucsb.edu/    Ph: 805-893-5127
National Center for Ecological Analysis and Synthesis (NCEAS) 
Marine Science Building - Room 3405
Santa Barbara, CA 93195
*******************************************************************



More information about the Kepler-dev mailing list