[MacRuby-devel] DRb problem (MacRuby 0.4)

2009-06-16 Thread Igor Anić
I have a strange problem while trying to communicate from macruby to  
running drb process.

Only one request is passing, on second I'm getting error.
I tested same simple code in ruby 1.9.1 and Ruby 1.8.6 and there all  
works ok.
Server can be run with any version of Ruby, and everything works  
except when client is running with macruby.


Here is the sample code for client and server to reproduce error.


Sample server, returns new value for each call on increment:

require 'drb'

class Incrementer

  def initialize
@value = 0
  end

  def increment
@value += 1
  end

end

service = DRb.start_service("druby://localhost:4242", Incrementer.new)
print "service started on port 4242\n"
DRb.thread.join


Sample client, displays server value:

require 'drb'
DRb.start_service
server = DRbObject.new_with_uri('druby://localhost:4242')
p server.increment #this line, works as expected
p server.increment #this line raises error


And the error is:

/Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/ 
drb/drb.rb:961: [BUG] destination 0x7fff5fbfbe48 isn't in the auto zone

MacRuby version 0.4 (ruby 1.9.1) [universal-darwin9.0, x86_64]

-- stack frame 
 (0xc0860): 0004
0001 (0xc0868): 
0002 (0xc0870): 0004
0003 (0xc0878): 
0004 (0xc0880): 8000c7de0
0005 (0xc0888): 0004
0006 (0xc0890): 
0007 (0xc0898): 0004
0008 (0xc08a0): 100397ad0
0009 (0xc08a8): 0004
0010 (0xc08b0): 
0011 (0xc08b8): 8000c7de0
0012 (0xc08c0): 100397ad0
0013 (0xc08c8): 8000d58a0
0014 (0xc08d0): 0004
0015 (0xc08d8): 0004
0016 (0xc08e0): 0004
0017 (0xc08e8): 0004
0018 (0xc08f0): 0004
0019 (0xc08f8): 0004
0020 (0xc08000100): 
0021 (0xc08000108): 1003a7830
0022 (0xc08000110): 800316c80
0023 (0xc08000118): 0004
0024 (0xc08000120): 0004
0025 (0xc08000128): 0004
0026 (0xc08000130): c080ffe58
0027 (0xc08000138): 0004
0028 (0xc08000140): c08000100 (= 20)
0029 (0xc08000148): 1003ae6d0
0030 (0xc08000150): 800316c80
0031 (0xc08000158): 0004
0032 (0xc08000160): 0004
0033 (0xc08000168): 0004
0034 (0xc08000170): 0004
0035 (0xc08000178): c080ffd78
0036 (0xc08000180): 800388240
0037 (0xc08000188): 0004
0038 (0xc08000190): c080ffd08
0039 (0xc08000198): 8000d5280
0040 (0xc080001a0): 0004
0041 (0xc080001a8): c08000178 (= 35)
0042 (0xc080001b0): 800314c60
0043 (0xc080001b8): 0004
0044 (0xc080001c0): c080ffc28
0045 (0xc080001c8): 8000e03c0
0046 (0xc080001d0): 0004
0047 (0xc080001d8): c080001a8 (= 41)
0048 (0xc080001e0): 8000e03c0
0049 (0xc080001e8): 0004
0050 (0xc080001f0): 
0051 (0xc080001f8): 800311f60
0052 (0xc08000200): 0004
0053 (0xc08000208): 
0054 (0xc08000210): 10035afe0
0055 (0xc08000218): 8000d52c0
0056 (0xc08000220): 0004
0057 (0xc08000228): 0004
0058 (0xc08000230): 0001
0059 (0xc08000238): 0004
0060 (0xc08000240):  <- lfp <- dfp
-- control frame --
c:0016 p: s:0061 b:0061 l:60 d:60 CFUNC  :select
c:0015 p:0030 s:0054 b:0054 l:53 d:53 METHOD /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:961
c:0014 p:0017 s:0051 b:0051 l:50 d:50 METHOD /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:1212
c:0013 p:0036 s:0048 b:0048 l:35 d:47 BLOCK  /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:1168

c:0012 p: s:0047 b:0047 l:46 d:46 FINISH :method_added:
c:0011 p: s:0045 b:0045 l:44 d:44 CFUNC  :each
c:0010 p:0013 s:0042 b:0042 l:35 d:41 BLOCK  /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:1166

c:0009 p:0011 s:0039 b:0039 l:38 d:38 METHOD prelude.rb:8
c:0008 p:0011 s:0036 b:0036 l:35 d:35 METHOD /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:1163
c:0007 p:0015 s:0029 b:0029 l:20 d:28 BLOCK  /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:1092
c:0006 p:0026 s:0027 b:0027 l:26 d:26 METHOD /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:1110
c:0005 p:0090 s:0021 b:0021 l:20 d:20 METHOD /Library/ 
Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/drb/ 
drb.rb:1091

c:0004 p: s:0011 b:0011 l:10 d:10 FINISH :p
c:0003 p:0066 s:0009 b:0007 l:06 d:06 TOPtest_client.rb:6
c:0002 p: s:0004 b:0004 l:03 d:03 FINISH :inherited:
c:0001 p: s:0002 b:0002 l:01 d:01 TOP
---
DBG> : "/Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ 
ruby/1.9.1/drb/drb.rb:961:in `select'"
DBG> : "/Library/Frameworks/MacRuby.framework/V

[MacRuby-devel] MacRuby Document-based Application template in XCode?

2009-06-16 Thread Paul Howson

Hi,

When using Objective-C, XCode provides you with a template for a  
"Cocoa Document-based Application".


For MacRuby we so far have in XCode only "MacRuby Application" and  
"MacRuby Core Data Application".


Would it work to take a new MacRuby Application and copy across the  
relevant bits from a new Cocoa Document-based Application in order to  
make a MacRuby Document-based Application?


Is it that simple, or are there other gotchas I need to know about?

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