[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

cross-thread violation on rb_gc() and Windows arguments

Chris Shea

2/16/2007 4:20:00 AM

Hello,

I was working on a script and running into problems with passing an
argument with a wildcard with the C:\WINDOWS\System32 path. Observe:

---
C:\>more test.rb
puts ARGV

C:\>test.rb C:\ruby\*.txt
C:/ruby/ChangeLog.txt
C:/ruby/LICENSE.txt
C:/ruby/ReleaseNotes.txt

C:\>test.rb C:\WINDOWS\system32\runonce.exe
C:\WINDOWS\system32\runonce.exe

C:\>test.rb C:\WINDOWS\system32\runonce.ex*
[BUG] cross-thread violation on rb_gc()
ruby 1.8.5 (2006-08-25) [i386-mswin32]


This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.

C:\>ruby -v
ruby 1.8.5 (2006-08-25) [i386-mswin32]
---

I haven't been able to figure out or find a workaround (besides just
knowing all the filenames) or fix.

I thought Windows takes care of the wildcard, generating the argument
list. I don't know how that would help, but earlier today it made
sense to me that it meant something.

And this happens even if ARGV is never referenced (e.g. an empty
test.rb does the same thing), so it looks like the violation happens
even before the script is interpreted.

And, yes, I'm logged in with an administrator account (Windows users
usually are, aren't they?).

Anyone have any insight? Or is this just one of those things (one of
those things about working with Windows)?

12 Answers

Bernard Kenik

2/16/2007 6:03:00 PM

0

On Feb 15, 11:20 pm, "Chris Shea" <cms...@gmail.com> wrote:
> Hello,
>
> I was working on a script and running into problems with passing an
> argument with a wildcard with the C:\WINDOWS\System32 path. Observe:
>
> ---
> C:\>more test.rb
> puts ARGV
>
> C:\>test.rb C:\ruby\*.txt
> C:/ruby/ChangeLog.txt
> C:/ruby/LICENSE.txt
> C:/ruby/ReleaseNotes.txt
>
> C:\>test.rb C:\WINDOWS\system32\runonce.exe
> C:\WINDOWS\system32\runonce.exe
>
> C:\>test.rb C:\WINDOWS\system32\runonce.ex*
> [BUG] cross-thread violation on rb_gc()
> ruby 1.8.5 (2006-08-25) [i386-mswin32]
>
> This application has requested the Runtime to terminate it in an
> unusual way.
> Please contact the application's support team for more information.
>
> C:\>ruby -v
> ruby 1.8.5 (2006-08-25) [i386-mswin32]
> ---
>
> I haven't been able to figure out or find a workaround (besides just
> knowing all the filenames) or fix.
>
> I thought Windows takes care of the wildcard, generating the argument
> list. I don't know how that would help, but earlier today it made
> sense to me that it meant something.
>
> And this happens even if ARGV is never referenced (e.g. an empty
> test.rb does the same thing), so it looks like the violation happens
> even before the script is interpreted.
>
> And, yes, I'm logged in with an administrator account (Windows users
> usually are, aren't they?).
>
> Anyone have any insight? Or is this just one of those things (one of
> those things about working with Windows)?

Not the answer you want.
I've tried on my box and it works fine ...

Have you tried: dir C:\WINDOWS\system32\runonce.ex* in a dos window?

No problem on my box

C:\Documents and Settings\Owner>dir c:\windows\system32\runonce.ex*
Volume in drive C has no label.
Volume Serial Number is 2CEC-6C29

Directory of c:\windows\system32

08/10/2004 02:00 PM 14,336 runonce.exe
1 File(s) 14,336 bytes
0 Dir(s) 169,529,577,472 bytes free


Chris Shea

2/16/2007 6:08:00 PM

0

