From ruby-noreply at macosforge.org Wed Jun 1 00:27:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Jun 2011 07:27:58 -0000 Subject: [MacRuby] #1311: Segfault on nested method call with block In-Reply-To: <047.ddf08306a776fb026ee7b7a2de910e1a@macosforge.org> References: <047.ddf08306a776fb026ee7b7a2de910e1a@macosforge.org> Message-ID: <056.a78d0e74809212919412748c5a26650e@macosforge.org> #1311: Segfault on nested method call with block ------------------------------+--------------------------------------------- Reporter: kouji@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby Later => MacRuby 0.11 Comment: Should be fixed in https://github.com/MacRuby/MacRuby/commit/6aaa619dc0915b34dc74fada00551a288a9b7274 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 00:28:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Jun 2011 07:28:17 -0000 Subject: [MacRuby] #1309: regexp with large number of captures is unable to deal with In-Reply-To: <051.cd584e593d6a7cbbd4412849a9da9f6d@macosforge.org> References: <051.cd584e593d6a7cbbd4412849a9da9f6d@macosforge.org> Message-ID: <060.5c0c727981a52e98e3bd086590a51411@macosforge.org> #1309: regexp with large number of captures is unable to deal with ----------------------------------+----------------------------------------- Reporter: chris@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Should be fixed in https://github.com/MacRuby/MacRuby/commit/f2d8a2b18cff0e80d1f436230f9dbb6d9e75bbb6 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 00:32:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Jun 2011 07:32:14 -0000 Subject: [MacRuby] #1285: Constants missing error when the constants are declared in the class definition In-Reply-To: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> References: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> Message-ID: <054.b13fd9c64b561e8074b4f64b5f74168a@macosforge.org> #1285: Constants missing error when the constants are declared in the class definition ----------------------------+----------------------------------------------- Reporter: tglee@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------+----------------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.11-blocker Comment: Adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 00:32:28 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Jun 2011 07:32:28 -0000 Subject: [MacRuby] #1292: slows down method dispatch at "git commit 68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5" In-Reply-To: <047.b1a2e1fff5849d9fbf3a30aa19db93f3@macosforge.org> References: <047.b1a2e1fff5849d9fbf3a30aa19db93f3@macosforge.org> Message-ID: <056.3113dcd7cc6858876b12ff9738f6d451@macosforge.org> #1292: slows down method dispatch at "git commit 68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5" ------------------------------+--------------------------------------------- Reporter: kouji@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.11-blocker Comment: Adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 05:18:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Jun 2011 12:18:18 -0000 Subject: [MacRuby] #1310: JSON.parse fails with NSString In-Reply-To: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> References: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> Message-ID: <061.feb79cc189a09f7d1cb1d9bb6c49a04c@macosforge.org> #1310: JSON.parse fails with NSString -----------------------------------+---------------------------------------- Reporter: isaackearse@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by jballanc@?): My feeling is that this is not a bug, but it also reemphasizes the need to figure out what to do about distinguishing NSStrings from Strings or coercing from one to the other -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 13:29:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Jun 2011 20:29:03 -0000 Subject: [MacRuby] #594: Not all methods visible to objective-c calls In-Reply-To: <047.ead61ed260ddbbe6e33edd1b3cf80c0a@macosforge.org> References: <047.ead61ed260ddbbe6e33edd1b3cf80c0a@macosforge.org> Message-ID: <056.8d677fcdbba802ac8a9e5159167a776d@macosforge.org> #594: Not all methods visible to objective-c calls ------------------------------+--------------------------------------------- Reporter: michael@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- Comment(by michal.cichra@?): I'm hitting this problem in MacRuby 0.10. Was it fixed and its regression? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 14:16:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Jun 2011 21:16:53 -0000 Subject: [MacRuby] #1310: JSON.parse fails with NSString In-Reply-To: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> References: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> Message-ID: <061.01ef7626322ccbc5332bf88460f05057@macosforge.org> #1310: JSON.parse fails with NSString -----------------------------------+---------------------------------------- Reporter: isaackearse@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by isaackearse@?): I guess this is more of a feature request than a bug. I think we should modify the json library to not use #encode on NSStrings. Is there an easy way to distinguish a String from an NSString? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 20:34:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 02 Jun 2011 03:34:54 -0000 Subject: [MacRuby] #1310: JSON.parse fails with NSString In-Reply-To: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> References: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> Message-ID: <061.7eeb60399326800dc8e4de35ffc1f532@macosforge.org> #1310: JSON.parse fails with NSString -----------------------------------+---------------------------------------- Reporter: isaackearse@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by watson1978@?): Maybe, {{{ #!diff diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl index 5862698..1251c63 100644 --- a/ext/json/parser/parser.rl +++ b/ext/json/parser/parser.rl @@ -1,4 +1,5 @@ #include "parser.h" +RUBY_EXTERN VALUE rb_cRubyString; /* unicode */ @@ -634,7 +635,11 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) VALUE source, opts; GET_PARSER; rb_scan_args(argc, argv, "11", &source, &opts); - source = convert_encoding(StringValue(source)); + StringValue(source); + if (CLASS_OF(source) == rb_cRubyString) { + // MacRuby : convert only RubyString + source = convert_encoding(source); + } ptr = RSTRING_PTR(source); len = RSTRING_LEN(source); if (!NIL_P(opts)) { }}} create parser.c {{{ $ ragel parser.rl }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 1 20:46:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 02 Jun 2011 03:46:15 -0000 Subject: [MacRuby] #1310: JSON.parse fails with NSString In-Reply-To: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> References: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> Message-ID: <061.59259d756be15ba62d37c716e5e8f02c@macosforge.org> #1310: JSON.parse fails with NSString -----------------------------------+---------------------------------------- Reporter: isaackearse@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): I am wondering if we shouldn't add a dummy #encode function to NSString. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 03:12:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 02 Jun 2011 10:12:15 -0000 Subject: [MacRuby] #594: Not all methods visible to objective-c calls In-Reply-To: <047.ead61ed260ddbbe6e33edd1b3cf80c0a@macosforge.org> References: <047.ead61ed260ddbbe6e33edd1b3cf80c0a@macosforge.org> Message-ID: <056.afcf1742173cce4d749444037134c530@macosforge.org> #594: Not all methods visible to objective-c calls ------------------------------+--------------------------------------------- Reporter: michael@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- Comment(by michael@?): From what I know, this was not fixed up to now, even as we hit 0.10... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 12:39:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 02 Jun 2011 19:39:54 -0000 Subject: [MacRuby] #1310: JSON.parse fails with NSString In-Reply-To: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> References: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> Message-ID: <061.33a348e742d298cecdc424fffac81cfa@macosforge.org> #1310: JSON.parse fails with NSString -----------------------------------+---------------------------------------- Reporter: isaackearse@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): Per yesterday's discussion, let's add NSString#encode, which works as expected, and NSString#encode!, which raises an exception. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 19:47:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 02:47:32 -0000 Subject: [MacRuby] #1268: force_encoding on NSStrings with Net::HTTP In-Reply-To: <052.4b9186120f76876ed07ad2a6ee8da9c8@macosforge.org> References: <052.4b9186120f76876ed07ad2a6ee8da9c8@macosforge.org> Message-ID: <061.fc879866d1e7ebd7a303b2e1908c37d5@macosforge.org> #1268: force_encoding on NSStrings with Net::HTTP -----------------------------------+---------------------------------------- Reporter: eric@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): #force_encoding will not be implemented on NSStrings. The #String method can be used to return a RubyString. However, if net/http is using #force_encoding on a given string without making a copy, then it may be a problem that we can fix in net/http itself. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 19:48:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 02:48:18 -0000 Subject: [MacRuby] #1213: Header symlinks when deploying In-Reply-To: <051.6145f098be91896f073e41cb44d6b5ab@macosforge.org> References: <051.6145f098be91896f073e41cb44d6b5ab@macosforge.org> Message-ID: <060.efbbcb47ef42f4ae40282aaaa598c197@macosforge.org> #1213: Header symlinks when deploying ----------------------------------+----------------------------------------- Reporter: geetarista@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.11 => Comment: Has this problem been fixed? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 19:50:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 02:50:34 -0000 Subject: [MacRuby] #1237: Library not loaded In-Reply-To: <051.41da3894e62abc0e4d712118f619c24a@macosforge.org> References: <051.41da3894e62abc0e4d712118f619c24a@macosforge.org> Message-ID: <060.b0c5fce21ffc4a70ab17f3776b289672@macosforge.org> #1237: Library not loaded ----------------------------------+----------------------------------------- Reporter: geetarista@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: needinfo Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => needinfo Comment: Normally if you're using a recent version of MacRuby from the master branch, just using the default Xcode target should work. Several fixes have been added to macruby_deploy since the last release. Could you try again and if the problem still persists, then give us more information on how to reproduce it? "trying to build my app" is pretty vague. Thanks! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 19:55:51 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 02:55:51 -0000 Subject: [MacRuby] #1223: deploying a doc based app fails In-Reply-To: <046.08b581488ff45031e2ddaf0daf1a232c@macosforge.org> References: <046.08b581488ff45031e2ddaf0daf1a232c@macosforge.org> Message-ID: <055.4f01c137885c1ef5c43e01e849629a2e@macosforge.org> #1223: deploying a doc based app fails -----------------------------+---------------------------------------------- Reporter: rob.ista@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: worksforme Keywords: macruby_deploy | -----------------------------+---------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => worksforme Comment: I just created a new doc-based app with MacRuby master with Xcode4, then ran the Deployment target, then ran the app, and it works flawlessly (no exception or anything in the terminal). So maybe the problem has been fixed in the meantime... Please try again and let us know if it fails to work again. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 20:00:21 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 03:00:21 -0000 Subject: [MacRuby] #1230: Assert fails when calls "binding" with Object#send. In-Reply-To: <051.986b66976af8fb71f1068d4cba4c366d@macosforge.org> References: <051.986b66976af8fb71f1068d4cba4c366d@macosforge.org> Message-ID: <060.83f0bd1e9cc78f2161385779861501a7@macosforge.org> #1230: Assert fails when calls "binding" with Object#send. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby Later Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * milestone: => MacRuby Later Comment: I changed MacRuby to not crash when this happens, but raise an exception instead, in https://github.com/MacRuby/MacRuby/commit/cff48f62d3c9e4b5854ba579afd54338a6ee525d The ticket is still not resolved, but it's less scary now. Moving to Later component. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 20:03:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 03:03:58 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.6aabfc2c83b670667e24a413ff72cc04@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Can you confirm that latest rspec cannot be used with MacRuby because of this bug? If yes, we need to add the 0.11-blocker keyword to this ticket. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 20:04:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 03:04:24 -0000 Subject: [MacRuby] #1305: MacRuby shared runtime kernel level method bug? In-Reply-To: <054.6f587e012605b1ca78534a646060794d@macosforge.org> References: <054.6f587e012605b1ca78534a646060794d@macosforge.org> Message-ID: <063.a640a58715a2f44c4c7e110b233dd8b5@macosforge.org> #1305: MacRuby shared runtime kernel level method bug? -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby Later Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 1.0 => MacRuby Later Comment: That's an edge case, moving to Later. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 2 20:05:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 03:05:24 -0000 Subject: [MacRuby] #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path In-Reply-To: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> References: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> Message-ID: <061.eae408feabf3519fddec5666623be463@macosforge.org> #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.11-blocker -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.11-blocker Comment: Let's do this in 0.11. Adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 3 09:26:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 16:26:35 -0000 Subject: [MacRuby] #1237: Library not loaded In-Reply-To: <051.41da3894e62abc0e4d712118f619c24a@macosforge.org> References: <051.41da3894e62abc0e4d712118f619c24a@macosforge.org> Message-ID: <060.54de533001dfcf74719ab6f1276e7a5e@macosforge.org> #1237: Library not loaded ----------------------------------+----------------------------------------- Reporter: geetarista@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: needinfo Keywords: | ----------------------------------+----------------------------------------- Comment(by geetarista@?): ...and this is why I converted my app to Objective-C and gave up on Macruby. I even tried my old code on a recent release just to see and it still doesn't work. You say that it should just work with the default target, but it doesn't work. I had to scour blog articles to even get my app to archive a couple months ago, since there isn't any real documentation for MacRuby. Matt's book is the only thing decent out there, but it doesn't cover distributing at all. For one of my apps, I even had to manually copy files in the packaged application because headers didn't work, which is a ticket that has still never been updated. Several people have made it into the Mac App Store, but who knows how they got in there. Most likely they had to manually build their application or make modifications to it. Like I said before, it's sad that actually building and distributing an app is so painful and so low on priority. MacRuby will only be a novelty until that's turned around. I've seen many people with this same issue and it keeps coming up over and over again ever since release 0.5. I love Ruby, but dealing with MacRuby has been a huge waste of time, so I'm sticking with Objective-C. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 3 14:30:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 03 Jun 2011 21:30:26 -0000 Subject: [MacRuby] #1237: Library not loaded In-Reply-To: <051.41da3894e62abc0e4d712118f619c24a@macosforge.org> References: <051.41da3894e62abc0e4d712118f619c24a@macosforge.org> Message-ID: <060.1983dd29cace2409f37b3d2c2d986a37@macosforge.org> #1237: Library not loaded ----------------------------------+----------------------------------------- Reporter: geetarista@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: needinfo Keywords: | ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Well you are not really helping here. Pasting this linker error with no context information or problem reduction is not going to help us fix the problem, it's worthless. We have not received similar complains and new macruby apps are hitting the store frequently now, which is why the problem might be related to your project. We need more info. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 3 17:15:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 00:15:57 -0000 Subject: [MacRuby] #1312: Segfault when trying NSArray.alloc.initWithObjects(1) Message-ID: <053.ab4c784fe6462840a580b2b9e44fc876@macosforge.org> #1312: Segfault when trying NSArray.alloc.initWithObjects(1) ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Cocoa normally requires that you nil terminate your va_list list when initializing an NSArray. If you do not add the nill termination, then MacRuby will segfault, which is odd behaviour for a high level language. Example: {{{ framework 'Cocoa' NSArray.alloc.initWithObjects(1) }}} Laurent mentioned that the new bridge support has an attribute that could tell MacRuby if an argument must be null-terminated, so I will include it as a note for later: -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 3 17:19:49 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 00:19:49 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects Message-ID: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Reduction: {{{ require 'json' [NSString.alloc.initWithString('')].to_json }}} It looks like the issue is caused because the JSON library does not match a type against an NSString, so it tries to generate JSON using the value of #to_s, which returns another NSString. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 3 17:31:20 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 00:31:20 -0000 Subject: [MacRuby] #1314: Objective-C methods with null-terminated arguments have a subtle issue Message-ID: <053.8e5c46b6a0c48205722ced8eac6870ec@macosforge.org> #1314: Objective-C methods with null-terminated arguments have a subtle issue ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Because nil is a legitimate object in Ruby, but not in objective-c, it can introduce subtle bugs: Example: {{{ framework 'Cocoa' array = NSArray.alloc.initWithObjects(nil,1,2,3) p array.size p array.inspect }}} Since reading the va_list stops when it finds the first nil, the array is never initialized with the numbers. I'm not sure how common this will be in practice though... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 02:47:09 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 09:47:09 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.d09e1bc4f8bf3e54c867122f48295d72@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by watson1978@?): 'json/pure' also crash with stack overflow. {{{ $ macruby -r json/pure -e "[NSString.alloc.initWithString('')].to_json" zsh: segmentation fault macruby -r json/pure -e "[NSString.alloc.initWithString('')].to_json" }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 09:16:13 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 16:16:13 -0000 Subject: [MacRuby] #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky Message-ID: <046.58aedceef12fc36f7681f6fc406a733c@macosforge.org> #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ScriptingBridge, keycodes -----------------------------+---------------------------------------------- {{{ framework 'Foundation' framework 'ScriptingBridge' system = SBApplication.applicationWithBundleIdentifier("com.apple.SystemEvents") system.send(:"keystroke:using:", "t", 0) # `t` is typed as keystroke # system.send(:"keyCode:using:", 17, 0) # `t` is typed as keyCode # unicode for t is 0074, ascii for t is 116 system.performSelector(:'keyCode:using:', keyCode:17, using:0) # Completely random! }}} What's going on here guys? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 09:38:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 16:38:27 -0000 Subject: [MacRuby] #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky In-Reply-To: <046.58aedceef12fc36f7681f6fc406a733c@macosforge.org> References: <046.58aedceef12fc36f7681f6fc406a733c@macosforge.org> Message-ID: <055.10589a8c43dfbe19aff4641ddae792af@macosforge.org> #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ScriptingBridge, keycodes -----------------------------+---------------------------------------------- Comment(by mrada@?): Simulated keyboard events use the virtual keycodes that Apple has defined; the listing is in /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h This is not a MacRuby issue; though I think it would be a good idea to log a bug with Apple about the virtual keycode system. :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 11:47:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 18:47:15 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.81e7d80df736e69ad41fdb4b21ba4e89@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by mrada@?): Yes, even with the latest rspec this still crashes MacRuby, but only most of the time now. Sometimes the crash is due to a failed assertion, sometimes it crashes in LLVMLinkInJIT, rarely it fails while parsing the code, and a couple of times it actually loaded... The failed assertion is {{{ Assertion failed: ((size_t)pos < current_exceptions.size()), function pop_current_exception, file vm.cpp, line 3698. }}} I can attach crash reports if you think that would help. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 12:13:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 19:13:54 -0000 Subject: [MacRuby] #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky In-Reply-To: <046.58aedceef12fc36f7681f6fc406a733c@macosforge.org> References: <046.58aedceef12fc36f7681f6fc406a733c@macosforge.org> Message-ID: <055.99b3f4368f8ef8759fc92bd65190ba73@macosforge.org> #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ScriptingBridge, keycodes -----------------------------+---------------------------------------------- Comment(by rob@?): @mrada: Sir, you are awesome. Thanks! This issue should be closed. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 14:13:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 04 Jun 2011 21:13:31 -0000 Subject: [MacRuby] #204: Private methods redefined public are still in private_methods In-Reply-To: <057.501491f7df3890638c90a912d40a6495@macosforge.org> References: <057.501491f7df3890638c90a912d40a6495@macosforge.org> Message-ID: <066.55859e7e0026c3190b0170d72032099a@macosforge.org> #204: Private methods redefined public are still in private_methods ----------------------------------------+----------------------------------- Reporter: vincent.isambart@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: #reduction ----------------------------------------+----------------------------------- Comment(by christian@?): Replying to [comment:6 lsansonetti@?]: > This problem does not seem critical for 1.0, moving to Later. I disagree: this bug causes 'bundler exec' to fail with the message 'Could not find task "exec".' Bundler is a very important gem for me, and of course a requirement for Rails 3. 'bundler exec' fails because the #exec method is both public and private on the Kernel module: {{{ Kernel.public_methods & Kernel.private_methods => [:load_plist, :load_bridge_support_file, :binding, :lambda, :proc, :framework, :autoload?, :autoload, :require, :load, :abort, :exit, :sleep, :spawn, :system, :exit!, :fork, :exec, :trap, :rand, :srand, :getpass, :test, :display, :p, :`, :readlines, :select, :readline, :gets, :puts, :putc, :print, :printf, :open, :syscall, :at_exit, :untrace_var, :trace_var, :caller, :loop, :throw, :catch, :local_variables, :global_variables, :raise, :fail, :block_given?, :iterator?, :eval, :warn, :Array, :String, :Float, :Integer, :format, :sprintf] }}} Bundler uses the Thor gem to define its command line, and Thor excludes private or protected methods from command-line parsing: {{{ def public_method?(instance) #:nodoc: collection = instance.private_methods + instance.protected_methods (collection & [name.to_s, name.to_sym]).empty? end }}} (From https://github.com/wycats/thor/blob/master/lib/thor/task.rb#L69 ) This implementation doesn't seem wrong to me, though it would obviously work if they had checked for inclusion in #public_methods instead. For the same reason the 'bundler open' command also fails with the same message. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 20:59:00 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 05 Jun 2011 03:59:00 -0000 Subject: [MacRuby] #1316: net/http form_data chokes on instances of NSString Message-ID: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> #1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ In trying to use net/http within a macruby application, I discovered that calling Net::HTTP::Post#set_form_data with a hash whose values are NSStrings raises an error whereas it works fine with ruby Strings. Here is the error: /Users/greg/code/macruby-bug-report/NetHttpWeirdness/net-http- weirdness.rb:14:in `
': method `force_encoding:' does not work on NSStrings (ArgumentError) I've created a repo on Github that documents the problem in both a shell script and a full-fledged XCode project: https://github.com/atduskgreg/NetHTTPWeirdness -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 21:19:40 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 05 Jun 2011 04:19:40 -0000 Subject: [MacRuby] #1316: net/http form_data chokes on instances of NSString In-Reply-To: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> References: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> Message-ID: <065.a33eeac99a3b4ce1ebfbcc4dd0776232@macosforge.org> #1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by greg.borenstein@?): Looking around the tracker a bit more, I notice that this bug seems to have been reported before an in here: http://www.macruby.org/trac/ticket/689 That bug was closed along a long time ago, but I am still seeing this problem in MacRuby 0.10 installed from the most recent stable version available on the website and running with XCode 4. Just wanted to make it clear that I wasn't simply re-reporting long- standing bugs. Or at least that I'm doing my best not to. Thanks! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 4 23:45:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 05 Jun 2011 06:45:56 -0000 Subject: [MacRuby] #1316: net/http form_data chokes on instances of NSString In-Reply-To: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> References: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> Message-ID: <065.8e7e21fe43684afd6e26bc089e57aef2@macosforge.org> #1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by watson1978@?): This ticket would seem to duplicate #1268. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 5 08:26:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 05 Jun 2011 15:26:41 -0000 Subject: [MacRuby] #1316: net/http form_data chokes on instances of NSString In-Reply-To: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> References: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> Message-ID: <065.5fbd8182c0b3e991145e8a0d2f5cb5ad@macosforge.org> #1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by greg.borenstein@?): You're right, they're duplicates. In the meantime I found my own work around which is similar to the one described in that other ticket of implicitly transforming the NSString into a String thusly: "#{my_ns_string}" before passing it to set_form_data in its argument hash. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 5 09:43:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 05 Jun 2011 16:43:58 -0000 Subject: [MacRuby] #1317: Coordinates of CLLocation are not accesible Message-ID: <053.903bfee9104d42ff8da2669f868fc1e9@macosforge.org> #1317: Coordinates of CLLocation are not accesible ------------------------------------+--------------------------------------- Reporter: fdiazgarrido@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- The coordinate attribute returns a Boxed object whose attributes cant be accessed #!/usr/bin/env macruby framework 'CoreLocation' def locationManager(lm, didUpdateToLocation: to, fromLocation: from) p to.coordinate.longitude end manager = CLLocationManager.alloc.init manager.delegate = self manager.startUpdatingLocation NSRunLoop.currentRunLoop.runUntilDate(NSDate.distantFuture) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 5 21:11:30 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 04:11:30 -0000 Subject: [MacRuby] #204: Private methods redefined public are still in private_methods In-Reply-To: <057.501491f7df3890638c90a912d40a6495@macosforge.org> References: <057.501491f7df3890638c90a912d40a6495@macosforge.org> Message-ID: <066.4f33aa19ba7c63c66a890af83e316cf2@macosforge.org> #204: Private methods redefined public are still in private_methods ----------------------------------------+----------------------------------- Reporter: vincent.isambart@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: #reduction ----------------------------------------+----------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby Later => MacRuby 1.0 Comment: Sorry, I didn't know this was breaking Bundler. Moving to 1.0 milestone. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 5 21:12:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 04:12:57 -0000 Subject: [MacRuby] #1317: Coordinates of CLLocation are not accesible In-Reply-To: <053.903bfee9104d42ff8da2669f868fc1e9@macosforge.org> References: <053.903bfee9104d42ff8da2669f868fc1e9@macosforge.org> Message-ID: <062.8b405ef2a3fdd883ab9aca5789639f2a@macosforge.org> #1317: Coordinates of CLLocation are not accesible ------------------------------------+--------------------------------------- Reporter: fdiazgarrido@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): I suspect this problem will be fixed if you will install the latest BridgeSupport preview release (available from http://www.macruby.org/files/). Can you try? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 02:57:22 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 09:57:22 -0000 Subject: [MacRuby] #1318: Attempting to to_yaml recursive references causes segmentation fault in 0.10 Message-ID: <053.3ed85086240a8c9dd863c07292a5035a@macosforge.org> #1318: Attempting to to_yaml recursive references causes segmentation fault in 0.10 ------------------------------------+--------------------------------------- Reporter: leon.spencer@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: yaml, segfault ------------------------------------+--------------------------------------- irb(main):001:0> require 'yaml' => true irb(main):002:0> a = [] => [] irb(main):003:0> a << a => [[...]] irb(main):004:0> a.to_yaml Segmentation fault -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 13:34:09 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 20:34:09 -0000 Subject: [MacRuby] #1319: MacRuby needs more memory than the file size even if gets only 1 byte from head of huge file. Message-ID: <051.f49cb332f3f779ff806fb27df77fae16@macosforge.org> #1319: MacRuby needs more memory than the file size even if gets only 1 byte from head of huge file. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby def memory pid = $$ str = `ps alx | grep '#{pid}.*ruby'` str.split[7] end File.open(ARGV[0], "r") {|f| f.getc puts memory + " KB" } }}} {{{ $ ruby -e 'str = "x" * 1024; 1024.times do; print str; end' > 1mb.txt $ macruby test_io_getc.rb 1mb.txt 14928 KB $ ruby -e 'str = "x" * 1024 * 100; 1024.times do; print str; end' > 100mb.txt $ macruby test_io_getc.rb 100mb.txt 116484 KB $ ruby -e 'str = "x" * 1024 * 500; 1024.times do; print str; end' > 500mb.txt $ macruby test_io_getc.rb 500mb.txt 526076 KB }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 15:32:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 22:32:08 -0000 Subject: [MacRuby] #1268: force_encoding on NSStrings with Net::HTTP In-Reply-To: <052.4b9186120f76876ed07ad2a6ee8da9c8@macosforge.org> References: <052.4b9186120f76876ed07ad2a6ee8da9c8@macosforge.org> Message-ID: <061.31ef27e5a2ee4c2131f12c96c05eb577@macosforge.org> #1268: force_encoding on NSStrings with Net::HTTP -----------------------------------+---------------------------------------- Reporter: eric@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: I had a quick look and realized that NSString#dup returns a NSString copy, therefore s.dup.force_encoding(...) will not work on NSStrings. I changed NSString#dup to return a RubyString in https://github.com/MacRuby/MacRuby/commit/3e200e8341a17797c8af79d7b781372a27f471b2 and this should fix the problem. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 15:33:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 22:33:01 -0000 Subject: [MacRuby] #1316: net/http form_data chokes on instances of NSString In-Reply-To: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> References: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> Message-ID: <065.6bd183b3458acfd4a4db68ed2df835d5@macosforge.org> #1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: I think the problem should be fixed by https://github.com/MacRuby/MacRuby/commit/3e200e8341a17797c8af79d7b781372a27f471b2, please give master branch or tonight's nightly build a try. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 16:10:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 23:10:31 -0000 Subject: [MacRuby] #1310: JSON.parse fails with NSString In-Reply-To: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> References: <052.25455c0b3dcb1ca7c407411c2fb3d35a@macosforge.org> Message-ID: <061.9f5675aee9d39079a8fdb0a229e2192c@macosforge.org> #1310: JSON.parse fails with NSString -----------------------------------+---------------------------------------- Reporter: isaackearse@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Done as https://github.com/MacRuby/MacRuby/commit/d178850ccd4ff2ceef60323811b710a49602e64b. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 16:50:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 06 Jun 2011 23:50:44 -0000 Subject: [MacRuby] #1320: Adding a new method_missing to the TopLevel breaks calls to super Message-ID: <053.ce3947858a8a48902fccd9bee373df5f@macosforge.org> #1320: Adding a new method_missing to the TopLevel breaks calls to super ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- {{{ module A def method_missing method, *args super end end include A method_missing :test_method }}} This works with CRuby 1.9.2 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 18:07:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 07 Jun 2011 01:07:25 -0000 Subject: [MacRuby] #1316: net/http form_data chokes on instances of NSString In-Reply-To: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> References: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> Message-ID: <065.083d97d8388f994b3845518289893fb4@macosforge.org> #1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Comment(by greg.borenstein@?): Do you mean this build? http://www.macruby.org/files/nightlies/macruby_nightly-2011-06-06.pkg Or will it be the next one? This problem is still present for me with that build. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 6 18:32:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 07 Jun 2011 01:32:10 -0000 Subject: [MacRuby] #1316: net/http form_data chokes on instances of NSString In-Reply-To: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> References: <056.fe0c6ea8cea782774e743a54dad0bff3@macosforge.org> Message-ID: <065.a442c5b1171fedc60aa54752905b6211@macosforge.org> #1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Comment(by watson1978@?): macruby_nightly-2011-06-06.pkg made based on https://github.com/MacRuby/MacRuby/commit/62f32b21b97786ff2d4b88e3ae3522221f3452c6 {{{ $ macruby -e 'p MACRUBY_REVISION' "git commit 62f32b21b97786ff2d4b88e3ae3522221f3452c6" }}} Please wait next time. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 7 08:39:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 07 Jun 2011 15:39:32 -0000 Subject: [MacRuby] #1321: ObjcC/C++ exception thrown but not caught on NoMethodError Message-ID: <053.95af4049013979490fa1eb9ee1f5435d@macosforge.org> #1321: ObjcC/C++ exception thrown but not caught on NoMethodError ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- {{{ framework 'Cocoa' NSDictionary.alloc.initWithKeysAndObjects(1,2,nil) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 7 10:22:43 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 07 Jun 2011 17:22:43 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.1ab84123a6e3db3f9eeadbf3abb3f824@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by mrada@?): It seems that all core types are not handled properly by the generate_json function. Other objective-c types return an NSString when #to_s is called. However, simply changing generate_json to call String() instead of #to_s, or even just handling NSString, will only fix crashing. The generator will still not generate the correct JSON for objective-c core types. This is a fairly major regression in the library and I think it should be a 0.11 blocker. {{{ framework 'Cocoa' [NSDictionary.alloc.initWithObjectsAndKeys(1,2,nil)].to_json }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 9 18:17:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 10 Jun 2011 01:17:26 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.f9be39e324b1e8fc85cc04aa8130809a@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.11-blocker Comment: Let's try to do that for the upcoming release. Adding 0.11-blocker keyword. We need to add a custom -finalize method to the given class inside rb_data_object_alloc() (but only once of course). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 9 18:18:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 10 Jun 2011 01:18:44 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.2eaf8b8baf2b0211b79862c0e79cbdd7@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * keywords: reduction => reduction 0.11-blocker Comment: Agreed, adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 11 22:55:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 12 Jun 2011 05:55:18 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 Message-ID: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Seems that Xcode 4.1 and 4.2 are unable to link in IB outlets and actions. There is a faster fix for that? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 12 06:12:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 12 Jun 2011 13:12:14 -0000 Subject: [MacRuby] #1322: Xcode 4.1/4.2 In-Reply-To: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> References: <057.d1af71e9afb5deed33ab3294af73dc7b@macosforge.org> Message-ID: <066.020f8bb941ee485a485740c148d5cfde@macosforge.org> #1322: Xcode 4.1/4.2 ----------------------------------------+----------------------------------- Reporter: d.dagostino@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by guido.soranzio@?): I opened a specific thread in the Apple forum for registered developers two months ago (https://devforums.apple.com/thread/95563) but it has been deserted. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 12 11:40:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 12 Jun 2011 18:40:47 -0000 Subject: [MacRuby] #1323: memory leak occurs when use a exception which was inherited by Exception. Message-ID: <051.96a4a7cb204a19995485dbd577a84d02@macosforge.org> #1323: memory leak occurs when use a exception which was inherited by Exception. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby def memory pid = $$ str = `ps alx | grep '#{pid}.*ruby'` str.split[7] end Thread.start { sec = 0 loop do puts "#{sec} sec : " + memory + " KB" sleep 10 sec += 10 end } #===================== class Custom_Exception < Exception end def foo begin bar rescue Custom_Exception end end def bar begin baz rescue #rescue Custom_Exception # does not catch the Custom_Exception puts "non Custom_Exception" end end def baz raise Custom_Exception end loop do foo end }}} Result: {{{ $ macruby raise.rb 0 sec : 13744 KB 10 sec : 494708 KB 20 sec : 971928 KB 30 sec : 1420644 KB 40 sec : 1896572 KB }}} This problem seems to occur if does not catch the inherited Exception at first begin-rescue. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 12 12:08:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 12 Jun 2011 19:08:44 -0000 Subject: [MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError) In-Reply-To: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> References: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> Message-ID: <063.f54c0fc106095ccf1963cae993d87111@macosforge.org> #542: Attempt to unlock a mutex which is not locked (ThreadError) -------------------------------------+-------------------------------------- Reporter: valerii.hiora@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by jhemmelg@?): Replying to [comment:4 lsansonetti@?]: > Can't seem to reproduce this with master: It is still happening on my system. I get about 300,000 loops per second, so I get a lot more mutex lock/unlock cycles. Your machine is fast! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 12 15:52:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 12 Jun 2011 22:52:32 -0000 Subject: [MacRuby] #1324: memory leak occurs with eval. Message-ID: <051.726af47442210a5adb42ce8ce1ddb97b@macosforge.org> #1324: memory leak occurs with eval. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby def memory pid = $$ str = `ps alx | grep '#{pid}.*ruby'` str.split[7] end Thread.start { sec = 0 loop do puts "#{sec} sec : " + memory + " KB" sleep 10 sec += 10 end } loop do eval "a = 42" end }}} Result: {{{ $ macruby eval.rb 0 sec : 13316 KB 10 sec : 70432 KB 20 sec : 124400 KB 30 sec : 189016 KB 40 sec : 228328 KB 50 sec : 312684 KB 60 sec : 352976 KB }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 12 22:02:33 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 05:02:33 -0000 Subject: [MacRuby] #1325: Segfault occurs with Matrix#inv Message-ID: <051.a4f4d0efe3bab5d5505751aa5f81a71b@macosforge.org> #1325: Segfault occurs with Matrix#inv ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'mathn' def matrix(dimension) rows = Array.new (1..dimension).each do |i| row = Array.new (1..dimension).each do |j| row.push(1/(i + j - 1)) end rows.push(row) end return(Matrix.rows(rows)) end m = matrix(30) m.inv }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000010 0x00007fff84f2b11c in objc_msgSend () (gdb) bt 20 #0 0x00007fff84f2b11c in objc_msgSend () #1 0x00000001000c558f in rb_objc_supports_forwarding (recv=8592468192, sel=0x100f26460) at objc.m:109 #2 0x000000010012ce3d in rb_vm_dispatch () at dispatcher.cpp:674 #3 0x00000001000d9ca1 in rb_vm_call0 (vm=0x100f23290, top=0, self=8592468192, klass=0x0, sel=0x100f26460, block=0x0, opt=2 '\002', argc=1, argv=0x7fff5fbf67c0) at vm.h:657 #4 0x00000001000dadc6 in rb_vm_call2 (block=0x0, self=8592468192, klass=0, sel=0x100f26460, argc=1, argv=0x7fff5fbf67c0) at vm.h:682 #5 0x00000001000dac66 in rb_call (recv=8592468192, mid=60, argc=1, argv=0x7fff5fbf67c0, scope=1, pass_current_block=false) at vm_eval.c:32 #6 0x00000001000dafe9 in rb_funcall (recv=8592468192, mid=60, n=1) at vm_eval.c:106 #7 0x00000001000892b1 in f_negative_p (x=8592468192) at rational.c:164 #8 0x000000010008916f in f_gcd (x=8592468192, y=139417291019515137) at rational.c:278 #9 0x0000000100089886 in f_addsub (self=8590808512, anum=18446743882439999117, aden=8592468192, bnum=18446744073164624117, bden=139417291019515137, k=45) at rational.c:652 #10 0x0000000100089df0 in nurat_sub (self=8590808512, sel=0x100f26540, other=8592438080) at rational.c:746 #11 0x000000010012e20e in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:161 #12 0x000000010012e20e in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #13 0x000000010012e20e in rb_vm_dispatch () at dispatcher.cpp:886 #14 0x0000000101600414 in ?? () #15 0x0000000101604b54 in ?? () #16 0x0000000101626f84 in ?? () #17 0x0000000100134737 in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:100 #18 0x0000000100134737 in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1248 #19 0x0000000100134737 in rb_vm_yield_args () at dispatcher.cpp:1305 (More stack frames follow...) (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 13 06:05:02 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 13:05:02 -0000 Subject: [MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError) In-Reply-To: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> References: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> Message-ID: <063.774b2d623e68219f54677b08bf8a41fa@macosforge.org> #542: Attempt to unlock a mutex which is not locked (ThreadError) -------------------------------------+-------------------------------------- Reporter: valerii.hiora@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by jhemmelg@?): I took a further look through the mutex code and found what I think is part of the problem. In the file thread.c, rb_mutex_unlock0(), line 1510: {{{ pthread_assert(pthread_mutex_unlock(&m->mutex)); m->thread = NULL; }}} The assignment to m->thread is made after m->mutex is unlocked. This appears to create a race condition. I swapped these two lines and it made my test program work. {{{ m->thread = NULL; pthread_assert(pthread_mutex_unlock(&m->mutex)); }}} With this change my test program no longer fails. However, the error from running the imap test has changed: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -e "require 'net/imap'; imap = Net::IMAP.new('imap.gmail.com', 993, true); imap.login('somebody','somepassword')" /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/monitor.rb:189:in `mon_exit': Attempt to unlock a mutex which is locked by another thread (ThreadError) from /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/monitor.rb:203:in `synchronize' from -e:1:in `
' }}} I took a look at the code for MonitorMixin, which imap uses for the synchronize() call. It looks like the error I am getting is impossible, because the monitor code saves and checks the thread id outside of the mutex doing the same thing. The monitor code doesn't complain about the thread id's not matching but the mutex does. I will look into this further. I can not be certain that there are no further race conditions in the mutex code. This is why this is not submitted as a patch. I have a couple of questions about the mutex implementation. I was looking into the code for mutex in the 1.9.2-p136 release and it looks fairly different. In that code the thread variable is used as the ruby- level mutex variable, and the mutex is used only to protect access to it. Why are the implementations different and would it make sense to pull that implementation over? Alternatively, would an implementation of mutex using the high-performance semaphore from GCD be worth considering? Or would it be better to just review the existing code for race conditions and move on from there? I would be happy to work on this no matter the direction, but I don't want to waste time working on something that would not be acceptable to the team. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 13 06:50:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 13:50:41 -0000 Subject: [MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError) In-Reply-To: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> References: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> Message-ID: <063.bccb41eebc415da556d84aa4b6b75f43@macosforge.org> #542: Attempt to unlock a mutex which is not locked (ThreadError) -------------------------------------+-------------------------------------- Reporter: valerii.hiora@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by watson1978@?): I guess that your changing is correct. the following script did not work before applying your changing in my environment. {{{ #!ruby require 'thread' m = Mutex.new r = 0 max = 100 (1..max).map{ Thread.new{ i=0 while i MacRuby From ruby-noreply at macosforge.org Mon Jun 13 07:13:42 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 14:13:42 -0000 Subject: [MacRuby] #1326: Cannot create nested modules with names used by Cocoa classes when using the C API Message-ID: <053.186d3748fde5af2d087158bccdeaae1c@macosforge.org> #1326: Cannot create nested modules with names used by Cocoa classes when using the C API ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Referring to: https://gist.github.com/66da73fa9f138ff49882 If you use rb_define_module_under() to create a new module in a different module, it will fail if the new modules name is the same as a Cocoa class (e.g. "NSString"): {{{ mTest = rb_define_module("Test"); rb_define_module_under(mTest, "NSString"); // TypeError: Test::NSString:Class is not a module }}} The weird part is that this will not fail if you wrote the code in pure Ruby: {{{ module Test module NSString end end }}} This is an inconsistency. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 13 12:08:21 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 19:08:21 -0000 Subject: [MacRuby] #1327: Ruby Constants in Lion Message-ID: <060.d17564ab9f49296fa1f656bd85016c08@macosforge.org> #1327: Ruby Constants in Lion -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: Lion -------------------------------------------+-------------------------------- I've been trying to test my app on the latest version of Lion (Build 11A459e) with the latest developer preview of Xcode 4 and both the 0.10 and latest nightly build of MacRuby. I've searched both MacRuby.org and apples dev forums but haven't found any reference to whether MacRuby supports Lion yet... but I thought it worth logging this bug. To find it in it's simplest state I started be creating a standard MacRuby app from Xcode's template, and then modified the AppDelegate file so that it looked like the following: class AppDelegate attr_accessor :window Constant_Number = 3 def applicationDidFinishLaunching(a_notification) # Insert code here to initialize your application print "#{Constant_Number}" end end Which produces the following error in the console when the application is run: unknown: warning: already initialized constant DDMap 2011-06-13 19:50:59.987 Io[1011:503] /Users/harry/Library/Developer/Xcode/DerivedData/Io- dqbjbwecwbbpzmbqqzwbrodltwxd/Build/Products/Debug/Io.app/Contents/Resources/AppDelegate.rb:17:in `applicationDidFinishLaunching': uninitialized constant Constant_Number (NameError) from /Users/harry/Library/Developer/Xcode/DerivedData/Io- dqbjbwecwbbpzmbqqzwbrodltwxd/Build/Products/Debug/Io.app/Contents/Resources/rb_main.rb:23:in `
' I hope you don't feel this contravenes the NDA.. I don't think it should.. as it's not really revealing anything about Lion. I hope support for Lion isn't too far down the list. All the best Harry -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 13 12:13:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 19:13:04 -0000 Subject: [MacRuby] #1327: Ruby Constants in Lion In-Reply-To: <060.d17564ab9f49296fa1f656bd85016c08@macosforge.org> References: <060.d17564ab9f49296fa1f656bd85016c08@macosforge.org> Message-ID: <069.b9176d67d72b1c404b5ef8fa85d7fbd8@macosforge.org> #1327: Ruby Constants in Lion -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: critical | Milestone: Component: MacRuby | Resolution: duplicate Keywords: Lion | -------------------------------------------+-------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => duplicate Comment: MacRuby works fine on Lion, however you're using a nightly build of MacRuby, which contains a silly regression regarding const lookup inside Objective-C scopes (see #1285). We are working on the regression and it will be fixed in the upcoming release. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 13 12:14:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 19:14:57 -0000 Subject: [MacRuby] #1324: memory leak occurs with eval. In-Reply-To: <051.726af47442210a5adb42ce8ce1ddb97b@macosforge.org> References: <051.726af47442210a5adb42ce8ce1ddb97b@macosforge.org> Message-ID: <060.cfe5110d2e3de13494453c97053c8987@macosforge.org> #1324: memory leak occurs with eval. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I commented the call to RoxorCore::delenda() in vm.cpp because it was causing random crashes during spec:ci. If you uncomment the call I think the memory leak will disappear. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 13 14:34:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 13 Jun 2011 21:34:53 -0000 Subject: [MacRuby] #1324: memory leak occurs with eval. In-Reply-To: <051.726af47442210a5adb42ce8ce1ddb97b@macosforge.org> References: <051.726af47442210a5adb42ce8ce1ddb97b@macosforge.org> Message-ID: <060.8bfe476381e44ee251620ec260a4d6c0@macosforge.org> #1324: memory leak occurs with eval. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): I uncommented in rb_vm_run(), it was much better. [[BR]] but it still seems to leak. {{{ $ DYLD_LIBRARY_PATH=. ./macruby ~/tmp/eval.rb 0 sec : 13264 KB 10 sec : 28492 KB 20 sec : 38496 KB 30 sec : 51540 KB 40 sec : 55872 KB 50 sec : 74916 KB 60 sec : 79076 KB 70 sec : 83388 KB 80 sec : 87496 KB 90 sec : 123108 KB 100 sec : 126600 KB 110 sec : 130636 KB 120 sec : 135016 KB }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 14 10:20:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 14 Jun 2011 17:20:54 -0000 Subject: [MacRuby] #1328: New Xcode project fails to build Message-ID: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> #1328: New Xcode project fails to build ----------------------------------+----------------------------------------- Reporter: mjijackson@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: macruby_deploy ----------------------------------+----------------------------------------- I started a brand new Xcode project and tried to build it, but macruby_deploy is complaining that it can't find the .app. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 14 10:26:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 14 Jun 2011 17:26:32 -0000 Subject: [MacRuby] #1328: New Xcode project fails to build In-Reply-To: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> References: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> Message-ID: <060.7a7169bb28fa9628b77f7fc82c48df5c@macosforge.org> #1328: New Xcode project fails to build ----------------------------------+----------------------------------------- Reporter: mjijackson@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: macruby_deploy ----------------------------------+----------------------------------------- Comment(by mjijackson@?): I should also clarify that I'm using Xcode 4.0.2 (4A2002a) and MacRuby 0.10. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 14 11:03:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 14 Jun 2011 18:03:16 -0000 Subject: [MacRuby] #1328: New Xcode project fails to build In-Reply-To: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> References: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> Message-ID: <060.8bdae5c4495c8a2b86f4a0e235d3b70f@macosforge.org> #1328: New Xcode project fails to build ----------------------------------+----------------------------------------- Reporter: mjijackson@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: macruby_deploy ----------------------------------+----------------------------------------- Comment(by mrada@?): It looks like you did not build the app before you tried running the Deploy target. It is a bit confusing at first, but you need to run the "Watcher" target first to actually create the Watcher.app bundle, and then run the deployment target to compile your code and embed the MacRuby framework. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 14 11:11:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 14 Jun 2011 18:11:45 -0000 Subject: [MacRuby] #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first Message-ID: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- By not setting the dependency, it is possible for people who are new to run the deployment before building their app. This is bad for at least two reasons: 1. If you have made changes since the last build (e.g. a bug fix) and you deploy before building an updated version of the app, you will build a deployed app with a bug. 2. If the app has never been built (or you cleaned out the old build), you will get a confusing error about the app not existing. For problem 2 I added an extra message to macruby_deploy to message users if the app does not exist (https://github.com/MacRuby/MacRuby/commit/ced3d91ec99e0e82f180a7abbf4a536d69a66dab), but that is really just a band-aid solution. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 14 14:06:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 14 Jun 2011 21:06:54 -0000 Subject: [MacRuby] #1328: New Xcode project fails to build In-Reply-To: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> References: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> Message-ID: <060.cc925d60e367e1ea7914a4c28f9a7def@macosforge.org> #1328: New Xcode project fails to build ----------------------------------+----------------------------------------- Reporter: mjijackson@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: macruby_deploy ----------------------------------+----------------------------------------- Comment(by mjijackson@?): Ah, I see. Thanks for clearing this up. I'm not accustomed to using various build/deploy targets, and I hadn't noticed that I was using the Deployment target. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 16:19:06 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 15 Jun 2011 23:19:06 -0000 Subject: [MacRuby] #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first In-Reply-To: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> References: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> Message-ID: <062.c6ebe06ad0f340133d4dfd1392da74c7@macosforge.org> #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.11-blocker Comment: This looks indeed serious enough to be a 0.11 blocker, so I'm adding the keyword. The band-aid solution you added is nice though :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 16:21:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 15 Jun 2011 23:21:26 -0000 Subject: [MacRuby] #1328: New Xcode project fails to build In-Reply-To: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> References: <051.a8c2cf1e1b924f9b7819fb680fb01525@macosforge.org> Message-ID: <060.df25268e610c4c27bc4710083b286ffd@macosforge.org> #1328: New Xcode project fails to build ----------------------------------+----------------------------------------- Reporter: mjijackson@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: macruby_deploy | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => invalid Comment: Closing as invalid, however please note that we are tracking #1329 which will make sure the deployment target depends on the build target. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 16:29:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 15 Jun 2011 23:29:37 -0000 Subject: [MacRuby] #1325: Segfault occurs with Matrix#inv In-Reply-To: <051.a4f4d0efe3bab5d5505751aa5f81a71b@macosforge.org> References: <051.a4f4d0efe3bab5d5505751aa5f81a71b@macosforge.org> Message-ID: <060.7dde64cc186cd16a3a1ff8c0f30bc07d@macosforge.org> #1325: Segfault occurs with Matrix#inv ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Disabling GC makes the bug disappear. So I suspect a missing write barrier here. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 16:50:02 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 15 Jun 2011 23:50:02 -0000 Subject: [MacRuby] #1325: Segfault occurs with Matrix#inv In-Reply-To: <051.a4f4d0efe3bab5d5505751aa5f81a71b@macosforge.org> References: <051.a4f4d0efe3bab5d5505751aa5f81a71b@macosforge.org> Message-ID: <060.c3f9ff50ea8ebb6a4d58dff42658f02c@macosforge.org> #1325: Segfault occurs with Matrix#inv ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Should be fixed by https://github.com/MacRuby/MacRuby/commit/39bb4bd7014e39267185881f9037efe595de178a -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 17:55:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 00:55:24 -0000 Subject: [MacRuby] #1321: ObjcC/C++ exception thrown but not caught on NoMethodError In-Reply-To: <053.95af4049013979490fa1eb9ee1f5435d@macosforge.org> References: <053.95af4049013979490fa1eb9ee1f5435d@macosforge.org> Message-ID: <062.8951a3db5e04a51fdb28cbbdb12b0e1c@macosforge.org> #1321: ObjcC/C++ exception thrown but not caught on NoMethodError ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): This happens when #method_missing tries to construct the NameError exception, by sending #inspect on the receiver, a Hash that hasn't been initialized, which raises a pure Objective-C exception inside nshash_inspect. I believe we have at least 2 bugs covering the same problem in the tracker. Basically we need to wrap all Objective-C calls inside exception handlers in all registered methods of NSArray.m, NSString.m and NSDictionary.m. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 19:11:55 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 02:11:55 -0000 Subject: [MacRuby] #1292: slows down method dispatch at "git commit 68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5" In-Reply-To: <047.b1a2e1fff5849d9fbf3a30aa19db93f3@macosforge.org> References: <047.b1a2e1fff5849d9fbf3a30aa19db93f3@macosforge.org> Message-ID: <056.3911dc43829db41565b37392df2fd47f@macosforge.org> #1292: slows down method dispatch at "git commit 68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5" ------------------------------+--------------------------------------------- Reporter: kouji@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------+--------------------------------------------- Comment(by kouji@?): Done as https://github.com/MacRuby/MacRuby/commit/7b14592ab1b9b2d2b05f7393251713682d6cd6eb. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 19:12:20 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 02:12:20 -0000 Subject: [MacRuby] #1285: Constants missing error when the constants are declared in the class definition In-Reply-To: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> References: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> Message-ID: <054.fb604c05934380054a32e347bb2ac632@macosforge.org> #1285: Constants missing error when the constants are declared in the class definition ----------------------------+----------------------------------------------- Reporter: tglee@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------+----------------------------------------------- Comment(by kouji@?): Done as https://github.com/MacRuby/MacRuby/commit/7b14592ab1b9b2d2b05f7393251713682d6cd6eb. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 15 19:20:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 02:20:47 -0000 Subject: [MacRuby] #1327: Ruby Constants in Lion In-Reply-To: <060.d17564ab9f49296fa1f656bd85016c08@macosforge.org> References: <060.d17564ab9f49296fa1f656bd85016c08@macosforge.org> Message-ID: <069.d9b6bf7b85238627282929230092c21e@macosforge.org> #1327: Ruby Constants in Lion -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: critical | Milestone: Component: MacRuby | Resolution: duplicate Keywords: Lion | -------------------------------------------+-------------------------------- Comment(by kouji@?): FYI: Done as https://github.com/MacRuby/MacRuby/commit/7b14592ab1b9b2d2b05f7393251713682d6cd6eb. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 00:34:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 07:34:44 -0000 Subject: [MacRuby] #1285: Constants missing error when the constants are declared in the class definition In-Reply-To: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> References: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> Message-ID: <054.9fb3b6bbe019a9b193411c822cf883e6@macosforge.org> #1285: Constants missing error when the constants are declared in the class definition ----------------------------+----------------------------------------------- Reporter: tglee@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------+----------------------------------------------- Comment(by tglee@?): Replying to [comment:7 kouji@?]: > Done as https://github.com/MacRuby/MacRuby/commit/7b14592ab1b9b2d2b05f7393251713682d6cd6eb. Thanks for your great commits. I have checked your commit so that I am sure the issue is fixed. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 01:26:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 08:26:50 -0000 Subject: [MacRuby] #1285: Constants missing error when the constants are declared in the class definition In-Reply-To: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> References: <045.8924c57d791dbd73adf0f6d9cdcf7648@macosforge.org> Message-ID: <054.8cc7bbf571d8ee227bf15df91441a368@macosforge.org> #1285: Constants missing error when the constants are declared in the class definition ----------------------------+----------------------------------------------- Reporter: tglee@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | ----------------------------+----------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 01:27:30 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 08:27:30 -0000 Subject: [MacRuby] #1292: slows down method dispatch at "git commit 68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5" In-Reply-To: <047.b1a2e1fff5849d9fbf3a30aa19db93f3@macosforge.org> References: <047.b1a2e1fff5849d9fbf3a30aa19db93f3@macosforge.org> Message-ID: <056.5063fe1e6a90e1a5a51631279136b360@macosforge.org> #1292: slows down method dispatch at "git commit 68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5" ------------------------------+--------------------------------------------- Reporter: kouji@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 14:24:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 16 Jun 2011 21:24:15 -0000 Subject: [MacRuby] #1330: GCD freezes when sync is called from within async > 10000 times Message-ID: <058.ea0f277aa40b1721d238074a00703c10@macosforge.org> #1330: GCD freezes when sync is called from within async > 10000 times -----------------------------------------+---------------------------------- Reporter: niko.schwarz@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------------+---------------------------------- The following code snippet freezes for the loop being executed 10000 times (0 % cpu usage and doesn't finish), but finishes for 1000 times. It should never freeze. #!/usr/bin/env macruby -w @unzipQueue = Dispatch::Queue.new('ch.unibe.niko.unzipQueue') def extractFile(n) @unzipQueue.sync do end end group = Dispatch::Group.new (1..10000).each { | project | Dispatch::Queue.concurrent.async(group) do extractFile(project) end } group.wait I'm not aware of a workable workaround. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 18:13:11 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 17 Jun 2011 01:13:11 -0000 Subject: [MacRuby] #1331: memory leak occurs when calculate binary-tree. Message-ID: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> #1331: memory leak occurs when calculate binary-tree. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- I will atach a test script.[[BR]] when I calculate binary-tree, MacRuby latest needs huge memory. MacRuby 0.10 did not. {{{ $ macruby0.10 -v bm_binary_trees.rb MacRuby 0.10 (ruby 1.9.2) [universal-darwin10.0, x86_64] 19460 KB $ macruby -v bm_binary_trees.rb MacRuby 0.11 (ruby 1.9.2) [universal-darwin10.4, x86_64] 1812296 KB }}} MacRuby 0.10 = 19.4 MB[[BR]] MacRuby 0.11 = 1.8 GB I got a original script from https://github.com/acangiano/ruby-benchmark- suite/blob/master/benchmarks/micro-benchmarks/bm_binary_trees.rb -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 18:41:13 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 17 Jun 2011 01:41:13 -0000 Subject: [MacRuby] #1331: memory leak occurs when calculate binary-tree. In-Reply-To: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> References: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> Message-ID: <060.aa77532c428fe1740dd1f6e2309391d0@macosforge.org> #1331: memory leak occurs when calculate binary-tree. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I'm looking at all objects and GC references and I see a lot of Arrays that are alive. I wonder if your recent GC_MEMMOVE patch is not the cause of this. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 18:53:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 17 Jun 2011 01:53:08 -0000 Subject: [MacRuby] #1331: memory leak occurs when calculate binary-tree. In-Reply-To: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> References: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> Message-ID: <060.873d96fe54f03425bbf70dd4ce5d54ab@macosforge.org> #1331: memory leak occurs when calculate binary-tree. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): It's not related to GC_MEMMOVE, as I still see huge memory usage if I revert the change. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 18:55:40 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 17 Jun 2011 01:55:40 -0000 Subject: [MacRuby] #1331: memory leak occurs when calculate binary-tree. In-Reply-To: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> References: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> Message-ID: <060.f8c4d34ba755c70b73eb5709730b9ddc@macosforge.org> #1331: memory leak occurs when calculate binary-tree. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): I tried with https://github.com/MacRuby/MacRuby/commit/c1833dd1d2764711f3ea658d7e1108e62057dddb already MacRuby needs huge memory. {{{ $ macruby -e 'p MACRUBY_REVISION' "git commit c1833dd1d2764711f3ea658d7e1108e62057dddb" $ macruby bm_binary_trees.rb 1852444 KB }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 19:02:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 17 Jun 2011 02:02:37 -0000 Subject: [MacRuby] #1331: memory leak occurs when calculate binary-tree. In-Reply-To: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> References: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> Message-ID: <060.317d877220f918e190b5b15aca610614@macosforge.org> #1331: memory leak occurs when calculate binary-tree. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Maybe using git bisect would help here? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 19:27:21 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 17 Jun 2011 02:27:21 -0000 Subject: [MacRuby] #1331: memory leak occurs when calculate binary-tree. In-Reply-To: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> References: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> Message-ID: <060.30ea5e28a71dd11d3158a118b443bc00@macosforge.org> #1331: memory leak occurs when calculate binary-tree. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): this problem causes by https://github.com/MacRuby/MacRuby/commit/528a72bdc14f736a67c5bf9c5af0a1df36fff08f I will revert it. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 16 19:44:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 17 Jun 2011 02:44:12 -0000 Subject: [MacRuby] #1331: memory leak occurs when calculate binary-tree. In-Reply-To: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> References: <051.b9dbc8bf21236709fb5f5fbf0cced4d9@macosforge.org> Message-ID: <060.f98338f207fe5c5740e81b98c57b8ed8@macosforge.org> #1331: memory leak occurs when calculate binary-tree. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Fixed with https://github.com/MacRuby/MacRuby/commit/1d057c84b293138aaf70856ae37960dfa5de8cab -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 18 00:47:00 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 18 Jun 2011 07:47:00 -0000 Subject: [MacRuby] #1332: Segfault occurs when run scanf/test_scanf.rb in UnitTest. Message-ID: <051.2e8086fcae2d99abaa5d3d41b7e954f2@macosforge.org> #1332: Segfault occurs when run scanf/test_scanf.rb in UnitTest. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Since https://github.com/MacRuby/MacRuby/commit/7b14592ab1b9b2d2b05f7393251713682d6cd6eb , segfault occurs when run scanf/test_scanf.rb {{{ $ DYLD_LIBRARY_PATH=. ./macruby -I./lib -r test-mri/require_relative.rb test-mri/test/scanf/test_scanf.rb ---------------------------------------- Loaded suite test-mri/test/scanf/test_scanf Started zsh: segmentation fault DYLD_LIBRARY_PATH=. ./macruby -I./lib -r test- mri/require_relative.rb }}} BackTrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000400000000 0x000000010001abd8 in rb_objc_type (obj=17179869184) at class.c:1337 1337 Class k = *(Class *)obj; (gdb) bt 20 #0 0x000000010001abd8 in rb_objc_type (obj=17179869184) at class.c:1337 #1 0x000000010013fa32 in rb_type (obj=17179869184) at ruby.h:939 #2 0x000000010013fa4f in rb_vm_check_if_module (mod=17179869184) at class.h:145 #3 0x0000000100140fc1 in rb_vm_const_lookup_level (outer=17179869184, path=10717, lexical=true, defined=false, outer_stack=0x2002335a0) at vm.cpp:1301 #4 0x0000000101701c45 in ?? () #5 0x0000000101767ae2 in ?? () #6 0x0000000100133e6b in __rb_vm_bcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:98 #7 0x0000000100133e6b in vm_block_eval [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:1221 #8 0x0000000100133e6b in rb_vm_block_eval2 (b=0x2002f0b20, self=8592494464, sel=0x104ec81c0, argc=0, argv=0x0) at dispatcher.cpp:1237 #9 0x000000010012eab4 in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:159 #10 0x000000010012eab4 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:466 #11 0x000000010012eab4 in rb_vm_dispatch () at dispatcher.cpp:872 #12 0x00000001000da025 in rb_vm_call0 (vm=0x100f23230, top=0, self=8592494464, klass=0x2002add60, sel=0x104ec81c0, block=0x0, opt=2 '\002', argc=0, argv=0x7fff5fbf79c8) at vm.h:654 #13 0x00000001000db14a in rb_vm_call2 (block=0x0, self=8592494464, klass=8592743776, sel=0x104ec81c0, argc=0, argv=0x7fff5fbf79c8) at vm.h:679 #14 0x00000001000dafea in rb_call (recv=8592494464, mid=20104, argc=0, argv=0x7fff5fbf79c8, scope=3, pass_current_block=true) at vm_eval.c:32 #15 0x00000001000db46b in send_internal (argc=0, argv=0x7fff5fbf79c8, recv=8592494464, scope=3) at vm_eval.c:129 #16 0x00000001000db4c3 in rb_f_send (recv=8592494464, sel=0x100f272e0, argc=1, argv=0x7fff5fbf79c0) at vm_eval.c:155 #17 0x000000010012e4b3 in ruby_dispatch [inlined] () at /Users/watson/src /macruby-master/dispatcher.cpp:448 #18 0x000000010012e4b3 in rb_vm_dispatch () at dispatcher.cpp:872 #19 0x00000001017004a4 in ?? () (More stack frames follow...) Current language: auto; currently c (gdb) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 18 14:49:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 18 Jun 2011 21:49:03 -0000 Subject: [MacRuby] #1333: #method_missing based metaprogramming is crazy slow compared to CRuby Message-ID: <053.af76885ee730058838b15ed7027765ce@macosforge.org> #1333: #method_missing based metaprogramming is crazy slow compared to CRuby ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Benchmarks are showing about 30-40x slower for me: {{{ require 'rubygems' gem 'minitest', '>= 2.2' require 'minitest/autorun' require 'minitest/benchmark' class BenchMethodMissing < MiniTest::Unit::TestCase def self.bench_range bench_exp 10_000, 1_000_000 end def method_missing method, *args self end def bench_method_missing assert_performance_linear do |n| n.times do self.lol end end end end }}} Results on MacRuby: {{{ BenchMethodMissing 10000 100000 1000000 bench_method_missing 0.146018 1.524551 20.248081 Finished benchmarks in 22.144926s, 0.0452 tests/s, 0.0452 assertions/s. }}} Results on CRuby: {{{ BenchMethodMissing 10000 100000 1000000 bench_method_missing 0.002976 0.035175 0.468302 Finished benchmarks in 0.529412s, 1.8889 tests/s, 1.8889 assertions/s. }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 19 12:56:00 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 19 Jun 2011 19:56:00 -0000 Subject: [MacRuby] #1334: Exceptions don't have backtraces Message-ID: <051.a2c54f8f5f0b9285ffe41100a0dc68dc@macosforge.org> #1334: Exceptions don't have backtraces ----------------------------------+----------------------------------------- Reporter: martin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Hi, in MacRuby 0.10 and the nighly build from 06-19 ([https://github.com/MacRuby/MacRuby/commit/94a97d32fd16e0b88c7271d8e410f98b48d34ce9 94a97d]) exceptions rescued by the 'default handler' only show their message, not their backtrace (if I rescue an exception manually I can get at the backtrace via $@). See https://gist.github.com/1034642 for alloy's workaround. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 19 20:48:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 03:48:10 -0000 Subject: [MacRuby] #1148: Procs used for Cocoa callbacks are being given class objects instance of the instance of the class In-Reply-To: <053.e0a253f86b88bbfefbd9afb75def7228@macosforge.org> References: <053.e0a253f86b88bbfefbd9afb75def7228@macosforge.org> Message-ID: <062.91bf653cb421189c47e8cdd652ba944f@macosforge.org> #1148: Procs used for Cocoa callbacks are being given class objects instance of the instance of the class ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by rob@?): Try this: {{{ class Receivable < Proc def call(sender) super(sender) end end }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 03:20:20 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 10:20:20 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on Message-ID: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: --------------------------------------+------------------------------------- Starting from the nightly build dated 2011-06-14, when you try to load the Nokogiri gem the following NameError is reported: {{{ require 'rubygems' => true require 'nokogiri' NameError: Node is already defined /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/Gems/1.9.2/gems/nokogiri-1.4.6/lib/nokogiri.rb:13:in `
' }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 12:39:46 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 19:39:46 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine Message-ID: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I will include the crash report, since it has all the information I could give. The crash seems to happen no matter what gem I try to install, and I do not see the crash with MacRuby 0.10 The crash is consistent. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:08:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:08:36 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.fe670cf489b48aa9a76eaea4ce6141d6@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Looks like it's crashing inside #framework, though the stack trace could not be 100% accurate due to missing symbols. Have you customized your rubygems? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:13:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:13:08 -0000 Subject: [MacRuby] #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path In-Reply-To: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> References: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> Message-ID: <061.61966a689f322759697500a92e785099@macosforge.org> #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.11-blocker -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): For 0.11, we can simply warn if there is a link path that matches /opt or /usr/local/lib. That should cover 99% cases I believe. We can extend the logic later if necessary. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:13:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:13:48 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.cbc5c6f2537a3d9b597cacd1267684ae@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * keywords: reduction => reduction 0.11-blocker Comment: Adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:27:59 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:27:59 -0000 Subject: [MacRuby] #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path In-Reply-To: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> References: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> Message-ID: <061.38a0e55144bde46f54c54d8adac4a613@macosforge.org> #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.11-blocker -----------------------------------+---------------------------------------- Comment(by mrada@?): This is done. I have chosen to only warn about /opt and /usr/local for now as suggested. Perhaps I should add /Users .... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:30:52 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:30:52 -0000 Subject: [MacRuby] #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path In-Reply-To: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> References: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> Message-ID: <061.4f8025c67ce9f502e26cc0196fd28188@macosforge.org> #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.11-blocker -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): Perhaps /Users and /Library indeed? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:33:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:33:26 -0000 Subject: [MacRuby] #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path In-Reply-To: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> References: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> Message-ID: <061.3ffdf6bae003c624d09d4e221555cc90@macosforge.org> #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.11-blocker -----------------------------------+---------------------------------------- Comment(by martin@?): https://github.com/MacRuby/MacRuby/commit/62f32b21 Here's the commit in question -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:37:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:37:23 -0000 Subject: [MacRuby] #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first In-Reply-To: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> References: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> Message-ID: <062.dc7f6c83d06ce011ed190d075e91fede@macosforge.org> #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------------+--------------------------------------- Comment(by martin@?): See https://github.com/MacRuby/MacRuby/pull/32 Going to send a second pull request that adds the compile/embed targets to core data and document based apps too. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 13:48:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 20:48:08 -0000 Subject: [MacRuby] #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first In-Reply-To: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> References: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> Message-ID: <062.f5245597222219c0a343ff328dfb421d@macosforge.org> #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------------+--------------------------------------- Comment(by martin@?): Done, added it to the pull request. MacRuby Application, MacRuby Core Data Application and MacRuby Document-based Application now all have Unit Tests, Compile and Embed targets with proper dependencies. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 14:54:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 21:54:01 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.0780f1313a6785e2971d91f537848e5c@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): I removed the existing MacRuby install and then ran the nightly build installer, turned off rvm, and this machine has no ~/.gemrc file and I moved the ~/.gem folder so there should be no customizations. I still get the same result. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 14:54:52 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 21:54:52 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.39f7181cd70c7e27f3381f08affd2a66@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): However, as per your hint, I cannot load Foundation in a macirb session... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 14:57:42 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 21:57:42 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.749e1450028ecd649e0030c1154fda02@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): I updated the crash log, that is what happens when I run: {{{ macruby -e "framework 'Foundation'" }}} There are still a couple of missing symbols, but I have no idea what those are... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 15:17:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 22:17:41 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.ec1456c02d697738218eb54d91858595@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Can you go to the directory where you built MacRuby (master preferably), then try the same with ./miniruby -e "framework 'Foundation'" and attach the crash report? It should contain more information such as debugging metadata. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 15:18:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 22:18:44 -0000 Subject: [MacRuby] #505: ivars are not collected after they are re-assigned by an immediate value In-Reply-To: <052.add50691b5f097cc1b76df3d15cae331@macosforge.org> References: <052.add50691b5f097cc1b76df3d15cae331@macosforge.org> Message-ID: <061.8c5034a1197fec4a0248e61bb9c2abef@macosforge.org> #505: ivars are not collected after they are re-assigned by an immediate value -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.11-blocker -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.11-blocker Comment: Let's fix that for 0.11. Adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 15:24:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 22:24:58 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.527d65c311e03655baf180a0b2ff739a@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): I didn't build MacRuby on this machine, I used a nightly build from the website. In the mean time, I've gone back in time using the nightly builds and the break seems to happen between April 16 and April 17. So I installed bridge support preview 3 and that seems to have fixed the problem. I'm not sure if I had an older preview on that machine or no preview at all. So I'll have to find another machine to try this out on... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 15:31:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 22:31:37 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.b0d1a92b82d6234fed2ba31e57422f2a@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Normally, MacRuby master should work regardless of the BridgeSupport version, but maybe a regression was introduced. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 16:04:38 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 20 Jun 2011 23:04:38 -0000 Subject: [MacRuby] #1288: MacRuby displays "reference count underflow" message with rubyspec. In-Reply-To: <051.8d2b7f81ead430069e145af2e67c71a4@macosforge.org> References: <051.8d2b7f81ead430069e145af2e67c71a4@macosforge.org> Message-ID: <060.9aa8e0cc51d9faae99400c688b687fe4@macosforge.org> #1288: MacRuby displays "reference count underflow" message with rubyspec. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by mrada@?): I am experiencing this issue with a ControlTower/Sinatra app that I use at work. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 18:52:05 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 01:52:05 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.c77340512b91bff5b6c444e29181ec0e@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------------+------------------------------------- Changes (by watson1978@?): * priority: minor => blocker Comment: This problem appears since https://github.com/MacRuby/MacRuby/commit/c1833dd1d2764711f3ea658d7e1108e62057dddb {{{ $ macruby test_nokogiri.rb /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/Gems/1.9.2/gems/nokogiri-1.4.6/lib/nokogiri.rb:13:in `
': Node is already defined (NameError) from /Users/watson/tmp/test_nokogiri.rb:2:in `
' $ macruby -e 'p MACRUBY_REVISION' "git commit c1833dd1d2764711f3ea658d7e1108e62057dddb" }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 18:57:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 01:57:04 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.c6a1435c4d380d0d152797a0cd45eb46@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker --------------------------------------+------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.11-blocker Comment: Adding 0.11-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 19:34:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 02:34:24 -0000 Subject: [MacRuby] #505: ivars are not collected after they are re-assigned by an immediate value In-Reply-To: <052.add50691b5f097cc1b76df3d15cae331@macosforge.org> References: <052.add50691b5f097cc1b76df3d15cae331@macosforge.org> Message-ID: <061.baa0e5c8b2ae436081c4c23b59f5aea7@macosforge.org> #505: ivars are not collected after they are re-assigned by an immediate value -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * keywords: 0.11-blocker => * status: new => closed * resolution: => invalid * milestone: MacRuby 1.0 => Comment: I believe the bug is a false positive, it turns out the reduction wasn't good. I double-checked what code the Objective-C compiler generates when assigning ivars to null, and it matches what we do. From http://www.opensource.apple.com/source/objc4/objc4-437/runtime/objc- auto.m: {{{ __private_extern__ id objc_assign_ivar_gc(id value, id base, ptrdiff_t offset) { id *slot = (id*) ((char *)base + offset); if (value) { if (!auto_zone_set_write_barrier(gc_zone, (char *)base + offset, value)) { __private_extern__ void objc_assign_ivar_error(id base, ptrdiff_t offset); _objc_inform("GC: %p + %tu isn't in the auto_zone, break on objc_assign_ivar_error to debug.\n", base, offset); objc_assign_ivar_error(base, offset); } } else *slot = value; return value; } }}} (The write barrier is never emitted if value is null.) Also, I am able to reproduce a crash using this snippet: {{{ ./miniruby -e "class X; def foo; @foo = 'hey'; ocid = @foo.object_id; @foo = nil; ocid; end; end; o=X.new; ocid=o.foo; 1.times { GC.start }; p ObjectSpace._id2ref(ocid)" Segmentation fault }}} Closing as invalid. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 20:16:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 03:16:58 -0000 Subject: [MacRuby] #1303: GC does not actively work with RubySpec after "core/gc". In-Reply-To: <051.d2e999dc05c9ef096fca8f2b5e206759@macosforge.org> References: <051.d2e999dc05c9ef096fca8f2b5e206759@macosforge.org> Message-ID: <060.ae96113b54e068f743b4f8776f837cd5@macosforge.org> #1303: GC does not actively work with RubySpec after "core/gc". ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Indeed it's not necessary, but I like to have GC_WB here for code consistency / readability. As GC_WB() is a macro, and as NULL/0 is a special constant, the compiler will optimize the call to a simple assignment. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 22:44:33 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 05:44:33 -0000 Subject: [MacRuby] #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path In-Reply-To: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> References: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> Message-ID: <061.a25d8b087db24d9d4a0aed03e05ca01e@macosforge.org> #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.11-blocker -----------------------------------+---------------------------------------- Comment(by mrada@?): Updated now in https://github.com/MacRuby/MacRuby/commit/8c90461a361b08cb5f00c40f89b6071e35bc923e -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 20 23:32:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 06:32:08 -0000 Subject: [MacRuby] #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path In-Reply-To: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> References: <052.9bbc60788f7dd4d218f2b1a8a235d238@macosforge.org> Message-ID: <061.f9186bca30fbfeabd66bcdac000343c3@macosforge.org> #1286: macruby_deploy should warn or die when one of the embedded binaries link against a non standard path -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.11 Comment: Thanks! Closing. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 00:08:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 07:08:36 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.a5939f8d0224bfb42cdb6a135a535686@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by kouji@?): Now, reduction URL (https://github.com/ferrous26/broken-macruby) is 404 not found. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 01:30:22 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 08:30:22 -0000 Subject: [MacRuby] #717: Including a module into class Object makes it impossible to override methods, from modules, in class Class or class Module In-Reply-To: <054.52a39ecfed917fb93a1f16ba49d9ac00@macosforge.org> References: <054.52a39ecfed917fb93a1f16ba49d9ac00@macosforge.org> Message-ID: <063.c5e130c4782defe141f0ad5adb6ffbb6@macosforge.org> #717: Including a module into class Object makes it impossible to override methods, from modules, in class Class or class Module -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: mocha #reduction -------------------------------------+-------------------------------------- Comment(by martin@?): Still happening as of https://github.com/MacRuby/MacRuby/commit/8b4d3bd0129c385668b1933ec646a14591661489, but with different output: {{{ $ ruby19 t.rb ObjectMethods ModuleMethods ClassMethods $ macruby t.rb ObjectMethods ClassMethods ClassMethods }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 01:31:19 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 08:31:19 -0000 Subject: [MacRuby] #1248: nested module include bug In-Reply-To: <052.e6cb44832c668d7cf1da45f87fcfe20d@macosforge.org> References: <052.e6cb44832c668d7cf1da45f87fcfe20d@macosforge.org> Message-ID: <061.1e4001e206218bf52f94b9dcc88ff3b2@macosforge.org> #1248: nested module include bug -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by martin@?): Still happening as of https://github.com/MacRuby/MacRuby/commit/8b4d3bd0129c385668b1933ec646a14591661489 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 01:32:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 08:32:48 -0000 Subject: [MacRuby] #718: Defining a method on class Class also defines it on Module and vice versa In-Reply-To: <054.7d63c1ec91ab7420b9fab7d4a8dae144@macosforge.org> References: <054.7d63c1ec91ab7420b9fab7d4a8dae144@macosforge.org> Message-ID: <063.31f8e60ba9945000b85016ed0b19b159@macosforge.org> #718: Defining a method on class Class also defines it on Module and vice versa -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: mocha -------------------------------------+-------------------------------------- Comment(by martin@?): Still happening as of https://github.com/MacRuby/MacRuby/commit/8b4d3bd0129c385668b1933ec646a14591661489 {{{ $ ruby19 t.rb Module Class }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 01:33:07 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 08:33:07 -0000 Subject: [MacRuby] #1304: Block Fails to Return Value Upon Break In-Reply-To: <045.e660bc4224c4d3b928b9b05692fda82b@macosforge.org> References: <045.e660bc4224c4d3b928b9b05692fda82b@macosforge.org> Message-ID: <054.d96963bb0878addbd58aa84120bec7b9@macosforge.org> #1304: Block Fails to Return Value Upon Break ----------------------------+----------------------------------------------- Reporter: techzen@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------+----------------------------------------------- Comment(by martin@?): Still happening as of https://github.com/MacRuby/MacRuby/commit/8b4d3bd0129c385668b1933ec646a14591661489 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 01:33:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 08:33:23 -0000 Subject: [MacRuby] #798: Processing after Proc is not executed when use Proc in lambda, and when calls `return' in Proc. In-Reply-To: <051.00e1a12a7c22cee117739914ef7e50bf@macosforge.org> References: <051.00e1a12a7c22cee117739914ef7e50bf@macosforge.org> Message-ID: <060.803fda4024ab25aa7981d698f6ea8254@macosforge.org> #798: Processing after Proc is not executed when use Proc in lambda, and when calls `return' in Proc. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by martin@?): Still happening as of https://github.com/MacRuby/MacRuby/commit/8b4d3bd0129c385668b1933ec646a14591661489 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 01:35:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 08:35:34 -0000 Subject: [MacRuby] #1120: User defined classes created with singleton methods In-Reply-To: <059.80a2e12edb5d9ed8e459ebeab6638261@macosforge.org> References: <059.80a2e12edb5d9ed8e459ebeab6638261@macosforge.org> Message-ID: <068.99164c64c952d5f331d0806270bf67c7@macosforge.org> #1120: User defined classes created with singleton methods ------------------------------------------+--------------------------------- Reporter: smorss@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- Comment(by martin@?): Can't reproduce with https://github.com/MacRuby/MacRuby/commit/8b4d3bd0129c385668b1933ec646a14591661489 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 01:40:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 08:40:50 -0000 Subject: [MacRuby] #1119: Object initalize with a variable length argument shows up as a public method In-Reply-To: <059.891abdac953b3a8c1202ca6d2b035521@macosforge.org> References: <059.891abdac953b3a8c1202ca6d2b035521@macosforge.org> Message-ID: <068.2724decf1c27c613f273165d6ce201ba@macosforge.org> #1119: Object initalize with a variable length argument shows up as a public method ------------------------------------------+--------------------------------- Reporter: smorss@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- Comment(by martin@?): Can't reproduce with https://github.com/MacRuby/MacRuby/commit/8b4d3bd0129c385668b1933ec646a14591661489 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 04:36:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 11:36:57 -0000 Subject: [MacRuby] #717: Including a module into class Object makes it impossible to override methods, from modules, in class Class or class Module In-Reply-To: <054.52a39ecfed917fb93a1f16ba49d9ac00@macosforge.org> References: <054.52a39ecfed917fb93a1f16ba49d9ac00@macosforge.org> Message-ID: <063.47b4a4a6027cbc92f7d4d21977eae73d@macosforge.org> #717: Including a module into class Object makes it impossible to override methods, from modules, in class Class or class Module -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: mocha #reduction | -------------------------------------+-------------------------------------- Changes (by eloy.de.enige@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: I?m inclined to say that since the only problem now is that including a module into Class also includes it in Module it's now a duplicate of #718. Closing for now. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 04:37:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 11:37:47 -0000 Subject: [MacRuby] #718: Defining a method on class Class also defines it on Module and vice versa In-Reply-To: <054.7d63c1ec91ab7420b9fab7d4a8dae144@macosforge.org> References: <054.7d63c1ec91ab7420b9fab7d4a8dae144@macosforge.org> Message-ID: <063.7bc78eed8e4a8e444520399d06e09fda@macosforge.org> #718: Defining a method on class Class also defines it on Module and vice versa -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: mocha -------------------------------------+-------------------------------------- Comment(by eloy.de.enige@?): In it's current state #717 is most probably a duplicate. But please check that that works as well when fixing this one. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 07:26:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 14:26:27 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.4e21cd3cef29aa90646ca31537e27aaa@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): Yes, I meant to paste the reduction in here since it is smaller now. It still requires rspec and another gem be installed (I chose rest-cliet, but it crashes with other gems as well). First create a file called test.rb with the following contents: {{{ Thread.new do require 'rest-client' end describe 'Something' do it 'should pass a test' do 1.should == 1 end end }}} Then, on the command line: {{{ rspec test.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 10:05:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 17:05:12 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.ea7f850698a0c8910be4f479f20d9dca@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): Ok, so the problem was that machine had an older BridgeSupport Preview. I guess this can be closed as invalid and hopefully other people don't run into that issue. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 10:15:59 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 17:15:59 -0000 Subject: [MacRuby] #1336: macgem install crashes on nightly builds on a specific machine In-Reply-To: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> References: <053.055e91f4d254d66c74ceb869720d290b@macosforge.org> Message-ID: <062.00b00bcb48dae08e51c2a823ac5f5c78@macosforge.org> #1336: macgem install crashes on nightly builds on a specific machine ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ------------------------------------+--------------------------------------- Changes (by eloy.de.enige@?): * status: new => closed * resolution: => invalid -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 12:20:05 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 19:20:05 -0000 Subject: [MacRuby] #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first In-Reply-To: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> References: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> Message-ID: <062.b2c3d374e6ebd1ac6d20d972d28af9f1@macosforge.org> #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Integrated into master as https://github.com/MacRuby/MacRuby/commit/37222dd49a8374e48c68163fc1c06d9578018f12 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 12:32:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 21 Jun 2011 19:32:34 -0000 Subject: [MacRuby] #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first In-Reply-To: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> References: <053.d9260285cd5e9f22a9d82521520bc4d7@macosforge.org> Message-ID: <062.21b6f91343638289b15759375e02ac4d@macosforge.org> #1329: The deployment target for MacRuby Xcode projects does not set a dependency on the app being built first ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | ------------------------------------+--------------------------------------- Comment(by mrada@?): Yay! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 17:56:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 00:56:24 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.dd3510a532bfcdb3ecda0585f00896dc@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by watson1978@?): Does it have problem if NSString#to_s would return a RubyString? {{{ #!diff diff --git a/NSString.m b/NSString.m index 99f47db..4333021 100644 --- a/NSString.m +++ b/NSString.m @@ -64,7 +64,14 @@ nsstr_dup(id rcv, SEL sel) static id nsstr_to_s(id rcv, SEL sel) { - return rcv; + id rstr = (id)str_new_from_cfstring((CFStringRef)rcv); + if (OBJ_TAINTED(rcv)) { + OBJ_TAINT(rstr); + } + if (![rcv respondsToSelector:@selector(setString:)]) { + OBJ_FREEZE(rstr); + } + return rstr; } static id }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 18:24:43 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 01:24:43 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.8e59a98623af6c5fd16d7d6e227fd06c@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): The problem with that solution is that it would only stop the crash. We would still be generating incorrect JSON for NSDictionary since NSDictionary#to_s will be called and it does not generate a valid JSON hash. Then, there is the additional problem that the Object#to_json method is not defined when loading the ext version of json, which means that code that depends on #to_json to be defined on all objects will break. I think the best solution to the problem is https://github.com/ferrous26/MacRuby/commit/bd65650315b, this is because of the way that the generator methods are mixed in the proper classes. However, the same fix cannot be applied to C version of json because of #1326. The other possible fix is to make a change to the method that mixes the generators in so that it mixes them in to the proper Foundation classes. Then there is still https://github.com/ferrous26/MacRuby/commit/8a0f79a5122c8, which adds proper detection, otherwise we are depending on the #to_json or the #to_json.to_s catch-all at the bottom which just adds needless overhead to the generation. Though I think this is something I can push upstream. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 18:41:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 01:41:12 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.233748e1f2badaa89317ff4854fe5690@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by watson1978@?): I don't think best solution to modified the JSON. I think that similar problem will happen in other RubyGems. Whenever problems occur, I think that modifing to the library is hard. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 18:55:59 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 01:55:59 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.06a9c86b18a66264d282ba930a792462@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): I don't want to modify json either, but I don't think we can fix this problem without making at least one or two small changes. You have already made one change before that we have to revert, but is blocked by #1326. I would prefer the least conceptual change, which is what I linked to earlier in my MR fork; but the alternative solution I proposed would be contained to a single file where we modify a single method. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 19:11:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 02:11:56 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.35135c6231af9b1a970e96bc623c4e1c@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): Now that I thought about it some more, I think the second solution would be best. The difference in conceptual changes is about the same, but the second solution is more contained and is not blocked by #1326. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 21 19:50:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 02:50:37 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.2b7037a697f912504aabc8f31851f03b@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): Wait, what am I thinking, that's not right, we still have to deal with https://github.com/MacRuby/MacRuby/blob/master/ext/json/generator/generator.c#L1378 Which is blocked by #1326, the only workaround is to name it differently and handle that special case when we override https://github.com/MacRuby/MacRuby/blob/master/ext/json/lib/json/common.rb#L50 to handle NSString, NSArray, and NSDictionary. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 22 01:32:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 08:32:35 -0000 Subject: [MacRuby] #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky In-Reply-To: <046.58aedceef12fc36f7681f6fc406a733c@macosforge.org> References: <046.58aedceef12fc36f7681f6fc406a733c@macosforge.org> Message-ID: <055.d4e89a234fb9c27fdbcf6f5486a01ab2@macosforge.org> #1315: ScriptingBridge with SystemEvents maps keyCodes on crack and performSelector is wonky ---------------------------------------+------------------------------------ Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: Component: MacRuby | Resolution: invalid Keywords: ScriptingBridge, keycodes | ---------------------------------------+------------------------------------ Changes (by eloy.de.enige@?): * status: new => closed * resolution: => invalid -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 22 06:17:09 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 22 Jun 2011 13:17:09 -0000 Subject: [MacRuby] #1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. Message-ID: <047.8a61e11586660dc80f59f6d8ce6a15d9@macosforge.org> #1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. ------------------------------+--------------------------------------------- Reporter: kouji@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------+--------------------------------------------- 3 tests in test_vm became failure after commited below. {{{ commit c1833dd1d2764711f3ea658d7e1108e62057dddb Author: Laurent Sansonetti Date: Mon Jun 13 15:53:20 2011 -0700 some work on garbage collecting singleton classes - disabled for now since it breaks rubyspec }}} 3 tests are below. {{{ # Test cloning assert "B, [:CONST_M], [:ok]", %{ module M CONST_M = 1 def ok; end end B = M.clone puts B.to_s + ", " + B.constants.to_s + ", " + B.instance_methods(false).to_s } Result: B, [], [:ok] assert "B, [:CONST_A], [:ok]", %{ class A CONST_A = 1 def ok; end end B = A.clone puts B.to_s + ", " + B.constants.to_s + ", " + B.instance_methods(false).to_s } Result: B, [], [:ok] assert "B, [:CONST_C, :CONST_A], []", %{ class A CONST_A = 1 def ok; end end class C < A CONST_C = 1 end B = C.clone puts B.to_s + ", " + B.constants.to_s + ", " + B.instance_methods(false).to_s } Result: B, [:CONST_A], [] }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 22 22:32:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 05:32:54 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.b953c354cf868f7060caa1b98a66a42e@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): A minimum fix is now applied in https://github.com/MacRuby/MacRuby/commit/3809805cfe11db21d96fca60b06f62f11e2d2b30 Which should be sufficient for this issue to be closed. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 00:07:59 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 07:07:59 -0000 Subject: [MacRuby] #1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. In-Reply-To: <047.8a61e11586660dc80f59f6d8ce6a15d9@macosforge.org> References: <047.8a61e11586660dc80f59f6d8ce6a15d9@macosforge.org> Message-ID: <056.ccca95055f4a4348acbda88ff6a981ed@macosforge.org> #1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. ------------------------------+--------------------------------------------- Reporter: kouji@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------+--------------------------------------------- Comment(by kouji@?): This issue is fixed a patch below. However, this changes was removed in c1833dd1d2764711f3ea658d7e1108e62057dddb (see https://github.com/MacRuby/MacRuby/commit/c1833dd1d2764711f3ea658d7e1108e62057dddb#L11L195 ). Laurent, could you check this patch and apply if this patch is correct? {{{ Changes in HEAD Modified object.c diff --git a/object.c b/object.c index dc35d69..0de54a9 100644 --- a/object.c +++ b/object.c @@ -192,6 +192,13 @@ rb_obj_class(VALUE obj) static void init_copy(VALUE dest, VALUE obj) { + if (NATIVE(obj)) { + if (OBJ_TAINTED(obj)) { + OBJ_TAINT(dest); + } + goto call_init_copy; + } + if (OBJ_FROZEN(dest)) { rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest)); @@ -239,7 +246,7 @@ init_copy(VALUE dest, VALUE obj) } break; } - +call_init_copy: rb_vm_call(dest, selInitializeCopy, 1, &obj); } }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 08:17:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 15:17:37 -0000 Subject: [MacRuby] #1338: Can't set origin.x of a NSRect directly Message-ID: <051.0321411764c36f5e5e58f738a7ed41c3@macosforge.org> #1338: Can't set origin.x of a NSRect directly ----------------------------------+----------------------------------------- Reporter: martin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- [code] framework 'Cocoa' view = NSView.alloc.init view.frame.origin.x = 5 p view.frame.origin.x => 0.0 view.frame = [5,0,0,0] p view.frame.origin.x # => 5.0 [/code] Looks like something with accessing structs is broken? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 08:18:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 15:18:35 -0000 Subject: [MacRuby] #1338: Can't set origin.x of a NSRect directly In-Reply-To: <051.0321411764c36f5e5e58f738a7ed41c3@macosforge.org> References: <051.0321411764c36f5e5e58f738a7ed41c3@macosforge.org> Message-ID: <060.99bd1ffc35e4d099d1b62109a93f88d0@macosforge.org> #1338: Can't set origin.x of a NSRect directly ----------------------------------+----------------------------------------- Reporter: martin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by martin@?): {{{ framework 'Cocoa' view = NSView.alloc.init view.frame.origin.x = 5 p view.frame.origin.x => 0.0 view.frame = [5,0,0,0] p view.frame.origin.x # => 5.0 /code }}} Looks like something with accessing structs is broken? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 08:19:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 15:19:44 -0000 Subject: [MacRuby] #1338: Can't set origin.x of a NSRect directly In-Reply-To: <051.0321411764c36f5e5e58f738a7ed41c3@macosforge.org> References: <051.0321411764c36f5e5e58f738a7ed41c3@macosforge.org> Message-ID: <060.41337db0dabb34a8e64bb72451d160e1@macosforge.org> #1338: Can't set origin.x of a NSRect directly ----------------------------------+----------------------------------------- Reporter: martin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by martin@?): {{{ framework 'Cocoa' view = NSView.alloc.init view.frame.origin.x = 5 p view.frame.origin.x => 0.0 view.frame = [5,0,0,0] p view.frame.origin.x # => 5.0 }}} Looks like something with accessing structs is broken? PS.: Sorry for the wrong formatting three times in a row -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 08:23:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 15:23:32 -0000 Subject: [MacRuby] #1338: Can't set origin.x of a NSRect directly In-Reply-To: <051.0321411764c36f5e5e58f738a7ed41c3@macosforge.org> References: <051.0321411764c36f5e5e58f738a7ed41c3@macosforge.org> Message-ID: <060.7da230cfb3d14cd5bbc9e6810962126b@macosforge.org> #1338: Can't set origin.x of a NSRect directly ----------------------------------+----------------------------------------- Reporter: martin@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: invalid Keywords: | ----------------------------------+----------------------------------------- Changes (by eloy.de.enige@?): * status: new => closed * resolution: => invalid Comment: The rect is a copy. You need to get the rect, adjust it, and then assign it to the view again. This should work: {{{ framework 'Cocoa' view = NSView.alloc.init rect = view.frame rect.origin.x = 5 view.frame = rect p view.frame.origin.x # => 5.0 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 14:52:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 21:52:10 -0000 Subject: [MacRuby] #1333: #method_missing based metaprogramming is crazy slow compared to CRuby In-Reply-To: <053.af76885ee730058838b15ed7027765ce@macosforge.org> References: <053.af76885ee730058838b15ed7027765ce@macosforge.org> Message-ID: <062.18bf29216712d41415cbafe0646e81dd@macosforge.org> #1333: #method_missing based metaprogramming is crazy slow compared to CRuby ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): It's because we do a lot of shitload of things before marking a dispatch call as #method_missing. We should probably cache it. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 16:03:13 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 23 Jun 2011 23:03:13 -0000 Subject: [MacRuby] #1339: macruby crashes when initialize() with optional arg called from File.open block Message-ID: <048.8737c90b944bb5da03ebc14ce1d75f11@macosforge.org> #1339: macruby crashes when initialize() with optional arg called from File.open block -------------------------------+-------------------------------------------- Reporter: bigwood@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- the following script will always crash. 0) TTT.initialize() must have an optional argument (past the first argument) 1) TTT.new() has to be called from a File.open() block #!/usr/local/bin/macruby -w # see http://www.macruby.org/documentation/gcd.html class Array def parallel_map(&block) result = [] # Creating a group to synchronize block execution. group = Dispatch::Group.new # We will access the `result` array from within this serial queue, # as without a GIL we cannot assume array access to be thread-safe. result_queue = Dispatch::Queue.new('access-queue.#{result.object_id}') 0.upto(size - 1) do |idx| # Dispatch a task to the default concurrent queue. Dispatch::Queue.concurrent.async(group) do #temp = block.call(self[idx]) temp = block[self[idx]] # same #temp = block === self[idx] # same #puts "sending #{idx}: #{self[idx]} with #{block.class}\n" result_queue.async(group) { result[idx] = temp } end end # Wait for all the blocks to finish. group.wait result end end class TTT #def initialize(string) def initialize(string, dup = false) end end source = $0 (1..2).to_a.parallel_map do |idx| #puts idx File.open(source) do |file| #Dir.chdir("/tmp") do TTT.new("") end end -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 23 19:40:42 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 24 Jun 2011 02:40:42 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.c1415020f60702305ae54559a31303df@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by kouji@?): I am trying to fix this issue. I think maybe require in thread does not work is specification for MacRuby, now. See below. Sometime I got a segv. {{{ $ cd /path/to/macruby $ cat issues/1294/test2.rb t = Thread.new { require "fileutils" } require "fileutils" t.join $ env VM_DISABLE_RBO=1 DYLD_LIBRARY_PATH=/Users/kouji/work/MacRuby/MacRuby ./macruby issues/1294/test2.rb (OK) $ env VM_DISABLE_RBO=1 DYLD_LIBRARY_PATH=/Users/kouji/work/MacRuby/MacRuby ./macruby issues/1294/test2.rb (NG) unknown: warning: already initialized constant FileUtils macruby(980,0x1035db000) malloc: *** error for object 0x104ea5280: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug $ env VM_DISABLE_RBO=1 DYLD_LIBRARY_PATH=/Users/kouji/work/MacRuby/MacRuby ./macruby issues/1294/test2.rb (NG) objc[985]: Class FileUtils is implemented in both ?? and ??. One of the two will be used. Which one is undefined. unknown: warning: already initialized constant FileUtils objc[985]: +[FileUtils resolveClassMethod:private_module_function:] returned YES, but no new implementation of +[FileUtils private_module_function:] was found zsh: segmentation fault env VM_DISABLE_RBO=1 DYLD_LIBRARY_PATH=/Users/kouji/work/MacRuby/MacRuby }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 24 14:18:46 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 24 Jun 2011 21:18:46 -0000 Subject: [MacRuby] #1340: Troubles casting a Pointer from void* to something useful Message-ID: <053.7024d89c795dde3c07c28b573550af1f@macosforge.org> #1340: Troubles casting a Pointer from void* to something useful ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I've got an odd behavior where I am given a void* from a function, and I try to cast it into something useful, but cannot. The documentation for the function says I should be given a CFStringRef, and so I cast it and try to access it, but it looks like it is jumping right into the data structure. I cannot call CFString functions on the pointer, or first index. If I try #[1], it will segfault, I think trying to figure out what the object is (generated from the example code further down): {{{ 0 libobjc.A.dylib 0x00007fff8200a3e6 object_getClass + 11 1 miniruby 0x00000001000deaa4 rb_objc_convert_immediate + 36 (objc.m:570) 2 miniruby 0x000000010013beb9 rb_vm_dispatch + 9177 (dispatcher.cpp:161) }}} Example code: {{{ framework 'Cocoa' current_keyboard = TISCopyCurrentKeyboardInputSource() name = TISGetInputSourceProperty(current_keyboard, KTISPropertyLocalizedName) p name[0] p name.type name.cast!('^{__CFString}') p name[0] # => NSCFString p name[1] # segfault CFStringGetLength(name) # => segfault CFStringGetLength(name[0]) # => uncaught objective-c exception name.cast!('@') p name[0] # => NSCFString p name[1] # segfault CFStringGetLength(name) # => segfault CFStringGetLength(name[0]) # => uncaught objective-c exception }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 24 17:28:30 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 25 Jun 2011 00:28:30 -0000 Subject: [MacRuby] #1333: #method_missing based metaprogramming is crazy slow compared to CRuby In-Reply-To: <053.af76885ee730058838b15ed7027765ce@macosforge.org> References: <053.af76885ee730058838b15ed7027765ce@macosforge.org> Message-ID: <062.09bbaafc2c01242fc63bc678a5065dc0@macosforge.org> #1333: #method_missing based metaprogramming is crazy slow compared to CRuby ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Should be a bit faster with https://github.com/MacRuby/MacRuby/commit/4285742fe5104c9752c4039ce2d49a6441db3aac, but not good enough yet. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jun 24 17:35:19 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 25 Jun 2011 00:35:19 -0000 Subject: [MacRuby] #1340: Troubles casting a Pointer from void* to something useful In-Reply-To: <053.7024d89c795dde3c07c28b573550af1f@macosforge.org> References: <053.7024d89c795dde3c07c28b573550af1f@macosforge.org> Message-ID: <062.97ef93fea7e9fe8d7c5026eca98568ff@macosforge.org> #1340: Troubles casting a Pointer from void* to something useful ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Sadly that's the only use case that MacRuby's Pointer class does not support. This API is declared as returning a `void *' type, which MacRuby assumes it a pointer to *something*, however here it returns a direct reference to a CFString. The #cast! method allows you to change the type of the object being pointed to, but here what you would need instead is a way to cast the Pointer object itself to something else. Pointer#to_object maybe? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 25 19:10:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 26 Jun 2011 02:10:36 -0000 Subject: [MacRuby] #1340: Troubles casting a Pointer from void* to something useful In-Reply-To: <053.7024d89c795dde3c07c28b573550af1f@macosforge.org> References: <053.7024d89c795dde3c07c28b573550af1f@macosforge.org> Message-ID: <062.befb98b10282578c791c8278a854eeef@macosforge.org> #1340: Troubles casting a Pointer from void* to something useful ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Added as https://github.com/MacRuby/MacRuby/commit/e9946381b0021740448845af500bed4e15ee6f6c -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jun 25 20:36:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 26 Jun 2011 03:36:36 -0000 Subject: [MacRuby] #1340: Troubles casting a Pointer from void* to something useful In-Reply-To: <053.7024d89c795dde3c07c28b573550af1f@macosforge.org> References: <053.7024d89c795dde3c07c28b573550af1f@macosforge.org> Message-ID: <062.3606f53873781019cb2845d83fc956d2@macosforge.org> #1340: Troubles casting a Pointer from void* to something useful ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@?): It works! [[Image(http://cdn0.knowyourmeme.com/i/000/106/887/original/backpain-1292835351.jpg)]] -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 26 09:31:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 26 Jun 2011 16:31:01 -0000 Subject: [MacRuby] #1341: StringScanner#scan should not set into Regexp.last_match Message-ID: <051.09afb535ca983318617c9309f6ee428e@macosforge.org> #1341: StringScanner#scan should not set into Regexp.last_match ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'strscan' "hello, world" =~ /hello/ s = StringScanner.new('test string') p s.scan(/\w+/) # -> "test" p $~ # Regexp.last_match }}} Result: {{{ $ ruby19 t.rb "test" # $ macruby t.rb "test" # }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 26 09:47:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 26 Jun 2011 16:47:53 -0000 Subject: [MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError) In-Reply-To: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> References: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> Message-ID: <063.d061a6cde23ee14d0daa9ba369bb596b@macosforge.org> #542: Attempt to unlock a mutex which is not locked (ThreadError) -------------------------------------+-------------------------------------- Reporter: valerii.hiora@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by watson1978@?): This script would reproduce a issue. {{{ #!ruby require "monitor" monitor = Monitor.new cond = monitor.new_cond a = "foo" Thread.start do monitor.synchronize do a = "bar" cond.signal end end monitor.synchronize do p a cond.wait p a end }}} {{{ $ ruby19 test_monitor.rb "foo" "bar" $ macruby test_monitor.rb "foo" "bar" /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/monitor.rb:189:in `exit': Attempt to unlock a mutex which is not locked (ThreadError) from /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/monitor.rb:203:in `synchronize' from /Users/watson/tmp/test_monitor.rb:14:in `
' }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 26 20:31:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 03:31:44 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.e0984a2767f7990ecf25b2be6ebf05d6@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker --------------------------------------+------------------------------------- Comment(by mattaimonetti@?): I personally get: {{{ $ sudo macgem install nokogiri --version 1.4.4 ERROR: Error installing nokogiri: nokogiri requires Ruby version ~> 1.8.0. }}} But Mark and lrz report another error: {{{ sudo macgem install nokogiri Password: ERROR: While executing gem ... (IndexError) You can't cut a surrogate in two in an encoding that is not UTF-16 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 26 20:46:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 03:46:31 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.b3e17d0c2ae6d99c8f34e6866b35a826@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker --------------------------------------+------------------------------------- Comment(by mattaimonetti@?): there was something wrong going on with my env, opening a new tab and going back to 0.10 solved my issue. However, nightly builds still have the problem reported above. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jun 26 22:07:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 05:07:14 -0000 Subject: [MacRuby] #1306: PUT request corrupts binary data (net/http) In-Reply-To: <053.6b4687efe073cdda9e599601686863a3@macosforge.org> References: <053.6b4687efe073cdda9e599601686863a3@macosforge.org> Message-ID: <062.1dcc440464bf239ccd0fe0d5f641ba00@macosforge.org> #1306: PUT request corrupts binary data (net/http) ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): Vincent suggested a workaround where I call #force_encoding(Encoding::BINARY) on the string first, and that works. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 00:47:28 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 07:47:28 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.ef7221e4aa6c6f9be459e0896df820ae@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker --------------------------------------+------------------------------------- Comment(by watson1978@?): In my environment: {{{ $ sudo macgem install nokogiri ERROR: While executing gem ... (IndexError) You can't cut a surrogate in two in an encoding that is not UTF-16 $ sudo macgem install nokogiri --version '= 1.4.4' Building native extensions. This could take a while... Successfully installed nokogiri-1.4.4 1 gem installed $ sudo macgem install nokogiri --version '= 1.4.6' Building native extensions. This could take a while... Successfully installed nokogiri-1.4.6 1 gem installed }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 12:42:33 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 19:42:33 -0000 Subject: [MacRuby] #1341: StringScanner#scan should not set into Regexp.last_match In-Reply-To: <051.09afb535ca983318617c9309f6ee428e@macosforge.org> References: <051.09afb535ca983318617c9309f6ee428e@macosforge.org> Message-ID: <060.8bfa8ca2effdbb539437493a05ded853@macosforge.org> #1341: StringScanner#scan should not set into Regexp.last_match ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Is it the same problem as #939 (maybe)? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 16:41:06 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 23:41:06 -0000 Subject: [MacRuby] #1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. In-Reply-To: <047.8a61e11586660dc80f59f6d8ce6a15d9@macosforge.org> References: <047.8a61e11586660dc80f59f6d8ce6a15d9@macosforge.org> Message-ID: <056.bebbe7d956719682dc42e5fa1021ebf0@macosforge.org> #1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. ------------------------------+--------------------------------------------- Reporter: kouji@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Thanks for the report. I found a cleaner way to fix the regressions than reverting to that ugly patch. Should be fixed in https://github.com/MacRuby/MacRuby/commit/97de43e5592b329c4f635fb2517524ec5551385d -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 16:42:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 23:42:31 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.27b5bcc7f979f1405be4367e2656f640@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker --------------------------------------+------------------------------------- Comment(by lsansonetti@?): I still reproduce the NameError on master: {{{ $ /usr/local/bin/macruby -r rubygems -e "require 'nokogiri'" /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/Gems/1.9.2/gems/nokogiri-1.4.6/lib/nokogiri.rb:13:in `
': Node is already defined (NameError) from -e:1:in `
' }}} Let's try to find a reduction. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 16:44:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 23:44:18 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.76cfa422699d07a7127d1f7a213209e4@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker --------------------------------------+------------------------------------- Comment(by lsansonetti@?): {{{ (gdb) bt #0 rb_exc_raise (mesg=8592241632) at eval.c:290 #1 0x000000010002c364 in rb_name_error (id=, fmt=) at error.c:670 #2 0x000000010001c6eb in rb_define_class_under (outer=8592281088, name=0x1086ae1c9 "Node", super=140735089902696) at class.c:542 #3 0x00000001086a1123 in init_html_document () at html_document.c:143 #4 0x00000001086a228b in Init_nokogiri () at nokogiri.c:67 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 16:47:00 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 23:47:00 -0000 Subject: [MacRuby] #1341: StringScanner#scan should not set into Regexp.last_match In-Reply-To: <051.09afb535ca983318617c9309f6ee428e@macosforge.org> References: <051.09afb535ca983318617c9309f6ee428e@macosforge.org> Message-ID: <060.788c1b9f1d1507eb43a1986c5b8a0f55@macosforge.org> #1341: StringScanner#scan should not set into Regexp.last_match ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Unfortunately, this issue is different. Currently, StringScanner#scan invokes a Regexp#match. https://github.com/MacRuby/MacRuby/blob/master/lib/strscan.rb#L639-644 [[BR]] When invoke a Regexp#match, rb_backref_set() in rb_reg_matcher_search_find() would change a value of Regexp.last_match Maybe, I guess that this issue needs new API which does not invoke a rb_backref_set(). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 16:47:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 27 Jun 2011 23:47:25 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.d89c9d96dad8b9faba05d506b0412e7a@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker --------------------------------------+------------------------------------- Comment(by lsansonetti@?): Looks like nokogiri has several rb_define_class_under() calls defining the "Node" class under the same XML module. It is possible that CRuby does not raise an exception in case "Node" already exists, but we do. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 17:12:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 00:12:27 -0000 Subject: [MacRuby] #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on In-Reply-To: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> References: <055.11f4a07425ba7dc94cb8e0d552a0d4a4@macosforge.org> Message-ID: <064.46330fcb591c4fe5dc43ed1127d18ac3@macosforge.org> #1335: NameError when requiring Nokogiri from nightly build 2011-06-14 on --------------------------------------+------------------------------------- Reporter: guido.soranzio@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | --------------------------------------+------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Should be fixed by https://github.com/MacRuby/MacRuby/commit/c6eaf277239824b6847ad830ea4d826e3b9e96a2 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 17:31:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 00:31:23 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.307d5164302c5c609dfb075c4ff1e39c@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Once this problem is fixed, https://github.com/MacRuby/MacRuby/commit/1fa3eba0956090f28939eb29f52e551a6b400f1f can be reverted. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 17:40:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 00:40:15 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.c33707975fcaa1b2d717c4fa44413e97@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: reduction 0.11-blocker | ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Thanks, this is good enough for 0.11. We can revisit a better fix for the next release :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 17:41:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 00:41:56 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.0536125693e32a0693e802fab1021b64@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): #require is definitely not thread-safe in MacRuby. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 19:50:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 02:50:37 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.7bbe04b6e5647bcadee1331779164afc@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: Keywords: reduction 0.11-blocker | ------------------------------------+--------------------------------------- Changes (by mrada@?): * status: closed => reopened * resolution: fixed => Comment: Re-opening the ticket to track the performance loss when encoding foundation core types. Since the json generation is working, it is no longer a blocker, so I'll need someone to remove the tag for me... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 21:15:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 04:15:25 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.d29a4a2c4c5011f6c716e2ef6f873e3d@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by kouji@?): Replying to [comment:8 lsansonetti@?]: > #require is definitely not thread-safe in MacRuby. I see, this issue is not a bug. So I think this ticket should be closed with invalid. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 21:48:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 04:48:35 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.60ab8488bcf848bd7345c06a10e6c0e2@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Well I don't think MacRuby should crash, so I would be interested into fixing the thread-safety problem. It's especially important because it seems to break RSpec (which apparently does that?). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jun 27 21:58:07 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 04:58:07 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.2cf618b7cc80680a1fa77a4b02ba3633@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Here is a full back trace of a crash running your snippet: {{{ (gdb) thread apply all bt Thread 3 (process 25683): #0 0x00007fff8701d976 in Auto::Zone::block_start () #1 0x00007fff8700aca6 in auto_zone_set_write_barrier () #2 0x00007fff82772625 in objc_assign_strongCast_gc () #3 0x00007fff88fa8bcf in __CFBasicHashRehash () #4 0x00007fff88fb4ebd in __CFBasicHashAddValue () #5 0x00007fff88fbc6b8 in CFBasicHashSetValue () #6 0x00007fff88fbc4d7 in CFDictionarySetValue () #7 0x000000010015ef91 in rb_intern_uchars (chars=0x10377eb10, chars_len=4, str=8590246688) at symbol.c:120 #8 0x000000010015f2cd in rb_intern_str (str=8590246688) at symbol.c:130 #9 0x0000000100079b04 in ruby_yyparse (parser=0x2000b0fe0) at parse.y:7655 #10 0x000000010008d44a in yycompile0 (arg=, tracing=) at parse.y:5000 #11 0x00000001000ad198 in load_file (parser=8590656832, fname=0x2000af040 "/Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/fileutils.rb", script=0, opt=0x10377f6f0) at ruby.c:1118 #12 0x00000001000ad57c in rb_load_file (fname=0x2000af040 "/Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/fileutils.rb") at ruby.c:1135 #13 0x0000000100155e59 in rb_vm_load (fname_str=0x2000af040 "/Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/fileutils.rb", wrap=) at vm.cpp:5602 #14 0x00000001000362db in load_try (path=) at load.c:246 #15 0x000000010015264a in rb_rescue2 (b_proc=, data1=, r_proc=0x100036230 , data2=8590657088) at vm.cpp:3648 #16 0x0000000100036a77 in rb_require_safe (fname=, safe=) at load.c:292 #17 0x000000010013cfd9 in rb_vm_dispatch (_vm=0x103431c90, cache=0x102daa700, top=8590061504, self=8590061504, klass=0x20001ee00, sel=0x100e28de0, block=0x0, opt=2 '\002', argc=, argv=0x103780ab0) at dispatcher.cpp:161 #18 0x0000000103200634 in ?? () #19 0x0000000103200b4d in ?? () #20 0x000000010013e109 in rb_vm_block_eval (b=0x103431c90, argc=, argv=0x20) at dispatcher.cpp:98 #21 0x0000000100153cf8 in rb_vm_thread_run (thread=8590081824) at vm.cpp:4856 #22 0x00007fff824684f6 in _pthread_start () #23 0x00007fff824683a9 in thread_start () Thread 2 (process 25683): #0 0x00007fff870165a6 in Auto::WriteBarrier::range_has_marked_cards () #1 0x00007fff87029944 in Auto::MemoryScanner::scan_retained_and_old_blocks () #2 0x00007fff87024a47 in Auto::Collector::check_roots () #3 0x00007fff870298b1 in Auto::MemoryScanner::scan () #4 0x00007fff8701e77d in Auto::Zone::collect () #5 0x00007fff87007a7e in auto_collect_internal () #6 0x00007fff870080bd in auto_collection_work () #7 0x00007fff8246b284 in _dispatch_call_block_and_release () #8 0x00007fff82449df2 in _dispatch_queue_drain () #9 0x00007fff82449c54 in _dispatch_queue_invoke () #10 0x00007fff824497fe in _dispatch_worker_thread2 () #11 0x00007fff82449128 in _pthread_wqthread () #12 0x00007fff82448fc5 in start_wqthread () Thread 1 (process 25683): #0 0x00007fff824471f0 in strlcat () #1 0x000000010006d1e5 in named_arg_gen (parser=0x2000b1520, id=12968, init=1) at parse.y:8896 #2 0x000000010007d8b2 in ruby_yyparse (parser=) at parse.y:3017 #3 0x000000010008d44a in yycompile0 (arg=, tracing=) at parse.y:5000 #4 0x00000001000ad198 in load_file (parser=8590659296, fname=0x2000afc80 "/Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/fileutils.rb", script=0, opt=0x7fff5fbfe520) at ruby.c:1118 #5 0x00000001000ad57c in rb_load_file (fname=0x2000afc80 "/Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/fileutils.rb") at ruby.c:1135 #6 0x0000000100155e59 in rb_vm_load (fname_str=0x2000afc80 "/Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/1.9.2/fileutils.rb", wrap=) at vm.cpp:5602 #7 0x00000001000362db in load_try (path=) at load.c:246 #8 0x000000010015264a in rb_rescue2 (b_proc=, data1=, r_proc=0x100036230 , data2=8590024064) at vm.cpp:3648 #9 0x0000000100036a77 in rb_require_safe (fname=, safe=) at load.c:292 #10 0x000000010013cfd9 in rb_vm_dispatch (_vm=0x100e230c0, cache=0x102000700, top=8590061504, self=8590061504, klass=0x20001ee00, sel=0x100e28de0, block=0x0, opt=2 '\002', argc=, argv=0x7fff5fbff908) at dispatcher.cpp:161 #11 0x0000000103200634 in ?? () #12 0x0000000103200162 in ?? () #13 0x0000000100155b36 in rb_vm_run (fname=0x2000a89a0 "t.rb", node=0x2000239a0, binding=, inside_eval=) at vm.cpp:4115 #14 0x000000010002dd20 in ruby_run_node (n=0x2000239a0) at eval.c:211 #15 0x00000001000e9ce8 in main (argc=2, argv=0x100e1bf50, envp=) at main.cpp:40 (gdb) }}} It seems to call into parse.y functions concurrently, however the parser is not thread-safe. We need to secure access to it. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 01:25:39 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 08:25:39 -0000 Subject: [MacRuby] #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects In-Reply-To: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> References: <053.1e6369c7c3d0b833d1fff99fcb9102e7@macosforge.org> Message-ID: <062.e3c63387dbacd7b760b423bef83bead1@macosforge.org> #1313: #to_json will cause a stack overflow if generating a collection with objective-c objects ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: Keywords: | ------------------------------------+--------------------------------------- Changes (by watson1978@?): * keywords: reduction 0.11-blocker => Comment: delete a "0.11-blocker" keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 06:46:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 13:46:34 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.b1a660427e695d632e717e712846814a@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): I don't think rspec was loading things on threads, rspec-core does not seem to use threads anywhere. More likely that they start loading client code before they have loaded all their code, and because rspec takes a long time to load it was the easiest to have this issue with. Though, I don't see why this problem would not occur with people using autoload and threads: {{{ autoload :FileUtils, 'fileutils' autoload :JSON, 'json' autoload :MiniTest, 'minitest/unit' autoload :Base64, 'base64' autoload :Rake, 'rake' Thread.new { FileUtils JSON MiniTest Rake Base64 } Base64 Rake MiniTest JSON FileUtils }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 06:47:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 13:47:35 -0000 Subject: [MacRuby] #1294: MacRuby crashes when loading files on the non-main thread In-Reply-To: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> References: <053.1357a704650881e3d927fbc6a275c293@macosforge.org> Message-ID: <062.7f1bb01acf004b3313eb447a9b064d82@macosforge.org> #1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by mrada@?): Actually, rspec does use autoload in a couple of places, maybe that was the cause.... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 10:22:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 17:22:54 -0000 Subject: [MacRuby] #1342: Ruby 1.9.2 Syntax Message-ID: <053.bb5699021448db90c41ab92ba405ef8f@macosforge.org> #1342: Ruby 1.9.2 Syntax ------------------------------------+--------------------------------------- Reporter: seanlilmateus@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: Syntax, Ruby 1.9.2 ------------------------------------+--------------------------------------- this code run on ruby 1.9.2p180 but it does on MacRuby p "%d %s" % [1, "message"] # => "1 message" # =>"1 message" p "%{firstname}, %{lastname}" % {firstname: "Masao", lastname: "Mutoh"} # => "Masao, Mutoh" p "%d, %.1f" % { integer: 10, float: 43.476374 } # => "10, 43.5" on MacRuby this results an "ArgumentError: named after numbered" -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 10:25:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 28 Jun 2011 17:25:41 -0000 Subject: [MacRuby] #1342: Ruby 1.9.2 Syntax In-Reply-To: <053.bb5699021448db90c41ab92ba405ef8f@macosforge.org> References: <053.bb5699021448db90c41ab92ba405ef8f@macosforge.org> Message-ID: <062.6e3ccb7512e6471fee3b1050222cd7e7@macosforge.org> #1342: Ruby 1.9.2 Syntax ------------------------------------+--------------------------------------- Reporter: seanlilmateus@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: Syntax, Ruby 1.9.2 ------------------------------------+--------------------------------------- Comment(by seanlilmateus@?): puts "%d %s" % [1, "message"] # => "1 message"[[BR]] puts "%{firstname}, %{lastname}" % {firstname: "Masao", lastname: "Mutoh"} # => "Masao, Mutoh" [[BR]] puts "%d, %.1f" % { integer: 10, float: 43.476374 } # => "10, 43.5" [[BR]] -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 17:12:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 00:12:03 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.d06b181ae55536ac28fc061cd19b25c2@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by watson1978@?): I reverted it within local repository, but it seems memory leaks occur in JSON. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 17:16:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 00:16:31 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.06e6116317410088a9a8a13f4d770a58@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Ah yes, the problem isn't fixed yet :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 17:31:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 00:31:48 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.d61801bce4d3639e63bffc3b846caa36@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Okay, I added a fix to master: https://github.com/MacRuby/MacRuby/commit/2ba4bd4686b0f517b728216c9f8997da45112f7d Can you retry the JSON library? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 17:39:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 00:39:56 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.944f2b5da01f8905d48730da35547d5b@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I see the following crash when running the nokogiri example: {{{ Thread 3 Crashed: Dispatch queue: Garbage Collection Work Queue 0 libmacruby.1.9.2.dylib 0x00000001000b52e1 st_foreach + 81 (st.c:638) 1 nokogiri.bundle 0x0000000105796bda dealloc + 58 (xml_document.c:31) 2 libmacruby.1.9.2.dylib 0x000000010003cf00 rdata_finalize + 32 (gc.c:432) 3 libobjc.A.dylib 0x00007fff82771f67 finalizeOneObject + 48 4 libauto.dylib 0x00007fff8701d3d5 Auto::foreach_block_do(auto_zone_cursor*, void (*)(void*, void*), void*) + 85 5 libobjc.A.dylib 0x00007fff82771b5c batchFinalize + 64 6 libauto.dylib 0x00007fff87017137 Auto::Zone::invalidate_garbage(unsigned long, unsigned long const*) + 71 7 libauto.dylib 0x00007fff87007b21 auto_collect_internal(Auto::Zone*, unsigned int) + 481 8 libauto.dylib 0x00007fff870080bd auto_collection_work(Auto::Zone*) + 157 9 libSystem.B.dylib 0x00007fff8246b284 _dispatch_call_block_and_release + 15 10 libSystem.B.dylib 0x00007fff82449df2 _dispatch_queue_drain + 251 11 libSystem.B.dylib 0x00007fff82449c54 _dispatch_queue_invoke + 57 12 libSystem.B.dylib 0x00007fff824497fe _dispatch_worker_thread2 + 252 13 libSystem.B.dylib 0x00007fff82449128 _pthread_wqthread + 353 14 libSystem.B.dylib 0x00007fff82448fc5 start_wqthread + 13 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 17:50:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 00:50:17 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.582873fb13ebfe388a6c2e6a01da1e6d@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by watson1978@?): Thank you. It seems JSON has no problem. I will commit JSON which reverted. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 18:51:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 01:51:04 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.268626b4c4c254956bd00d00ce7933fa@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): In nokogiri's xml_document.c: {{{ tuple->unlinkedNodes = st_init_numtable_with_size(128); }}} The st_table here is prematurely collected since there is no write barrier. That's causing the problem here since we try to iterate over the table during -finalize but the table is already gone. I am not sure how to properly fix this without changing nokogiri. It is unfortunate that it does not use a MRI mark function for Data_Wrap_Struct, since we could have used it. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jun 28 18:56:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 01:56:32 -0000 Subject: [MacRuby] #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). In-Reply-To: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> References: <051.39988a64b6f87a16fc223f7edeff5609@macosforge.org> Message-ID: <060.2ebfe43f0976c34727edec826a0629aa@macosforge.org> #1308: MacRuby does not invoke a free function which was specified in Data_Wrap_Struct(). ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: 0.11-blocker ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Actually it's even worse: {{{ nokogiriTuplePtr tuple = (nokogiriTuplePtr)malloc(sizeof(nokogiriTuple)); [...] tuple->unlinkedNodes = st_init_numtable_with_size(128); }}} Because this is malloc memory, a write barrier won't suffice. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 29 09:30:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 16:30:17 -0000 Subject: [MacRuby] #1343: autotest-fsevent AND autotest-growl causes SegFault Message-ID: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> #1343: autotest-fsevent AND autotest-growl causes SegFault -----------------------------+---------------------------------------------- Reporter: kykim@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- install gems: autotest-standalone (or ZenTest) autotest-fsevent autotest-growl create .autotest: require 'autotest/fsevent'[[BR]] require 'autotest/growl' run autotest: DYLD_LIBRARY_PATH=. ./macruby -I./lib -rubygems `which autotest` Segmentation fault 1) Segmentation fault does not always occur, sometimes program exits[[BR]] 2) reverse order of requires in .autotest file, program usually exits[[BR]] 3) .autotest of autotest/fsevent only, exits[[BR]] 4) .autotest of autotest/growl only appears to work properly[[BR]] I'd happily try to debug and/or provide more info, but I'm unsure how to proceed, any pointers/directions are appreciated. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 29 09:53:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 16:53:14 -0000 Subject: [MacRuby] #1344: illegal hardware instruction error occurs with BigDecimal.new Message-ID: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> #1344: illegal hardware instruction error occurs with BigDecimal.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'bigdecimal' 50.times do BigDecimal.new("1" + "0"*10000000) end }}} Result: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -I./lib -I./ext/bigdecimal ~/tmp/tt.rb macruby(4424,0x102ddc000) malloc: garbage block 0x303ce0060(non-object) was over-retained during finalization, refcount = 1 This could be an unbalanced CFRetain(), or CFRetain() balanced with -release. Break on auto_zone_resurrection_error() to debug. macruby(4424,0x102ddc000) malloc: fatal resurrection error for garbage block 0x303ce0060(non-object): over-retained during finalization, refcount = 1 zsh: illegal hardware instruction DYLD_LIBRARY_PATH=. ./macruby -I./lib -I./ext/bigdecimal ~/tmp/tt.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 29 10:00:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 17:00:34 -0000 Subject: [MacRuby] #1339: macruby crashes when initialize() with optional arg called from File.open block In-Reply-To: <048.8737c90b944bb5da03ebc14ce1d75f11@macosforge.org> References: <048.8737c90b944bb5da03ebc14ce1d75f11@macosforge.org> Message-ID: <057.2127028909b29af06acbc3bbc5ae1dbb@macosforge.org> #1339: macruby crashes when initialize() with optional arg called from File.open block -------------------------------+-------------------------------------------- Reporter: bigwood@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- Changes (by watson1978@?): * milestone: MacRuby 0.11 => Old description: > the following script will always crash. > 0) TTT.initialize() must have an optional argument (past the first > argument) > 1) TTT.new() has to be called from a File.open() block > > #!/usr/local/bin/macruby -w > > # see http://www.macruby.org/documentation/gcd.html > class Array > def parallel_map(&block) > result = [] > # Creating a group to synchronize block execution. > group = Dispatch::Group.new > # We will access the `result` array from within this serial queue, > # as without a GIL we cannot assume array access to be thread-safe. > result_queue = Dispatch::Queue.new('access- > queue.#{result.object_id}') > 0.upto(size - 1) do |idx| > # Dispatch a task to the default concurrent queue. > Dispatch::Queue.concurrent.async(group) do > #temp = block.call(self[idx]) > temp = block[self[idx]] # same > #temp = block === self[idx] # same > #puts "sending #{idx}: #{self[idx]} with #{block.class}\n" > result_queue.async(group) { result[idx] = temp } > end > end > # Wait for all the blocks to finish. > group.wait > result > end > end > > class TTT > #def initialize(string) > def initialize(string, dup = false) > end > end > > source = $0 > (1..2).to_a.parallel_map do |idx| > #puts idx > File.open(source) do |file| > #Dir.chdir("/tmp") do > TTT.new("") > end > end New description: the following script will always crash.[[BR]] 0) TTT.initialize() must have an optional argument (past the first argument)[[BR]] 1) TTT.new() has to be called from a File.open() block {{{ #!ruby #!/usr/local/bin/macruby -w # see http://www.macruby.org/documentation/gcd.html class Array def parallel_map(&block) result = [] # Creating a group to synchronize block execution. group = Dispatch::Group.new # We will access the `result` array from within this serial queue, # as without a GIL we cannot assume array access to be thread-safe. result_queue = Dispatch::Queue.new('access-queue.#{result.object_id}') 0.upto(size - 1) do |idx| # Dispatch a task to the default concurrent queue. Dispatch::Queue.concurrent.async(group) do #temp = block.call(self[idx]) temp = block[self[idx]] # same #temp = block === self[idx] # same #puts "sending #{idx}: #{self[idx]} with #{block.class}\n" result_queue.async(group) { result[idx] = temp } end end # Wait for all the blocks to finish. group.wait result end end class TTT #def initialize(string) def initialize(string, dup = false) end end source = $0 (1..2).to_a.parallel_map do |idx| #puts idx File.open(source) do |file| #Dir.chdir("/tmp") do TTT.new("") end end }}} -- -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 29 10:14:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 17:14:50 -0000 Subject: [MacRuby] #1343: autotest-fsevent AND autotest-growl causes SegFault In-Reply-To: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> References: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> Message-ID: <055.cc1361a6f4b641e74f333a8ea5c0aee7@macosforge.org> #1343: autotest-fsevent AND autotest-growl causes SegFault -----------------------------+---------------------------------------------- Reporter: kykim@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by eloy.de.enige@?): Which autotest-fsevents are you using? This one: https://github.com/svoop /autotest-fsevent ? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 29 11:25:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 18:25:14 -0000 Subject: [MacRuby] #1343: autotest-fsevent AND autotest-growl causes SegFault In-Reply-To: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> References: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> Message-ID: <055.3881237fab58c30d033573f066b4f272@macosforge.org> #1343: autotest-fsevent AND autotest-growl causes SegFault -----------------------------+---------------------------------------------- Reporter: kykim@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by kykim@?): i assume i am. i installed via "macgem install autotest-fsevent", which should pull from rubygems.org (which should pull that one) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 29 15:24:55 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 22:24:55 -0000 Subject: [MacRuby] #1148: Procs used for Cocoa callbacks are being given class objects instance of the instance of the class In-Reply-To: <053.e0a253f86b88bbfefbd9afb75def7228@macosforge.org> References: <053.e0a253f86b88bbfefbd9afb75def7228@macosforge.org> Message-ID: <062.03d198b0f444261cffea5cdc0485baab@macosforge.org> #1148: Procs used for Cocoa callbacks are being given class objects instance of the instance of the class ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): The problem is that call: is a native ruby method that isn't callable from Objective-C directly. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jun 29 15:40:07 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 29 Jun 2011 22:40:07 -0000 Subject: [MacRuby] #1343: autotest-fsevent AND autotest-growl causes SegFault In-Reply-To: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> References: <046.b8bbba2209ffd62b6e849bda65153e7d@macosforge.org> Message-ID: <055.11f897e11853ae1aa5963c5131641440@macosforge.org> #1343: autotest-fsevent AND autotest-growl causes SegFault -----------------------------+---------------------------------------------- Reporter: kykim@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by eloy.de.enige@?): Can you try to find a reproducible segfault script and/or run it with gdb and a few backtraces when a segfault occurs? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 00:29:13 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 07:29:13 -0000 Subject: [MacRuby] #1345: Assertion fails when invoke an eval() within CGI.new Message-ID: <051.70e8624b43f32d08558df725eb2f5bc2@macosforge.org> #1345: Assertion fails when invoke an eval() within CGI.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Assertion occurs when is invoked an eval at following point. * https://github.com/MacRuby/MacRuby/blob/master/lib/cgi/html.rb#L881 * https://github.com/MacRuby/MacRuby/blob/master/lib/cgi/html.rb#L930 * https://github.com/MacRuby/MacRuby/blob/master/lib/cgi/html.rb#L981 * https://github.com/MacRuby/MacRuby/blob/master/lib/cgi/html.rb#L1015 Test Script: {{{ #!ruby require 'cgi' @environ = { 'REQUEST_METHOD' => 'GET', } ENV.update(@environ) cgi = CGI.new('html3') cgi = CGI.new('html4') cgi = CGI.new('html4Tr') cgi = CGI.new('html4Fr') }}} Result: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -I./lib ~/tmp/ttt.rb Assertion failed: (len >= 0), function str_replace_with_uchars, file string.c, line 327. zsh: abort DYLD_LIBRARY_PATH=. ./macruby -I./lib ~/tmp/ttt.rb }}} BackTrace: {{{ Program received signal SIGABRT, Aborted. 0x00007fff83d0f0b6 in __kill () (gdb) bt #0 0x00007fff83d0f0b6 in __kill () #1 0x00007fff83daf9f6 in abort () #2 0x00007fff83d9c9bc in __assert_rtn () #3 0x00000001000b7845 in str_replace_with_uchars (self=0x2000218c0, chars=0xfffffffdfff1ab5d, len=-22431) at string.c:327 #4 0x00000001000c7269 in rb_unicode_str_new (ptr=0xfffffffdfff1ab5d, len=18446744073709529185) at string.c:6263 #5 0x0000000100085f3a in lex_getline [inlined] () at /Users/watson/src /macruby-master/parse.y:5071 #6 0x0000000100085f3a in ruby_yyparse (parser=) at parse.y:5213 #7 0x000000010009059a in yycompile0 (arg=, tracing=) at parse.y:5000 #8 0x0000000100090b75 in rb_parser_compile_string (vparser=, f=0x100992c3c "(eval)", s=8592144096, line=1) at parse.y:5033 #9 0x0000000100154d77 in rb_vm_eval_string (self=8590852352, klass=0, src=8590812672, binding=0x0, file=0x100992c3c "(eval)", line=1, should_push_outer=false) at vm.cpp:4245 #10 0x00000001000f32d9 in eval_string_with_should_push_outer (self=8590852352, klass=0, src=8590812672, scope=4, file=0x100992c3c "(eval)", line=1, should_push_outer=false) at vm_eval.c:299 #11 0x00000001000f33a8 in eval_string (self=8590852352, klass=0, src=8590812672, scope=4, file=0x100992c3c "(eval)", line=1) at vm_eval.c:320 #12 0x00000001000f3772 in rb_f_eval (self=8590852352, sel=0x100e271a0, argc=1, argv=0x7fff5fbfb750) at vm_eval.c:441 #13 0x000000010013b264 in rb_vm_dispatch (_vm=0x100e231d0, cache=0x100d7f560, top=8590852352, self=8590852352, klass=0x2000fbaa0, sel=0x100e271a0, block=0x0, opt=2 '\002', argc=1, argv=0x7fff5fbfb750) at dispatcher.cpp:448 #14 0x0000000103a00c54 in ?? () #15 0x0000000103a14e45 in ?? () #16 0x000000010013b7c4 in rb_vm_dispatch (_vm=0x100e231d0, cache=0x100d90d60, top=8590852352, self=8590852352, klass=0x2000fbaa0, sel=0x103e97ca0, block=0x0, opt=2 '\002', argc=, argv=0x0) at dispatcher.cpp:159 #17 0x0000000103a00c54 in ?? () #18 0x0000000103a0ecf0 in ?? () #19 0x000000010013b7a9 in rb_vm_dispatch (_vm=0x100e231d0, cache=0x100d97b30, top=0, self=8590852352, klass=0x2000dfea0, sel=0x7fff82ffe23e, block=0x0, opt=2 '\002', argc=, argv=0x7fff5fbfdd10) at dispatcher.cpp:161 #20 0x000000010006260a in rb_class_new_instance0 [inlined] () at /Users/watson/src/macruby-master/object.c:653 #21 0x000000010006260a in rb_class_new_instance_imp (klass=, sel=, argc=1, argv=0x7fff5fbfdd10) at object.c:2021 #22 0x000000010013b264 in rb_vm_dispatch (_vm=0x100e231d0, cache=0x100d93840, top=8590062368, self=8590851744, klass=0x2000bfec0, sel=0x100e22360, block=0x0, opt=0 '\0', argc=1, argv=0x7fff5fbfdd10) at dispatcher.cpp:448 #23 0x0000000103a00c54 in ?? () #24 0x0000000103a001c0 in ?? () #25 0x0000000100154306 in rb_vm_run (fname=0x2000a7480 "/Users/watson/tmp/ttt.rb", node=0x2000252a0, binding=, inside_eval=) at vm.cpp:4115 #26 0x0000000100030de0 in ruby_run_node (n=0x2000252a0) at eval.c:211 #27 0x0000000100000cf8 in main (argc=3, argv=0x100e1c040, envp=) at main.cpp:40 (gdb) }}} When rb_unicode_str_new() was invoked, it seems that broken length was passed. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 04:18:38 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 11:18:38 -0000 Subject: [MacRuby] #1345: Assertion fails when invoke an eval() within CGI.new In-Reply-To: <051.70e8624b43f32d08558df725eb2f5bc2@macosforge.org> References: <051.70e8624b43f32d08558df725eb2f5bc2@macosforge.org> Message-ID: <060.11ad0d5f6a31c0a1afb942f441c6ec24@macosforge.org> #1345: Assertion fails when invoke an eval() within CGI.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): This issue seems to occur since https://github.com/MacRuby/MacRuby/commit/2ba4bd4686b0f517b728216c9f8997da45112f7d -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 06:21:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 13:21:56 -0000 Subject: [MacRuby] #1345: Assertion fails when invoke an eval() within CGI.new In-Reply-To: <051.70e8624b43f32d08558df725eb2f5bc2@macosforge.org> References: <051.70e8624b43f32d08558df725eb2f5bc2@macosforge.org> Message-ID: <060.b9ecc15ca0984f0b798f72a4b071c26d@macosforge.org> #1345: Assertion fails when invoke an eval() within CGI.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Assertion seems to occur after parser_free() in parse.y was invoked. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 06:31:40 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 13:31:40 -0000 Subject: [MacRuby] #1344: illegal hardware instruction error occurs with BigDecimal.new In-Reply-To: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> References: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> Message-ID: <060.e4c7de8a0146ceaf3bb216decc97509b@macosforge.org> #1344: illegal hardware instruction error occurs with BigDecimal.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): This issue seems to occur since https://github.com/MacRuby/MacRuby/commit/2ba4bd4686b0f517b728216c9f8997da45112f7d -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 06:48:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 13:48:35 -0000 Subject: [MacRuby] #1344: illegal hardware instruction error occurs with BigDecimal.new In-Reply-To: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> References: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> Message-ID: <060.c1a49517e66c0aa78ce65110841a948e@macosforge.org> #1344: illegal hardware instruction error occurs with BigDecimal.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Assertion seems to occur after BigDecimal_delete() in ext/bigdecimal/bigdecimal.c was invoked. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 06:54:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 13:54:45 -0000 Subject: [MacRuby] #1344: illegal hardware instruction error occurs with BigDecimal.new In-Reply-To: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> References: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> Message-ID: <060.b226c8f575962a162fe5a6df16d772df@macosforge.org> #1344: illegal hardware instruction error occurs with BigDecimal.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Oops, s/Assertion/Crash/ -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 07:23:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 14:23:34 -0000 Subject: [MacRuby] #1314: Objective-C methods with null-terminated arguments have a subtle issue In-Reply-To: <053.8e5c46b6a0c48205722ced8eac6870ec@macosforge.org> References: <053.8e5c46b6a0c48205722ced8eac6870ec@macosforge.org> Message-ID: <062.8d08ab5fc33e3bfc35aa41349afddf3d@macosforge.org> #1314: Objective-C methods with null-terminated arguments have a subtle issue ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: reduction ------------------------------------+--------------------------------------- Comment(by watson1978@?): Objective-C also seems to create an empty array. {{{ #import int main(void) { NSArray *ary = [[NSArray alloc] initWithObjects:nil,@"a",@"b",@"c"]; NSLog(@"%d", [ary count]); } }}} {{{ $ gcc test_array.m -framework Cocoa $ ./a.out 2011-06-30 23:20:45.852 a.out[27488:903] 0 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 07:44:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 30 Jun 2011 14:44:01 -0000 Subject: [MacRuby] #1339: macruby crashes when initialize() with optional arg called from File.open block In-Reply-To: <048.8737c90b944bb5da03ebc14ce1d75f11@macosforge.org> References: <048.8737c90b944bb5da03ebc14ce1d75f11@macosforge.org> Message-ID: <057.b63b3b5500969ea38f223d4921dc135d@macosforge.org> #1339: macruby crashes when initialize() with optional arg called from File.open block -------------------------------+-------------------------------------------- Reporter: bigwood@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- Comment(by watson1978@?): hmm, in my environment, this issue does not reproduce :( -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 17:49:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 01 Jul 2011 00:49:17 -0000 Subject: [MacRuby] #1344: illegal hardware instruction error occurs with BigDecimal.new In-Reply-To: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> References: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> Message-ID: <060.5dedc41559e61243faec8258096e9edb@macosforge.org> #1344: illegal hardware instruction error occurs with BigDecimal.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Indeed: {{{ (gdb) info malloc-history 0x303ce0060 Alloc: Block address: 0x0000000303ce0060 length: 4210584 Stack - pthread: 0x7fff700e4cc0 number of frames: 19 0: 0x7fff82903da8 in auto_zone_allocate_object 1: 0x10003e207 in ruby_xmalloc at gc.c:113 2: 0x100dbf648 in VpMemAlloc at bigdecimal.c:2181 3: 0x100dc0142 in VpAlloc at bigdecimal.c:2808 4: 0x100dc33c9 in BigDecimal_new at bigdecimal.c:409 5: 0x101c00997 6: 0x10013fdc4 in rb_vm_dispatch at dispatcher.cpp:448 7: 0x101c00494 8: 0x101c020f7 9: 0x100142673 in rb_vm_yield_args at dispatcher.cpp:98 10: 0x1000f55e8 in rb_yield at vm_eval.c:184 11: 0x100057191 in int_dotimes at numeric.c:3242 12: 0x100140324 in rb_vm_dispatch at dispatcher.cpp:159 13: 0x101c00494 14: 0x101c000ce 15: 0x100158e66 in rb_vm_run at vm.cpp:4115 16: 0x1000310e0 in ruby_run_node at eval.c:211 17: 0x100000cf8 in main at main.cpp:40 18: 0x100000c54 in start Dealloc: Block address: 0x0000000303ce0060 Stack - pthread: 0x100f81000 number of frames: 14 0: 0x7fff80ceb59b in malloc_zone_free 1: 0x10003d000 in rdata_finalize at gc.c:432 2: 0x7fff82374d76 in finalizeOneObject 3: 0x7fff8291a3d5 in _ZN4AutoL16foreach_block_doEP16auto_zone_cursorPFvPvS2_ES2_ 4: 0x7fff8237496b in batchFinalize 5: 0x7fff82914137 in _ZN4Auto4Zone18invalidate_garbageEmPKm 6: 0x7fff82904b21 in _ZL21auto_collect_internalPN4Auto4ZoneEj 7: 0x7fff829050bd in _ZL20auto_collection_workPN4Auto4ZoneE 8: 0x7fff80d1dd64 in _dispatch_call_block_and_release 9: 0x7fff80cfc8d2 in _dispatch_queue_drain 10: 0x7fff80cfc734 in _dispatch_queue_invoke 11: 0x7fff80cfc2de in _dispatch_worker_thread2 12: 0x7fff80cfbc08 in _pthread_wqthread 13: 0x7fff80cfbaa5 in start_wqthread }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 18:43:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 01 Jul 2011 01:43:53 -0000 Subject: [MacRuby] #1344: illegal hardware instruction error occurs with BigDecimal.new In-Reply-To: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> References: <051.879b596b4ed2b00821d736458ba3ef95@macosforge.org> Message-ID: <060.004d450c8d90b35bec23af5c508aefbe@macosforge.org> #1344: illegal hardware instruction error occurs with BigDecimal.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Should be fixed in https://github.com/MacRuby/MacRuby/commit/dbedf7c04cee40b6f79fc794e75481e7b81d351c, I believe it's an edge case so I modified the bigdecimal ext. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 18:57:07 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 01 Jul 2011 01:57:07 -0000 Subject: [MacRuby] #1345: Assertion fails when invoke an eval() within CGI.new In-Reply-To: <051.70e8624b43f32d08558df725eb2f5bc2@macosforge.org> References: <051.70e8624b43f32d08558df725eb2f5bc2@macosforge.org> Message-ID: <060.f82783e4f5def5acf2765d2ecdfffb9a@macosforge.org> #1345: Assertion fails when invoke an eval() within CGI.new ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Should be fixed by https://github.com/MacRuby/MacRuby/commit/ea09ab2f04b76280efd63841b51e024b481710ed -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jun 30 20:58:02 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 01 Jul 2011 03:58:02 -0000 Subject: [MacRuby] #574: macgem should install binaries to /usr/local/bin In-Reply-To: <050.3b39b3eb32f027b1678b59dd462e04f5@macosforge.org> References: <050.3b39b3eb32f027b1678b59dd462e04f5@macosforge.org> Message-ID: <059.f0eece3742e18b37a7e02522e4a4f7f1@macosforge.org> #574: macgem should install binaries to /usr/local/bin ---------------------------------+------------------------------------------ Reporter: honglilai@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by isaackearse@?): I have been running into this issue a lot recently as it has become more realistic to install gems with MacRuby. Maybe the patch attached to this ticket would be a good workaround until someone has time to execute the above plan? -- Ticket URL: MacRuby