Cappuccino 0.7

16 views
Skip to first unread message

Ross Boucher

unread,
May 16, 2009, 5:59:10 PM5/16/09
to objec...@googlegroups.com
Hi Everyone,

We're getting ready to finalize and ship Cappuccino version 0.7 this
week. We would appreciate it if you could take a few minutes this
weekend to get the latest code from git, try it out, and report any
major issues.

Certainly any bugs you find can be put into the bug tracker, but in
particular we're looking for regressions or major flaws that would
prevent us from shipping. If you have a bunch of code that stops
working, that's something we definitely want to hear about.

We're looking forward to getting this into everyone's hands.

Best,
Ross

mi...@codesimple.net

unread,
May 17, 2009, 12:23:01 PM5/17/09
to Cappuccino & Objective-J
Hi,

I'm having trouble building the latest 0.7b from git on Ubuntu. First
I just did a git pull on my existing 0.7b checkout and when this
failed I tried a fresh checkout as shown below. Either way I get a
Java NPE.

I'm running Ubuntu 9.04. java --version reports:

java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu7)
OpenJDK Client VM (build 14.0-b08, mixed mode, sharing)

Here's what I get...

$ git clone git://github.com/280north/cappuccino.git
$ git checkout -b 0.7b origin/0.7b
$ rake

(in /home/mike/apps/cappuccino/source_0.7/cappuccino/Objective-J)
(in /home/mike/apps/cappuccino/source_0.7/cappuccino/Objective-J/
Tools)
(in /home/mike/apps/cappuccino/source_0.7/cappuccino/Foundation)
Exception in thread "main" java.lang.NullPointerException
at org.mozilla.javascript.ScriptableObject.getTopLevelScope
(ScriptableObject.java:1514)
at org.mozilla.javascript.ScriptRuntime.setObjectProtoAndParent
(ScriptRuntime.java:3291)
at org.mozilla.javascript.NativeJavaPackage.getPkgProperty
(NativeJavaPackage.java:166)
at org.mozilla.javascript.NativeJavaPackage.get
(NativeJavaPackage.java:105)
at org.mozilla.javascript.ScriptableObject.getProperty
(ScriptableObject.java:1575)
at org.mozilla.javascript.ScriptRuntime.getObjectProp
(ScriptRuntime.java:1397)
at org.mozilla.javascript.ScriptRuntime.getObjectProp
(ScriptRuntime.java:1383)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:
3054)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:
2484)
at org.mozilla.javascript.InterpretedFunction.call
(InterpretedFunction.java:162)
at org.mozilla.javascript.optimizer.OptRuntime.callName
(OptRuntime.java:97)
at org.mozilla.javascript.gen.c1._c1(Unknown Source)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:
76)
at org.mozilla.javascript.gen.c1._c0(Unknown Source)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall
(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
3003)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.gen.c1.exec(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:
526)
at org.mozilla.javascript.tools.shell.Main.processFileSecure
(Main.java:448)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:414)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:
405)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:
179)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:100)
at org.mozilla.javascript.Context.call(Context.java:499)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:
511)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:162)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:140)
Compacting /home/mike/apps/cappuccino/source_0.7/cappuccino/Build/
Release/Foundation

Ross Boucher

unread,
May 17, 2009, 1:09:37 PM5/17/09
to objec...@googlegroups.com
Mike,

Can you try removing your build folder, and also your installation
directory (/usr/local/share/objj most likely)?

We've had 1 other report of this NPE, band I'm not sure what's causing
it, except that we now ship two different version of rhino, both
different from the previous version we shipped, and possibly with some
classpath magic they are interacting in a negative way.

-Ross

Michael Porter

unread,
May 17, 2009, 2:51:32 PM5/17/09
to objec...@googlegroups.com
Hi Ross,

Yes I had already removed the build folder. I've now tried having
removed the install dir but still no change.

I'm building it in Build in the cappuccino dir and have STEAM_BUILD
set to this location
(/home/mike/apps/cappuccino/source_0.7/cappuccino/Build in my case).

Is there a way I can get it to display the version of Rhino it's using?

Mike.


2009/5/17 Ross Boucher <rbou...@gmail.com>:

