Waiting sounds good.
It would be good if a few Kepler developers would switch over to Java 1.7, especially Windows.

Under Mac OS X, I downloaded Java 1.7 and updated ~/.bash_profile:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
  export PATH=${JAVA_HOME}/bin:${PATH}
  export ANT_OPTS=-Xmx2048m

However, 'ant run' fails for me in the devel tree, even with 4g of space. I get
  [compile] The system is out of resources.
  [compile] Consult the following stack trace for details.
  [compile] java.lang.OutOfMemoryError: Java heap space

I don't have time to track this down today.

Under Mac OS X, Java 1.7 produces the following stacktrace when I start up Ptolemy II:
This has been reported to Oracle, see
http://osdir.com/ml/macosx-port-development-java/2012-01/msg00201.html
and
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7130377
Unfortunately, I can't log in to the Oracle/sun bug site and vote on the bug.

_Christopher
2012-02-17 10:34:48.279 java[3279:707] *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
2012-02-17 10:34:48.281 java[3279:707] (
0 CoreFoundation 0x00007fff8ba44fc6 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff8e1acd5e objc_exception_throw + 43 2 CoreFoundation 0x00007fff8b9ebda8 -[__NSArrayM insertObject:atIndex:] + 296 3 AppKit 0x00007fff8a0a6ca1 -[NSMenu insertItem:atIndex:] + 478 4 liblwawt.dylib 0x0000000163c46275 addMenuItem + 185 5 liblwawt.dylib 0x0000000163c45f66 -[ApplicationDelegate _updatePreferencesMenu:enabled:] + 211 6 liblwawt.dylib 0x0000000163c46542 __Java_com_apple_eawt__1AppMenuBarHandler_nativeSetMenuState_block_invoke_1 + 227 7 JavaNativeFoundation 0x0000000162e1d5fd +[JNFRunLoop _performCopiedBlock:] + 20 8 CoreFoundation 0x00007fff8ba6ee0d +[NSObject performSelector:withObject:] + 61 9 Foundation 0x00007fff8fde3d94 __NSThreadPerformPerform + 214 10 CoreFoundation 0x00007fff8b9b36e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 11 CoreFoundation 0x00007fff8b9b2f4d __CFRunLoopDoSources0 + 253 12 CoreFoundation 0x00007fff8b9d9d39 __CFRunLoopRun + 905 13 CoreFoundation 0x00007fff8b9d9676 CFRunLoopRunSpecific + 230 14 HIToolbox 0x00007fff9564631f RunCurrentEventLoopInMode + 277 15 HIToolbox 0x00007fff9564d5c9 ReceiveNextEventCommon + 355 16 HIToolbox 0x00007fff9564d456 BlockUntilNextEventMatchingListInMode + 62 17 AppKit 0x00007fff8a08ff5d _DPSNextEvent + 659 18 AppKit 0x00007fff8a08f861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135 19 libosxapp.dylib 0x0000000163ce482c -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124 20 AppKit 0x00007fff8a08c19d -[NSApplication run] + 470 21 libosxapp.dylib 0x0000000163ce474b +[NSApplicationAWT runAWTLoopWithApp:] + 156 22 liblwawt.dylib 0x0000000163c4440e -[AWTStarter starter:] + 1616 23 CoreFoundation 0x00007fff8ba3475d -[NSObject performSelector:withObject:] + 61 24 Foundation 0x00007fff8fde3d94 __NSThreadPerformPerform + 214 25 CoreFoundation 0x00007fff8b9b36e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 26 CoreFoundation 0x00007fff8b9b2f4d __CFRunLoopDoSources0 + 253 27 CoreFoundation 0x00007fff8b9d9d39 __CFRunLoopRun + 905 28 CoreFoundation 0x00007fff8b9d9676 CFRunLoopRunSpecific + 230 29 java 0x00000001073564bc CreateExecutionEnvironment + 871 30 java 0x0000000107350cac JLI_Launch + 1952
    31  java                                0x0000000107356819 main + 101
    32  java                                0x0000000107350504 start + 52
    33  ???                                 0x0000000000000007 0x0 + 7
)



On 2/17/12 10:59 AM, Daniel Crawl wrote:

Hi Christopher,

