<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
BTW - one other issue with the early access release of 1.7 for Mac
OS X.<br>
<br>
ptolemy/actor/gui/BrowserLauncher.java was failing under Mac OS X:<br>
<br>
<br>
63047 | cxh | 2012-02-29 12:02:19 -0800 (Wed, 29 Feb 2012) | 2 lines<br>
<br>
Java build 1.7.0_04-ea-b11 does not have the mrj.version property
set.<br>
<br>
Below is the diff.<br>
<br>
_Christopher<br>
<br>
bash-3.2$ svn diff -r 62818
~/ptII/ptolemy/actor/gui/BrowserLauncher.java<br>
Index: /Users/cxh/ptII/ptolemy/actor/gui/BrowserLauncher.java<br>
===================================================================<br>
--- /Users/cxh/ptII/ptolemy/actor/gui/BrowserLauncher.java
(revision 62818)<br>
+++ /Users/cxh/ptII/ptolemy/actor/gui/BrowserLauncher.java
(working copy)<br>
@@ -616,33 +616,38 @@<br>
<br>
if (osName.startsWith("Mac OS")) {<br>
String mrjVersion = System.getProperty("mrj.version");<br>
- String majorMRJVersion = mrjVersion.substring(0, 3);<br>
+ if (mrjVersion == null) {<br>
+ // Java build 1.7.0_04-ea-b11 does not have the
mrj.version property set.<br>
+ jvm = MRJ_3_1;<br>
+ } else {<br>
+ String majorMRJVersion = mrjVersion.substring(0,
3);<br>
<br>
- try {<br>
- double version =
Double.valueOf(majorMRJVersion).doubleValue();<br>
+ try {<br>
+ double version =
Double.valueOf(majorMRJVersion).doubleValue();<br>
<br>
- if (version == 2) {<br>
- jvm = MRJ_2_0;<br>
- } else if ((version >= 2.1) && (version
< 3)) {<br>
- // Assume that all 2.x versions of MRJ work the<br>
- // same. MRJ 2.1 actually works via<br>
- // Runtime.exec() and 2.2 supports that but has
an<br>
- // openURL() method as well that we currently<br>
- // ignore.<br>
- jvm = MRJ_2_1;<br>
- } else if (version == 3.0) {<br>
- jvm = MRJ_3_0;<br>
- } else if (version >= 3.1) {<br>
- // Assume that all 3.1 and later versions of
MRJ<br>
- // work the same.<br>
- jvm = MRJ_3_1;<br>
- } else {<br>
+ if (version == 2) {<br>
+ jvm = MRJ_2_0;<br>
+ } else if ((version >= 2.1) &&
(version < 3)) {<br>
+ // Assume that all 2.x versions of MRJ work
the<br>
+ // same. MRJ 2.1 actually works via<br>
+ // Runtime.exec() and 2.2 supports that but
has an<br>
+ // openURL() method as well that we
currently<br>
+ // ignore.<br>
+ jvm = MRJ_2_1;<br>
+ } else if (version == 3.0) {<br>
+ jvm = MRJ_3_0;<br>
+ } else if (version >= 3.1) {<br>
+ // Assume that all 3.1 and later versions
of MRJ<br>
+ // work the same.<br>
+ jvm = MRJ_3_1;<br>
+ } else {<br>
+ loadedWithoutErrors = false;<br>
+ errorMessage = "Unsupported MRJ version: "
+ version;<br>
+ }<br>
+ } catch (NumberFormatException nfe) {<br>
loadedWithoutErrors = false;<br>
- errorMessage = "Unsupported MRJ version: " +
version;<br>
+ errorMessage = "Invalid MRJ version: " +
mrjVersion;<br>
}<br>
- } catch (NumberFormatException nfe) {<br>
- loadedWithoutErrors = false;<br>
- errorMessage = "Invalid MRJ version: " +
mrjVersion;<br>
}<br>
} else if (osName.startsWith("Windows")) {<br>
if (osName.indexOf("9") != -1) {<br>
bash-3.2$ <br>
<br>
<br>
<br>
On 2/17/12 11:40 AM, Christopher Brooks wrote:
<blockquote cite="mid:4F3EAD43.9080502@eecs.berkeley.edu"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Waiting sounds good.<br>
It would be good if a few Kepler developers would switch over to
Java 1.7, especially Windows.<br>
<br>
Under Mac OS X, I downloaded Java 1.7 and updated ~/.bash_profile:<br>
export
JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home<br>
export PATH=${JAVA_HOME}/bin:${PATH}<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
export ANT_OPTS=-Xmx2048m<br>
<br>
However, 'ant run' fails for me in the devel tree, even with 4g of
space. I get<br>
[compile] The system is out of resources.<br>
[compile] Consult the following stack trace for details.<br>
[compile] java.lang.OutOfMemoryError: Java heap space<br>
<br>
I don't have time to track this down today.<br>
<br>
Under Mac OS X, Java 1.7 produces the following stacktrace when I
start up Ptolemy II:<br>
This has been reported to Oracle, see<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://osdir.com/ml/macosx-port-development-java/2012-01/msg00201.html">http://osdir.com/ml/macosx-port-development-java/2012-01/msg00201.html</a><br>
and<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7130377">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7130377</a><br>
Unfortunately, I can't log in to the Oracle/sun bug site and vote
on the bug.<br>
<br>
_Christopher<br>
<blockquote type="cite">2012-02-17 10:34:48.279 java[3279:707] ***
-[__NSArrayM insertObject:atIndex:]: object cannot be nil<br>
2012-02-17 10:34:48.281 java[3279:707] (<br>
0 CoreFoundation 0x00007fff8ba44fc6
__exceptionPreprocess + 198<br>
1 libobjc.A.dylib 0x00007fff8e1acd5e
objc_exception_throw + 43<br>
2 CoreFoundation 0x00007fff8b9ebda8
-[__NSArrayM insertObject:atIndex:] + 296<br>
3 AppKit 0x00007fff8a0a6ca1
-[NSMenu insertItem:atIndex:] + 478<br>
4 liblwawt.dylib 0x0000000163c46275
addMenuItem + 185<br>
5 liblwawt.dylib 0x0000000163c45f66
-[ApplicationDelegate _updatePreferencesMenu:enabled:] + 211<br>
6 liblwawt.dylib 0x0000000163c46542
__Java_com_apple_eawt__1AppMenuBarHandler_nativeSetMenuState_block_invoke_1
+ 227<br>
7 JavaNativeFoundation 0x0000000162e1d5fd
+[JNFRunLoop _performCopiedBlock:] + 20<br>
8 CoreFoundation 0x00007fff8ba6ee0d
+[NSObject performSelector:withObject:] + 61<br>
9 Foundation 0x00007fff8fde3d94
__NSThreadPerformPerform + 214<br>
10 CoreFoundation 0x00007fff8b9b36e1
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17<br>
11 CoreFoundation 0x00007fff8b9b2f4d
__CFRunLoopDoSources0 + 253<br>
12 CoreFoundation 0x00007fff8b9d9d39
__CFRunLoopRun + 905<br>
13 CoreFoundation 0x00007fff8b9d9676
CFRunLoopRunSpecific + 230<br>
14 HIToolbox 0x00007fff9564631f
RunCurrentEventLoopInMode + 277<br>
15 HIToolbox 0x00007fff9564d5c9
ReceiveNextEventCommon + 355<br>
16 HIToolbox 0x00007fff9564d456
BlockUntilNextEventMatchingListInMode + 62<br>
17 AppKit 0x00007fff8a08ff5d
_DPSNextEvent + 659<br>
18 AppKit 0x00007fff8a08f861
-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
+ 135<br>
19 libosxapp.dylib 0x0000000163ce482c
-[NSApplicationAWT
nextEventMatchingMask:untilDate:inMode:dequeue:] + 124<br>
20 AppKit 0x00007fff8a08c19d
-[NSApplication run] + 470<br>
21 libosxapp.dylib 0x0000000163ce474b
+[NSApplicationAWT runAWTLoopWithApp:] + 156<br>
22 liblwawt.dylib 0x0000000163c4440e
-[AWTStarter starter:] + 1616<br>
23 CoreFoundation 0x00007fff8ba3475d
-[NSObject performSelector:withObject:] + 61<br>
24 Foundation 0x00007fff8fde3d94
__NSThreadPerformPerform + 214<br>
25 CoreFoundation 0x00007fff8b9b36e1
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17<br>
26 CoreFoundation 0x00007fff8b9b2f4d
__CFRunLoopDoSources0 + 253<br>
27 CoreFoundation 0x00007fff8b9d9d39
__CFRunLoopRun + 905<br>
28 CoreFoundation 0x00007fff8b9d9676
CFRunLoopRunSpecific + 230<br>
29 java 0x00000001073564bc
CreateExecutionEnvironment + 871<br>
30 java 0x0000000107350cac
JLI_Launch + 1952<br>
31 java 0x0000000107356819
main + 101<br>
32 java 0x0000000107350504
start + 52<br>
33 ??? 0x0000000000000007
0x0 + 7<br>
)<br>
<br>
</blockquote>
<br>
<br>
On 2/17/12 10:59 AM, Daniel Crawl wrote:
<blockquote cite="mid:4F3EA388.9010503@sdsc.edu" type="cite"> <br>
Hi Christopher, <br>
<br>
Thanks for the fix. I agree with you that it'd be good to fix
the ptII <br>
branch in svn for Kepler 2.3. Before creating a new patch
release, I <br>
would wait until we've had more time to test since there could
be <br>
additional Java 7 problems. <br>
<br>
--dan <br>
<br>
<br>
On 2/16/12 9:53 AM, Christopher Brooks wrote: <br>
<blockquote type="cite">All: <br>
It looks like the problem has to do with Java 1.7. I was able
to <br>
reproduce this on the Mac <br>
with two different early release versions of 1.7. The bug
occurs in <br>
Ptolemy II, outside of <br>
Kepler. <br>
<br>
The bug report is at <br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5574">http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5574</a>
<br>
<br>
The fix is to modify ptolemy/actor/gui/TextEditor.java to
check if <br>
_scrollbar is null: <br>
<br>
public Color getBackground() { <br>
// Under Java 1.7 on the Mac, the _scrollbar is sometimes
null. <br>
// See <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5574">http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5574</a>
<br>
if (_scrollPane != null) { <br>
return _scrollPane.getBackground(); <br>
} else { <br>
return null; <br>
} <br>
} <br>
<br>
I'm not sure why this is happening, but I suspect the problem
is that in <br>
Java 1.7 <br>
setBackground is calling getBackground on subcomponents and
the TextEditor <br>
subcomponent is not completely instantiated. <br>
<br>
There could be other places where this problem occurs. I'll
switch over <br>
to Java 1.7 and see <br>
what turned up. It would be worth running the debugger and
verifying <br>
that we are in the <br>
Swing Event Thread when the problem occurs. <br>
<br>
I'll leave it to the Kepler Team to decide how to handle this.
My <br>
proposal is that I patch the <br>
ptII branch used in the release with the above change. I'd
like to wait <br>
until a few people have exercised <br>
Kepler under 1.7 before doing so though. If we patch the ptII
tree used <br>
in Kepler-2.3, then at <br>
least people who are working from the 2.3 tree can get the
update. I'm <br>
not sure about releasing <br>
a patch release to Kepler, that is up to others. <br>
<br>
_Christopher <br>
<br>
On 2/15/12 1:34 PM, Daniel Crawl wrote: <br>
<blockquote type="cite"> <br>
Hi Edward and Daren, <br>
<br>
"Listen to Actor" is invoked from the context menu on the
canvas, <br>
and the exception is also thrown when double-clicking on the
Python <br>
Actor to edit the script. These are probably run from the
Swing <br>
event thread. <br>
<br>
Daren, thanks for verifying this problem occurs with Java 7
but not 6. <br>
I updated Kepler a few months ago so that it would compile
with Java 7. <br>
However, when I ran it, I didn't exhaustively test all the <br>
functionality. I'll create bug report so this error is not
forgotten. <br>
<br>
--dan <br>
<br>
<br>
On 2/14/12 11:59 PM, Daren Thomas wrote: <br>
<blockquote type="cite">i resolved this issue temporarily by
uninstalling java 7, thus <br>
ensuring java 6 is being used. it all works fine now. hope
that helps! <br>
<br>
daren <br>
<br>
On 15.02.2012, at 00:51, "Edward A. Lee"<a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:eal@eecs.berkeley.edu"><eal@eecs.berkeley.edu></a>
wrote: <br>
<br>
<blockquote type="cite"> <br>
This sort of thing can happen for GUI code that invoked
outside <br>
the Swing event thread. How is this being invoked? If
it's just <br>
from the menu, then I presume it is in the Swing event
thread... <br>
<br>
Edward <br>
<br>
<br>
On 2/14/12 11:29 AM, Daniel Crawl wrote: <br>
<blockquote type="cite"> <br>
Hi Daren, <br>
<br>
I get the same behavior with Windows 7. The error is
the same for <br>
both "Listen to Actor" and editing a Python script: <br>
<br>
java.lang.NullPointerException <br>
at
ptolemy.actor.gui.TextEditor.getBackground(TextEditor.java:144)
<br>
at java.awt.Window.setBackground(Unknown Source) <br>
at java.awt.Frame.setBackground(Unknown Source) <br>
at ptolemy.gui.Top.access$1001(Top.java:141) <br>
at
ptolemy.gui.Top$SetBackgroundRunnable.run(Top.java:1889)
<br>
at ptolemy.gui.Top.deferIfNecessary(Top.java:247) <br>
at ptolemy.gui.Top.setBackground(Top.java:501) <br>
at
ptolemy.actor.gui.TextEditor.setBackground(TextEditor.java:238)
<br>
... <br>
<br>
Christopher, do you know what causes this? <br>
<br>
Thanks, <br>
<br>
--dan <br>
<br>
<br>
On 2/8/12 4:28 AM, Daren Thomas wrote: <br>
<blockquote type="cite">I can use "Listen to Actor"
for Kepler 2.3 on Mac OS X, but not under <br>
Windows. When I select the option from the context
menu, nothing <br>
happens. <br>
<br>
Also, when I try to edit a script for the Python
actor, I get an <br>
error <br>
message "Failed to open a dialog to edit the target
(null)" - this <br>
doesn't bother me ATM, but I guess I should mention
it, as it <br>
could be <br>
an additional symptom of a wrongly configured
system. <br>
<br>
I installed Kepler 2.3 on Windows with the installer
provided on the <br>
website. It seems "all" questions in the users list
refer to <br>
compiling <br>
your own version/environment. Is that the way to go?
<br>
<br>
Regards, <br>
Daren Thomas <br>
_______________________________________________ <br>
Kepler-users mailing list <br>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
<br>
<br>
</blockquote>
_______________________________________________ <br>
Kepler-users mailing list <br>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
<br>
</blockquote>
<eal.vcf> <br>
</blockquote>
<br>
</blockquote>
<br>
_______________________________________________ <br>
Kepler-users mailing list <br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Christopher Brooks, PMP University of California
CHESS Executive Director US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
ph: 510.643.9841 (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670 </pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kepler-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Christopher Brooks, PMP University of California
CHESS Executive Director US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
ph: 510.643.9841 (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670 </pre>
</body>
</html>