[MacRuby-devel] Assertion failed: (castIsValid(getOpcode(), S, Ty) && "Illegal SExt"), function SExtInst, file Instructions.cpp, line 2508.

Art Taylor art at arttaylor.com
Sun Sep 27 15:03:48 PDT 2009


You hit it on the nose.  I had specified x86_64 and 64-bit in the Project
settings, but for some reason it wasn't updating the project.pbxproj file in
the .xcodeproj.  Manually updating the archs there did the trick.
Thanks!

-a.

On Sun, Sep 27, 2009 at 2:43 PM, Laurent Sansonetti
<lsansonetti at apple.com>wrote:

> I see. Could you check if your application is built for both 32-bit and
> 64-bit? If it's for 32-bit only, then MacRuby will work in 32-bit mode,
> which is bugged. You need to build it for 64-bit, this can be configured in
> Xcode.
>
> You can check with the file(1) command line tool if the binary contains the
> 64-bit architecture.
>
> Laurent
>
>
> On Sep 27, 2009, at 2:37 PM, Art Taylor wrote:
>
>  It's a 64-bit machine (2008 8-core Mac Pro).  I have a test machine I can
>> wipe and try it (pre-unibody 2008 mbp).
>>
>> -a.
>>
>> On Sun, Sep 27, 2009 at 2:33 PM, Laurent Sansonetti <
>> lsansonetti at apple.com> wrote:
>> Hi,
>>
>> Do you run by any chance a 32-bit only machine? This could explain the
>> crash, the compiler has still 32-bit problems. This will be fixed in the
>> final 0.5 release.
>>
>> Laurent
>>
>>
>> On Sep 27, 2009, at 2:27 PM, Art Taylor wrote:
>>
>> I'm in the process of migrating an Objective-C project to MacRuby (0.5
>> trunk) and am seeing this error when I run the application:
>>
>> Assertion failed: (castIsValid(getOpcode(), S, Ty) && "Illegal SExt"),
>> function SExtInst, file Instructions.cpp, line 2508.
>>
>> The stack looks like this:
>>
>> #0      0x9870d912 in __kill
>> #1      0x9870d904 in kill$UNIX2003
>> #2      0x987a0b99 in raise
>> #3      0x987b6c50 in abort
>> #4      0x987a37f8 in __assert_rtn
>> #5      0x0090ab1a in llvm::SExtInst::SExtInst
>> #6      0x001528b3 in RoxorCompiler::compile_conversion_to_ruby
>> #7      0x00158847 in RoxorCompiler::compile_stub
>> #8      0x0017e173 in RoxorCore::gen_stub
>> #9      0x0018b4cd in rb_vm_dispatch
>> #10     0x00e432a2 in ??
>> #11     0x0004c2cb in ruby_run_node
>> #12     0x00186a61 in macruby_main
>> #13     0x00002c64 in main at main.m:13
>>
>> I was following the (admittedly quite old) page covering this sort of
>> activity at http://www.macruby.org/trac/wiki/MacRubyFromObjC.
>>
>> My main.m and rb_main.rb are vanilla and copied from the FlickrDemo (which
>> runs on my system).  If I reduce rb_main.rb to the bare minimum of the
>> following, I still get the error.
>>
>> framework 'Cocoa'
>> NSApplicationMain(0, nil)
>>
>> I'm assuming it's something in my ObjC code that is causing the problem --
>> is there a good way to zero in on it?  My llvm and MacRuby knowledge is
>> pretty rough, so I'm not sure where to drop breakpoints.  If there's a
>> "don't use <datatype>" rule of thumb, that would be great, too, as that
>> appears to be where things may be hung up.
>>
>> Thanks!
>>
>> -a.
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20090927/a0a6ed16/attachment.html>


More information about the MacRuby-devel mailing list