Thanks for the fix. I agree with you that it'd be good to fix the ptII
branch in svn for Kepler 2.3. Before creating a new patch release, I
would wait until we've had more time to test since there could be
additional Java 7 problems.

  --dan


On 2/16/12 9:53 AM, Christopher Brooks wrote:
All:
It looks like the problem has to do with Java 1.7. I was able to
reproduce this on the Mac
with two different early release versions of 1.7. The bug occurs in
Ptolemy II, outside of
Kepler.

The bug report is at

http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5574

The fix is to modify ptolemy/actor/gui/TextEditor.java to check if
_scrollbar is null:

public Color getBackground() {
// Under Java 1.7 on the Mac, the _scrollbar is sometimes null.
// See http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5574
if (_scrollPane != null) {
return _scrollPane.getBackground();
} else {
return null;
}
}

I'm not sure why this is happening, but I suspect the problem is that in
Java 1.7
setBackground is calling getBackground on subcomponents and the TextEditor
subcomponent is not completely instantiated.

There could be other places where this problem occurs. I'll switch over
to Java 1.7 and see
what turned up. It would be worth running the debugger and verifying
that we are in the
Swing Event Thread when the problem occurs.

I'll leave it to the Kepler Team to decide how to handle this. My
proposal is that I patch the
ptII branch used in the release with the above change. I'd like to wait
until a few people have exercised
Kepler under 1.7 before doing so though. If we patch the ptII tree used
in Kepler-2.3, then at
least people who are working from the 2.3 tree can get the update. I'm
not sure about releasing
a patch release to Kepler, that is up to others.

_Christopher

On 2/15/12 1:34 PM, Daniel Crawl wrote:

Hi Edward and Daren,

"Listen to Actor" is invoked from the context menu on the canvas,
and the exception is also thrown when double-clicking on the Python
Actor to edit the script. These are probably run from the Swing
event thread.

Daren, thanks for verifying this problem occurs with Java 7 but not 6.
I updated Kepler a few months ago so that it would compile with Java 7.
However, when I ran it, I didn't exhaustively test all the
functionality. I'll create bug report so this error is not forgotten.

--dan


On 2/14/12 11:59 PM, Daren Thomas wrote:
i resolved this issue temporarily by uninstalling java 7, thus
ensuring java 6 is being used. it all works fine now. hope that helps!

daren

On 15.02.2012, at 00:51, "Edward A. Lee"<e...@eecs.berkeley.edu> wrote:


This sort of thing can happen for GUI code that invoked outside
the Swing event thread. How is this being invoked? If it's just
from the menu, then I presume it is in the Swing event thread...

Edward


On 2/14/12 11:29 AM, Daniel Crawl wrote:

Hi Daren,

I get the same behavior with Windows 7. The error is the same for
both "Listen to Actor" and editing a Python script:

java.lang.NullPointerException
at ptolemy.actor.gui.TextEditor.getBackground(TextEditor.java:144)
at java.awt.Window.setBackground(Unknown Source)
at java.awt.Frame.setBackground(Unknown Source)
at ptolemy.gui.Top.access$1001(Top.java:141)
at ptolemy.gui.Top$SetBackgroundRunnable.run(Top.java:1889)
at ptolemy.gui.Top.deferIfNecessary(Top.java:247)
at ptolemy.gui.Top.setBackground(Top.java:501)
at ptolemy.actor.gui.TextEditor.setBackground(TextEditor.java:238)
...

Christopher, do you know what causes this?

Thanks,

--dan


On 2/8/12 4:28 AM, Daren Thomas wrote:
I can use "Listen to Actor" for Kepler 2.3 on Mac OS X, but not under
Windows. When I select the option from the context menu, nothing
happens.

Also, when I try to edit a script for the Python actor, I get an
error
message "Failed to open a dialog to edit the target (null)" - this
doesn't bother me ATM, but I guess I should mention it, as it
could be
an additional symptom of a wrongly configured system.

I installed Kepler 2.3 on Windows with the installer provided on the
website. It seems "all" questions in the users list refer to
compiling
your own version/environment. Is that the way to go?

Regards,
Daren Thomas
_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users
<eal.vcf>


_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users



--
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

_______________________________________________
Kepler-users mailing list
Kepler-users@kepler-project.org
http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users

Reply via email to