On Feb 16, 11:03 am, "bbiker" <ren...@nc.rr.com> wrote:
> On Feb 15, 11:20 pm, "Chris Shea" <cms...@gmail.com> wrote:
>
>
>
> > Hello,
>
> > I was working on a script and running into problems with passing an
> > argument with a wildcard with the C:\WINDOWS\System32 path. Observe:
>
> > ---
> > C:\>more test.rb
> > puts ARGV
>
> > C:\>test.rb C:\ruby\*.txt
> > C:/ruby/ChangeLog.txt
> > C:/ruby/LICENSE.txt
> > C:/ruby/ReleaseNotes.txt
>
> > C:\>test.rb C:\WINDOWS\system32\runonce.exe
> > C:\WINDOWS\system32\runonce.exe
>
> > C:\>test.rb C:\WINDOWS\system32\runonce.ex*
> > [BUG] cross-thread violation on rb_gc()
> > ruby 1.8.5 (2006-08-25) [i386-mswin32]
>
> > This application has requested the Runtime to terminate it in an
> > unusual way.
> > Please contact the application's support team for more information.
>
> > C:\>ruby -v
> > ruby 1.8.5 (2006-08-25) [i386-mswin32]
> > ---
>
> > I haven't been able to figure out or find a workaround (besides just
> > knowing all the filenames) or fix.
>
> > I thought Windows takes care of the wildcard, generating the argument
> > list. I don't know how that would help, but earlier today it made
> > sense to me that it meant something.
>
> > And this happens even if ARGV is never referenced (e.g. an empty
> > test.rb does the same thing), so it looks like the violation happens
> > even before the script is interpreted.
>
> > And, yes, I'm logged in with an administrator account (Windows users
> > usually are, aren't they?).
>
> > Anyone have any insight? Or is this just one of those things (one of
> > those things about working with Windows)?
>
> Not the answer you want.
> I've tried on my box and it works fine ...
>
> Have you tried: dir C:\WINDOWS\system32\runonce.ex* in a dos window?
>
> No problem on my box
>
> C:\Documents and Settings\Owner>dir c:\windows\system32\runonce.ex*
> Volume in drive C has no label.
> Volume Serial Number is 2CEC-6C29
>
> Directory of c:\windows\system32
>
> 08/10/2004 02:00 PM 14,336 runonce.exe
> 1 File(s) 14,336 bytes
> 0 Dir(s) 169,529,577,472 bytes free

Yes. I thought of mentioning that similar wildcard arguments are fine
with Windows commands (like dir). I've only found this to happen when
passing that argument to ruby.

Suraj Kurapati

2/17/2007 5:43:00 AM

0

Chris Shea wrote:
> C:\>test.rb C:\WINDOWS\system32\runonce.ex*
> [BUG] cross-thread violation on rb_gc()
> ruby 1.8.5 (2006-08-25) [i386-mswin32]

To my knowledge, a cross-thread violation occurs when a piece of code
(which exists on a different *stack* altogether, i.e. running within a
POSIX or native thread alongside the Ruby interpreter in the same
process) makes use of Ruby's C language API.

I have encountered this when I was embedding a Ruby interpreter inside a
C program. Ruby was running inside a POSIX thread and therefore had its
own *stack*. When the C program made use of Ruby's C language API, the
entire process would crash with that cross-thread violation error.

Here, you can see why the violation is cross-thread. When the C program
(which existed on a different *stack* than the Ruby interpreter) tried
to use Ruby's C language API, those API functions would assume that the
caller existed within the Ruby interpreter's stack.

That's what I remember, anyways. Please correct me if I am wrong. :-)

P.S. The ruby-core developers, such as Nobu Nakada, are much more
knowledgeable than me; they can tell you more about this.

--
Posted via http://www.ruby-....

Chris Shea

2/17/2007 8:02:00 AM

0

On Feb 16, 10:42 pm, Suraj Kurapati <s...@gna.org> wrote:
> P.S. The ruby-core developers, such as Nobu Nakada, are much more
> knowledgeable than me; they can tell you more about this.

Well I wasn't sure if this was worthy of a ruby-core post.

I'm not sure if my ignorance of the causes of the underlying problem
comes from not having delved deep enough into the way Ruby handles
arguments, or from not understanding how Windows delivers arguments.

Or maybe I just don't know that this isn't an interesting problem.

Nobuyoshi Nakada

2/17/2007 2:57:00 PM

0

Hi,

At Fri, 16 Feb 2007 13:25:08 +0900,
Chris Shea wrote in [ruby-talk:239448]:
> C:\>ruby -v
> ruby 1.8.5 (2006-08-25) [i386-mswin32]
> ---

AFAIK, it should have been fixed in October.

> I thought Windows takes care of the wildcard, generating the argument
> list.

No, it is done by the runtime startup routine, but in very poor
manor.

--
Nobu Nakada

I've seen Miley's Little Brown Beaver

8/8/2010 2:14:00 AM

0

On 8/7/2010 7:20 PM, David Hartung wrote:

>
> Just out of curiosity, who owns the land the mosque will be built on?

