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:
outputFile = File.new(SCRIPT_NAME+".o"+job.id.to_s,“r”)
outputStr = outputFile.read
job.results = $1.split(/\n+/)
puts “Data gathered successfully from file
puts “Program has failed to gather the data from file
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.
Thanks in advance