HyVisual startup problem [was Re: HyVisual 2.2-beta available for download ]

2003-03-13 Thread Christopher Hylands

I'd heard of this bug, but until now had never been able to reproduce
it. 

Steve Neuendorffer noticed a similar problem, he wrote:

 I just noticed that the shortcut to the original version of hyvisual
 failed to start beta-3.  I got an error like -hyvisual failed to
 find configuration...

 It seems like the new version of the Jar overwrote the old version
 of the Jar, but didn't fix up the shortcut?  Is there a way to

 1) prevent destroying the old version if the new version will break
 the shortcut or

 2) automatically fix the shortcut to use the new version?

I initially thought the problem was caused by upgrading from
HyVisual 2.2-beta-2 to 2.2-beta-3

Because I was never able to reproduce the bug, there was not much I
could do locally.

This morning, I was finally able to reproduce the bug.  I'm not sure
what changed.

I'm not sure what the cause is.  What is happening is that the
MoMLApplication.specToURL() method in HyVisual is failing to find its
configuration in ptolemy/configs/hyvisual/configuration.xml, so it is
falling back to looking for ptolemy/configs/full/configuration.xml and
failing there as well.

The way that MoMLApplication.specToURL() works is that it takes
a string like ptolemy/configuration/hyvisual/configuration.xml
and tries various ways to look for it and eventually returns a URL.

In HyVisual, we use the ClassLoader.getResource() method to look up
the resource in the classpath with code like:

specURL = Thread.currentThread()
.getContextClassLoader().getResource(spec);

It looked to me like the above code was failing to find the resource
for some reason, even though I could see that the resource was in the
appropriate jar file on the website. 

I checked in a new ptsupport.jar file that seems to work.
Unfortunately, I'm not sure why.  The only change was me adding
some debugging statements to MoMLApplication.specToURL().
Perhaps there was some sort of corruption in the ptsupport.jar file,
but diffing the two files does not indicate any problem.

One potential cause could be that our code signing certificate was
updated recently, but I would think the error would manifest itself in
a different fashion if there were certificate problems.

To get the new version, you may need to access the JNLP file
on the website twice.  This is because of a peculiarity in Web Start
where the first time it notices that there is a new jar file and the
second time it actually gets the jar file.

The JNLP file is at
http://ptolemy.eecs.berkeley.edu/ptolemyII/hyvisual2.2/jnlp/vergilHyVisual.jnlp 
As always with Web Start, if you run in to problems, it is worth
starting up the Web Start console app and clearing the cache.
Under Windows, the Web Start console app can be found at
Start - All Programs - Java Web Start

Another thing to try is to kill any running Java processes.  I've seen
situations where a Hyvisual java process running in the background
will prevent the jar file from being updated.


-Christopher

Christopher Hylands[EMAIL PROTECTED]  University of California
Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
ph: (510)643-9841 fax:(510)642-2739   Berkeley, CA 94720-1770
home: (510)526-4010, (707)665-0131(office: 400A Cory)






I'm looking forward to using it.  I have recurring problems with 
starting the webstart version, and get the error message/stack trace 
below.   Has anyone else encountered this?

Regards,
Scott 

java.io.IOException: File not found: 
ptolemy/configs/full/configuration.xml
at ptolemy.actor.gui.MoMLApplication.specToURL
(MoMLApplication.java:294)
at ptolemy.vergil.VergilApplication._createDefaultConfiguration
(VergilApplication.java:238)
at ptolemy.actor.gui.MoMLApplication._parseArgs
(MoMLApplication.java:474)
at ptolemy.vergil.VergilApplication._parseArgs
(VergilApplication.java:367)
at ptolemy.actor.gui.MoMLApplication.init
(MoMLApplication.java:143)
at ptolemy.vergil.VergilApplication.init
(VergilApplication.java:110)
at ptolemy.vergil.VergilApplication$1.run
(VergilApplication.java:132)
at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)


In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 HyVisual 2.2-beta is available for download from
 

Re: Which domain to use when simulating A/D and DSP behaviour?

2003-03-13 Thread Christopher Hylands
Jie Liu responded, but his email bounced because he sent it from an
address that is not on the ptolemy-hackers mailing list.

Jie's response was:
 It really depends on at what level of detail you want to model
 your system. My guess is that you can use CT and TM.
 There are a couple of existing demos that you may find useful:
 - SigmaDelta demo in domain/ct/demo/SigmaDelta that shows how
to do sampling and quantization
 - Two simple tasks demo in domain/tm/demo/SimpleTasks that shows
a basic way to use TM, including priority assignment and execution
 time specification.


 Hope it helps,
 Jie
[EMAIL PROTECTED] (Andreas) wrote:


Hi all,
I'm thinking of leaving Matlab/Simulink in favour of Ptolemy cause
there is problems when running parts of a model with different speeds.
My question is which domain (SDF,PN,DE etc) I should use to 
simulate an analog signal being discretized and quantified in an ADC
and then processed in a DSP with different two tasks running at 2900
Hz and 1000 Hz. The faster task having higher priority. I guess this
kind of simulation must contain processes running independently.
Any suggestion how this should be done in Ptolemy?
brgds
Andreas



Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]


StructureToken version of RecordToken?

2003-03-13 Thread Jim Kleckner
Beg pardon if this has been hashed over before.

While reading the Data Package section of the design
document and thinking about coupling Java code with
simulation code, it occurred to me that Java class
implementations that satisfy the properties of
immutability could be passed around and accessed in
expressions if they were made accessible from a
subclass of RecordToken.  Let's call it
StructureToken since ObjectToken is already claimed.
I have a number of classes that implement structures
that might be made visible in this way.
Comments?

Jim




Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]


Token as an abstract base class?

2003-03-13 Thread Jim Kleckner
Token seems like an excellent candidate to
be an abstract base class since the documentation
states that it should not be instantiated.
Any reason to not do that?

Jim




Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]


Re: Token as an abstract base class?

2003-03-13 Thread Stephen Andrew Neuendorffer
Originally, token was intended to be used as a token to represent a pure 
event  i.e. one without a value.
At the same time it was a base class for all the other token classes.  We 
have since made an EventToken
class to represent pure events.  It remains public for some level of 
backward compatibility.

Generally, we have not pushed to make classes abstract, since concrete base 
classes allow for testing.
We've also avoided making classes final that we don't intend to extend 
simply (e.g. most actors)
because we don't want to restrict others who use the code too much.

Steve

At 05:17 PM 3/13/2003 -0800, Jim Kleckner wrote:
Token seems like an excellent candidate to
be an abstract base class since the documentation
states that it should not be instantiated.
Any reason to not do that?

Jim




Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]



Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]