[MacRuby-devel] How to debug MacRuby crashes?

2012-02-01 Thread Marc Abramowitz
I've discovered that it's not difficult to make MacRuby crash by doing
things that it doesn't like. Unfortunately, I'm a MacRuby novice and I'm
making a lot of mistakes and I don't always know what they are and it seems
difficult to figure out from the crash messages.

For instance, right now I'm running my app from Xcode and every once and a
while I get an intermittent (probably a concurrency-related bug involving
run loops, timers, and the like) crash:

*Assertion failed: ((size_t)pos < current_exceptions.size()), function
pop_current_exception, file vm.cpp, line 3596.*

>From a little big of digging around, I gather that this is probably coming
from:

RoxorVM*::*pop_current_exception

https://github.com/MacRuby/MacRuby/blob/master/vm.cpp#L3600

This happens in the app's main thread in the com.apple.main-thread (serial)
queue. My app is running in thread 3.

I still don't know what that means though :-) Perhaps my code triggered
some kind of exceptional condition?

There is very little info in Xcode. Lots of warnings about missing debug
information -- e.g.:

warning: Could not find object file
"/Users/lrz/src/macruby-master/ext/json/parser/parser.o" - no debug
information available for "parser.c".

...

I'm on OS X 10.6.8 and I believe that my app is running with the MacRuby
0.11 release from
https://github.com/downloads/MacRuby/MacRuby/MacRuby%200.11.zip (BTW, is
this a "blessed" release? I noticed that GitHub has this 0.11 version, but
macruby.org still lists 0.10 as the current version).

$ macruby -v

MacRuby 0.11 (ruby 1.9.2) [universal-darwin10.0, x86_64]

I imagine that I might be able to eliminate these by compiling MacRuby (and
LLVM) from source? Is this likely to help? Will this give me clues about
what I did wrong in my Ruby code? Or is there some other way to diagnose
what's wrong? Perhaps a .dSYM file would help?

Thanks,

Marc
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] MacRuby + MAS = Invalid Signature

2012-02-01 Thread Daniel Westendorf
If you've been submitting applications to the Mac App Store, you've
probably seen errors about files or your App having Invalid Signatures. The
solution is to use codesign to fix this.

As of this pull request
https://github.com/MacRuby/MacRuby/pull/52#issuecomment-3745546,
macruby_deploy now fixes this with a --codesign switch that requires the
name of your signing certificate.

Hopefully this saves some people a little greif.

Daniel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel