Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

objjc crashes

#159

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");

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

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Francisco Tolmasky
    Francisco Tolmasky

    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.

    December 11th, 2008 @ 07:30 AM

  2. Stefan Wallström
    Stefan Wallström

    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.

    December 11th, 2008 @ 07:47 AM

  3. Stefan Wallström
    Stefan Wallström

    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
    

    December 11th, 2008 @ 09:52 AM

  4. Stefan Wallström
    Stefan Wallström

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

    Sorry for wasting your time.

    December 11th, 2008 @ 10:10 AM

  5. Francisco Tolmasky
    Francisco Tolmasky
    • State changed from new to invalid

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

    December 11th, 2008 @ 02:28 PM

  6. Stefan Wallström
    Stefan Wallström

    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.

    December 12th, 2008 @ 01:03 AM

  7. Stefan Wallström
    Stefan Wallström

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

    December 23rd, 2008 @ 06:32 AM

  8. Ross Boucher
    Ross Boucher

    Just in case that apple page goes away:

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

    December 25th, 2008 @ 05:18 AM

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.