Tom Robinson

unread,
May 17, 2009, 4:49:05 PM5/17/09
to objec...@googlegroups.com
Unfortunately there appears to be a bug in OpenJDK that breaks runtime
jar loading in Narwhal.

Fortunately we don't rely on the runtime jar loading currently. Try
deleting External/narwhal/platforms/rhino/lib/packages-platform.js and
rebuilding.

-Tom

Chandler Kent

unread,
May 17, 2009, 6:01:42 PM5/17/09
to Cappuccino & Objective-J
I am also having problems with the latest version of 0.7b on Ubuntu
(8.10). I have deleted the build folder and the objj folder in /usr/
local/share/. But when I run rake release (after doing a git pull and
git checkout to get 0.7b), I get the following errors:

shift: 634: can't shift that many
rm -rf /home/kentcc/Cappuccino/build/Release/env/narwhal
cp -r narwhal /home/kentcc/Cappuccino/build/Release/env/narwhal
cp -r browserjs /home/kentcc/Cappuccino/build/Release/env/narwhal/
packages/browserjs
rake aborted!
No such file or directory - /home/kentcc/Cappuccino/build/Release/env/
narwhal/packages/browserjs
/home/kentcc/Cappuccino/source/External/Rakefile:36
(See full trace by running task with --trace)

I am not sure what is causing this. I was able to build from the
source just fine before.

Any suggestions?

Thanks,

Chandler

On May 17, 4:49 pm, Tom Robinson <t...@280north.com> wrote:
> Unfortunately there appears to be a bug in OpenJDK that breaks runtime  
> jar loading in Narwhal.
>
> Fortunately we don't rely on the runtime jar loading currently. Try  
> deleting External/narwhal/platforms/rhino/lib/packages-platform.js and  
> rebuilding.
>
> -Tom
>
> On May 17, 2009, at 11:51 AM, Michael Porter wrote:
>
>
>
> > Hi Ross,
>
> > Yes I had already removed the build folder. I've now tried having
> > removed the install dir but still no change.
>
> > I'm building it in Build in the cappuccino dir and have STEAM_BUILD
> > set to this location
> > (/home/mike/apps/cappuccino/source_0.7/cappuccino/Build in my case).
>
> > Is there a way I can get it to display the version of Rhino it's  
> > using?
>
> > Mike.
>
> > 2009/5/17 Ross Boucher <rbouc...@gmail.com>:
>
> >> Mike,
>
> >> Can you try removing your build folder, and also your installation
> >> directory (/usr/local/share/objj most likely)?
>
> >> We've had 1 other report of this NPE, band I'm not sure what's  
> >> causing
> >> it, except that we now ship two different version of rhino, both
> >> different from the previous version we shipped, and possibly with  
> >> some
> >> classpath magic they are interacting in a negative way.
>
> >> -Ross
>

Tom Robinson

unread,
May 17, 2009, 6:14:02 PM5/17/09
to objec...@googlegroups.com
Try manually doing

git submodule init
git submodule update

If that doesn't work, can you paste the entire logs.

Chandler Kent

unread,
May 17, 2009, 11:15:51 PM5/17/09
to Cappuccino & Objective-J
Performing the git commands plus removing that file as specified above
did indeed fix the problem.

Thanks!

Michael Porter

unread,
May 18, 2009, 4:16:44 AM5/18/09
to objec...@googlegroups.com
Thanks Tom, removing that file fixes it. Now works perfectly.

Mike.


2009/5/17 Tom Robinson <t...@280north.com>:

stephen white

unread,
May 18, 2009, 5:11:15 AM5/18/09
to objec...@googlegroups.com
On 17/05/2009, at 7:29 AM, Ross Boucher wrote:
> We're getting ready to finalize and ship Cappuccino version 0.7 this
> week. We would appreciate it if you could take a few minutes this
> weekend to get the latest code from git, try it out, and report any
> major issues.


Seems fine based on the limited subset that I'm using, but I'm unable
to build documentation.

> macbook:cappuccino steve$ rake docs
> (in /Users/steve/Developer/Cappuccino/cappuccino)
> rake aborted!
> No such file or directory - Documentation or /Users/steve/Developer/
> Cappuccino/steam_build/Documentation


