#159 ✓invalid
Stefan Wallström

objjc crashes

Reported by Stefan Wallström | December 11th, 2008 @ 05:26 AM

objjc crashes when it is given too many input files. 6 seems fine, but 7 or more crashes. This prevents Cappuccino from building fresh out of git.


wlan8:Foundation stewa$ objjc CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o
Setting up Rhino utilties
Statically Preprocessing CPDate.j
Statically Preprocessing CPDate.j
Statically Preprocessing CPDate.j
Statically Preprocessing CPDate.j
Statically Preprocessing CPDate.j
Statically Preprocessing CPDate.j
wlan8:Foundation stewa$ objjc CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o CPDate.j -o foo.o  CPDate.j -o foo.o
/usr/local/bin/objjc: line 34: 63303 Segmentation fault      java -classpath $CLASSPATH objjc $@
wlan8:Foundation stewa$ 

As a workaround steam.js can be patched. But that probably makes the build process slower:


diff --git a/Tools/steam/steam.js b/Tools/steam/steam.js
index e28a4ba..75da31b 100644
--- a/Tools/steam/steam.js
+++ b/Tools/steam/steam.js
@@ -258,9 +258,14 @@ Project.prototype.build = function()
         
         objjcComponents.push("-o");
         objjcComponents.push(buildObjects.getAbsolutePath() + '/' + getFileNameWithoutExtension(file) + '.o');
+    exec(objjcComponents, true);
+    objjcComponents.pop();
+        objjcComponents.pop();
+        objjcComponents.pop();
+    
     }
     
-    exec(objjcComponents, true);
+    //exec(objjcComponents, true);
     
     var oFiles = getFiles(buildObjects, 'o'),
         sjFile = new File(buildProducts.getCanonicalPath() + '/' + this._activeTarget.name() + ".sj");

Comments and changes to this ticket

  • Francisco Tolmasky

    Francisco Tolmasky December 11th, 2008 @ 07:30 AM

    This seems to work fine for me (I can build all of Cappuccino at once). Has this always happened for you, or just recently? Could you give us your system info, maybe there's something not compatible with your version of java/rhino.

  • Stefan Wallström

    Stefan Wallström December 11th, 2008 @ 07:47 AM

    This is the first time I attempt to build from git. I have installed the latest cappuccino dist before that, but I have tried to start from scratch by wiping all of /usr/local/share/objj and $STEAM_BUILD.

    Mac OS X 10.5.5 on a MacBook Pro and iMac (intel, mid 2007).

    Nothing Java related installed on either computer except what comes with the system.

  • Stefan Wallström

    Stefan Wallström December 11th, 2008 @ 09:52 AM

    Hmm, after a lot of debugging... It seems like it is a problem with Rhino.

    
    frost:Foundation stewa$ java -classpath /usr/local/share/objj/lib/js.jar org.mozilla.javascript.tools.shell.Main foo foo  foo  foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
    js: Couldn't open file "foo".
    frost:Foundation stewa$ java -classpath /usr/local/share/objj/lib/js.jar org.mozilla.javascript.tools.shell.Main foo foo  foo  foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
    Segmentation fault
    
  • Stefan Wallström

    Stefan Wallström December 11th, 2008 @ 10:10 AM

    Bah. Never mind. It's java itself that crashes when given too many arguments.

    Sorry for wasting your time.

  • Francisco Tolmasky

    Francisco Tolmasky December 11th, 2008 @ 02:28 PM

    • State changed from “new” to “invalid”

    no worries, glad to not have to fix a bug ;)

  • Stefan Wallström

    Stefan Wallström December 12th, 2008 @ 01:03 AM

    Here's someone with the exact same java problem: http://lists.apple.com/archives/...

    Strange problem. Anyway, if anyboday else has this problem, my steam.js workaround makes it possible to build cappuccino.

  • Stefan Wallström

    Stefan Wallström December 23rd, 2008 @ 06:32 AM

    In case someone googles this: "Instant Hijack" a program that is (optionally) installed with "Airfoil" caused this problem. More info here: http://discussions.apple.com/mes...

  • Ross Boucher

    Ross Boucher December 25th, 2008 @ 05:18 AM

    Just in case that apple page goes away:

    "sudo /usr/local/hermes/bin/hermesctl unload" fixes the probem.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.

Shared Ticket Bins

People watching this ticket

Pages