Americans.
--
http://static.thehollywoodgossip.com/images/gallery/vienna-girardi-beaver_4...

David Hartung

8/8/2010 2:34:00 AM

0

On 08/07/2010 09:13 PM, I've seen Miley's Little Brown Beaver wrote:
> On 8/7/2010 7:20 PM, David Hartung wrote:
>
>>
>> Just out of curiosity, who owns the land the mosque will be built on?
>
> Americans.

I'm sorry, but that is not an answer, but you may want to keep in mind
that there are a number of Americans who are also Muslim.

I've seen Nikki Haley Big Brown Beaver too

8/8/2010 2:59:00 AM

0

On 8/7/2010 9:33 PM, David Hartung wrote:

>>> Just out of curiosity, who owns the land the mosque will be built on?
>>
>> Americans.
>
> I'm sorry, but that is not an answer, but you may want to keep in mind
> that there are a number of Americans who are also Muslim.


yes it is. It does matter. Americans own the land. Period. The creed
or religious state of the owners makes no difference under law
what they build.

--
http://static.thehollywoodgossip.com/images/gallery/vienna-girardi-beaver_4...

sillapond

8/8/2010 4:20:00 AM

0

On 08/07/2010 07:13 PM, I've seen Miley's Little Brown Beaver wrote:
> On 8/7/2010 7:20 PM, David Hartung wrote:
>
>>
>> Just out of curiosity, who owns the land the mosque will be built on?
>
> Americans.

74.193.0.33
Texas Conroe
30.2737 -95.4146
Suddenlink Communications

12465 Fm1314 Rd
Conroe, TX 77302

First Post

8/8/2010 11:57:00 AM

0

On Sat, 07 Aug 2010 21:58:37 -0500, I've seen Nikki Haley Big Brown
Beaver too <beaver@me.com> wrote:

>On 8/7/2010 9:33 PM, David Hartung wrote:
>
>>>> Just out of curiosity, who owns the land the mosque will be built on?
>>>
>>> Americans.
>>
>> I'm sorry, but that is not an answer, but you may want to keep in mind
>> that there are a number of Americans who are also Muslim.
>
>
> yes it is. It does matter. Americans own the land. Period. The creed
>or religious state of the owners makes no difference under law
>what they build.

How do you know the property is owned by Americans? Anyome can buy
land in the US and there are plenty of instances where other nations
own property in the US.
Easy to see why you change names with every post since you show
yourself to be such an uneducated dickless troll with each one.

I've seen Nikki Haley Big Brown Beaver too <beaver@me.com>
NNTP-Posting-Host: 74.193.0.33

I've seen Miley's Little Brown Beaver <miley@litteBeaver.com>
NNTP-Posting-Host: 74.193.0.33

My next mistress will be Nikki Haley !" <letsfuck@fox.com>
NNTP-Posting-Host: 74.193.0.33

Right-wingers hate America <Wanker@anonmail.com>
NNTP-Posting-Host: 74.193.0.33

Pitchforks&Torches Portrayed by Wankers Lonely Club whiner terrorist
<gotguns@wankerisaLoser.com>
NNTP-Posting-Host: 74.193.0.33

"DamnIt Jim, I'm only a brain surgeon." <eatme@hhhh.com>
NNTP-Posting-Host: 74.193.0.33

"WWJD (What Would Jedd Do)" <biteme@sdfsdf.com>
NNTP-Posting-Host: 74.193.0.33

Pierre Salinger Syndrome <eatme@to.com>
NNTP-Posting-Host: 74.193.0.33

"ObamaPhobia : Boo ! " <ob@ph.com>
NNTP-Posting-Host: 74.193.0.33

Terri Schiavo's Fruit & Vegetable Stand <braindead@fucker.com>
NNTP-Posting-Host: 74.193.0.33

Sympathy for the Devil <devel@me.com>
NNTP-Posting-Host: 74.193.0.33

FEMA Camp Senior Administrator <Fema@fema.org>
NNTP-Posting-Host: 74.193.0.33

McClan and McMILF lost to a Black Muslim man from Kenya
<eatme@asshole.com>
NNTP-Posting-Host: 74.193.0.33

Wanker's Lonely Heart Club Terrorist <eatmetoo@foo.com>
NNTP-Posting-Host: 74.193.0.33

I've seen Nikki Haley' Big Brown Beaver <Wanker@anonmail.com>
NNTP-Posting-Host: 74.193.0.33