Manually creating these directories results in them being deleted again.

--
st...@adam.com.au


Martin Häcker

unread,
May 18, 2009, 9:50:46 AM5/18/09
to Cappuccino & Objective-J
I always get a java out of memory exception when running rake test
with the latest version of cappuccino - after an extremely long
timeout (with my CPBrowser in there though).

Do you guys also get this?

If not, how can I increase javas heap space to see if that is the
reason?

Regards,
Martin

Nabil Elisa

unread,
May 18, 2009, 9:56:13 AM5/18/09
to objec...@googlegroups.com
Hi Martin

Google has plenty of information about this, but for a quick answer you should try starting java with this argument:
-Xmx256m
(where you replace 256 with however many mb of ram you would like to allocate to the jvm)

At least I think that's how it's done - I'm a bit rusty :)

Regards
Nabil

Martin Häcker

unread,
May 18, 2009, 10:23:48 AM5/18/09
to Cappuccino & Objective-J
> Google has plenty of information about this, but for a quick answer you
> should try starting java with this argument:
> -Xmx256m
> (where you replace 256 with however many mb of ram you would like to
> allocate to the jvm)
>
> At least I think that's how it's done - I'm a bit rusty :)

Thanks for the tip! However this doesn't really solve my problem, as
I'm hanging on the fact that all the tools run through narwahl now,
and I couldn't yet figure out how to configure narwahl to hand this
flag through to rhino which in turn should hand it through to java.

:-/

Regards,
Martin

Martin Häcker

unread,
May 18, 2009, 10:28:53 AM5/18/09
to Cappuccino & Objective-J
I just found out that it is indeed my CPBrowserTest.j that is causing
the heap overflow. However if I run it individually or together with
my other unit tests inside my project I don't get that error.

So I guess that it probably is not with my code, but indeed with the
way the tests are run.

I however still have no knowledge about how rake and it's interaction
with narwhal and rhino goes, so I can't really debug this. (I can say
however that this worked for me before the switch to narwhal).

Tom Robinson

unread,
May 18, 2009, 5:33:09 PM5/18/09
to objec...@googlegroups.com
To add flags to the narwhal command, edit narwhal/platforms/rhino/bin/
narwhal-rhino

You'll see the "java" command near the bottom, add the flag near the
beginning after the "java"

However, OOM errors are typically a sign of some kind of infinite
loop. Can you give me steps to reproduce this?

-Tom

Martin Häcker

unread,
May 19, 2009, 4:32:44 AM5/19/09
to objec...@googlegroups.com
> To add flags to the narwhal command, edit narwhal/platforms/rhino/bin/
> narwhal-rhino
>
> You'll see the "java" command near the bottom, add the flag near the
> beginning after the "java"

Thanks! I'll look into it.

> However, OOM errors are typically a sign of some kind of infinite
> loop. Can you give me steps to reproduce this?

Sure, just check out git://github.com/dwt/cappuccino.git and run

git checkout -b 0.7b origin/0.7b

git submodule init
git submodule update

rake test

inside.

I had to have some more dealing with git submodules to make the ojunit
checkout work - but that may just git hating me again.

Regards,
Martin

Sarvesh

unread,
May 19, 2009, 12:45:36 PM5/19/09
to objec...@googlegroups.com
This a cosmetic issue, in CPAlert.j the button height is set to 18 which looks bad with the new theme since the default button height was increased.
Sarvesh

Martin Häcker

unread,
May 19, 2009, 12:51:29 PM5/19/09
to objec...@googlegroups.com
> However, OOM errors are typically a sign of some kind of infinite
> loop. Can you give me steps to reproduce this?

I found it. The problem is that the testcase still imported CPBrowser as

-- snip --
@import "CPBrowser.j"
-- snap --

And that triggered the infinite recursion / loop.

So I guess the import logic is somehow wrong.

See the patch that fixes it at: http://github.com/dwt/cappuccino/commit/a23b6b096ab896c69defa901fc6ad64cf7b19c27

And the Bug-Report at:http://github.com/280north/cappuccino/issues/#issue/
131

Regards,
Martin

Reply all
Reply to author
Forward
0 new messages