[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Help: [BUG] Bus Error when 'splitting' a String

Diego Virasoro

10/18/2006 2:25:00 PM

Hello,
I'm currently trying to run a little script but I am stuck with this
error... which I can't decipher.

The error message says just: [BUG] Bus Error
and with a few puts statements here and there I could work out it is
caused by the line with the split method in the following code:

jobs.each {|job|
outputFile = File.new(SCRIPT_NAME+".o"+job.id.to_s,"r")
outputStr = outputFile.read
if(outputStr =~
/#{STRING_BEFORE_RESULTS}((.|\n)*)#{STRING_AFTER_RESULTS}/)
job.results = $1.split(/\n+/)
puts "Data gathered successfully from file
"+SCRIPT_NAME+".o"+job.id.to_s
else
puts "Program has failed to gather the data from file
"+SCRIPT_NAME+".o"+job.id.to_s
end
outputFile.close
}

One of the reason why I am having so much difficult with this bug is
that if jobs.size is 1 then it runs alright. The problem arises if
jobs.size is 2 (or more): then it would run fine in the first iteration
and fail in the second one.

I have also checked by adding a "puts $1" after the if(outputStr...
line, that for both iterations $1 is actually the correct string.

Any idea???

Thanks in advance

Diego Virsaoro

7 Answers

Nobuyoshi Nakada

10/18/2006 3:06:00 PM

0

Hi,

At Wed, 18 Oct 2006 23:25:13 +0900,
Diego Virasoro wrote in [ruby-talk:220421]:
> The error message says just: [BUG] Bus Error
> and with a few puts statements here and there I could work out it is
> caused by the line with the split method in the following code:

What's the version and the platform? And debugger available?

--
Nobu Nakada

Diego Virasoro

10/18/2006 3:27:00 PM

0

> > The error message says just: [BUG] Bus Error
> > and with a few puts statements here and there I could work out it is
> > caused by the line with the split method in the following code:
>
> What's the version and the platform? And debugger available?
>
I think (I don't have access now) it is ruby 1.6.2 on Solaris 9.

Diego

Diego Virasoro

10/19/2006 11:26:00 AM

0

> At Wed, 18 Oct 2006 23:25:13 +0900,
> Diego Virasoro wrote in [ruby-talk:220421]:
> > The error message says just: [BUG] Bus Error
> > and with a few puts statements here and there I could work out it is
> > caused by the line with the split method in the following code:
>
> What's the version and the platform? And debugger available?
>

Hi, I got more information now.

ruby -v give this: ruby 1.6.4 (2001-06-04) [sparc-solaris2.9]

Also, I have narrowed down the bug a little further, I think. It seems
that the splitting is actually fine, but it's the subsequent assignment
to job.results which is the problem.

Oh, and using the debbuger there seem to be no problem. In fact from
time to time it crashes on a different iteration of the loop (but
predominantly it crashes in the second one).

Any idea? Any info you can give would be very appreciated. In fact, I
apologize for the newbie question, but what is a bus error? Is it a
memory problem?

Diego

Nobuyoshi Nakada

10/24/2006 5:09:00 PM

0

Hi,

At Thu, 19 Oct 2006 20:30:07 +0900,
Diego Virasoro wrote in [ruby-talk:220608]:
> Any idea? Any info you can give would be very appreciated. In fact, I
> apologize for the newbie question, but what is a bus error? Is it a
> memory problem?

Upgrade to 1.8.5, or 1.6.8 at least.

--
Nobu Nakada

*US*

9/14/2010 1:49:00 PM

0

On Tue, 14 Sep 2010 23:19:00 +1000, "Peter Webb" <webbfamily@DIESPAMDIEoptusnet.com.au>
wrote:

>In your ...

The experts note that the buildings
were collapsed by demolition.

On Tue, 14 Sep 2010 15:52:55 +1000, "Peter Webb" <webbfamily@DIESPAMDIEoptusnet.com.au>
wrote:

>... explanantion [sic] ...

You'll do better if you gain proficiency
in a language.

On Tue, 14 Sep 2010 13:34:43 +1000, "Peter Webb" <webbfamily@DIESPAMDIEoptusnet.com.au>
wrote:

>... you believe...

No, I don't. I gather facts.

You need to start looking at facts.

On Tue, 14 Sep 2010 11:16:17 +1000, "Peter Webb" <webbfamily@DIESPAMDIEoptusnet.com.au>
wrote:

>In your ...

Bush and Cheney lied about 9/11.

On Mon, 13 Sep 2010 08:06:06 -0700, VFW <georgeswk@toast.net> wrote:

>In article <8l1s869ogo021q9ltf8l7a8t3df9dqgl6v@4ax.com>, * US * wrote:
>> On Mon, 13 Sep 2010 17:49:24 +1000, "Peter Webb" <webbfamily@DIESPAMDIEoptusnet.com.au> wrote:
>> >In your opinion ...
>>
>> Shouldn't you be reading up on things in general?
>>
>> On Sun, 12 Sep 2010 12:18:20 -0700 (PDT), spudnik <Space998@hotmail.com> wrote:
>>
>> >... the energy in the jetfuel "dissipated in teh fireball."
>>
>> Well it wasn't enough to collapse the
>> buildings anyway.
>>
>> http://whatreallyhappened.com/WRHARTICLES/thermite.htm?q=th...
>
>And;
>Have you seen the light?

>In article <0f488231-9a4e-4487-bcf0-515abb1a5fbf@c16g2000vbp.googlegroups.com>,Moebius Pretzel <m0by_pretzel@yahoo.com> wrote:
>> 3 new groups join the 9/11 Truth Movement
>> http://revolutionarypolitics.tv/video/viewVideo.php?video_id=12514&title=3-new-groups-join-the-9-11-trut...
>
>and they light the sky over "Ground Zero"

It would be good to see justice done.

>> http://www.prnewswire.com/news-releases/1280-architects-and-engineers-launch-third-light-beam-into-nyc-night-skyline-on-9th-anniversary-of-september-11th-1027...
>>
>> 1,280 Architects and Engineers Launch Third Light Beam into NYC Night
>> Skyline on 9th Anniversary of September 11th
>>
>> Represents WTC Bldg 7's still-officially-unexplained free fall
>> collapse and explosive implications
>>
>> NEW YORK, Sept. 11 /PRNewswire-USNewswire/ -- At 9:11 p.m. on the 9th
>> anniversary of the September attacks, the members of the 1,280-strong
>> Architects & Engineers for 9/11 Truth (AE911Truth) lit up the skies
>> over Manhattan with a towering 2-billion-candlepower beam of light to
>> raise public awareness that three, not just two, World Trade Center
>> high-rise buildings collapsed symmetrically at near free-fall
>> acceleration on 9/11, though only two were hit by planes. Three Beams
>> image at www.ae911truth.org, main page upper left.
>>
>> "Why is there a Third Beam in my skyline?" New Yorkers are asking
>> themselves tonight.
>>
>> AE911Truth founder Richard Gage, AIA, answered that question earlier
>> in the day at a 2:00 press conference in front of the entrance to the
>> now-rebuilt WTC 7 where he was joined by 9/11 victims' family members,
>> members of NYC CAN (New York City Coalition for Accountability Now)
>> and an audience of hundreds of concerned citizens from NYC and across
>> the country.
>>
>> "Building 7 is a smoking gun of the WTC crime scene. We hope that
>> after tonight, New Yorkers will realize this and see what happened
>> here on September 11th in a whole new light."
>>
>> (snip)
>>
>> --------------------------------------
>>
>> Smoking gun is right. That's why the corporate media has censored the
>> story of Bldg 7.
>
>thanks for the post.
>More power to the Truth.

Agreed.

Peter Webb

9/14/2010 2:00:00 PM

0

Was the object which flew into the Pentagon a commercial jet flight or
something else (like a missile)?

big john whine

9/14/2010 4:52:00 PM

0

petah webb

Thank you for finally posting exactly what you believe happened on
9/11.

I have some questions about your explanation:

1. Why would the aliens care about earthly politics, and in particular
why
do you think they would want to help frame Muslims in particular?

2. If, as you claim, the people who were supposedly on the planes are
now
living in a space colony, how come we can't see it?

3. How could it be a hologram *and* remote controlled? Or are you
talking
about different planes?
-----------------
so it's come to this.
and the Search Fer Truth ends up in the Recycle
Loony Bin.
Circumstantial Evidence means quite a bit when Evidence is Destroyed
or Concealed or Actively Contested in the case of Exposure
but don't worry,
there'll Always be a Star Warz or a Star Dreck.

haw haw haw
haw haw haw
haw haw haw
haw haw haw