I’m working on some scripts for work to manage some build releases,
and I’m using ruby and the p4ruby libraries on Windows XP. When I
run my script from the command line or by loading it into IRB, I get:
This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application’s support team for more information.
I’ve tried with ruby 1.8.2, 1.8.5, 1.8.6 (all installed w/ the One-
click installer), and I get the exact same thing with each of them.
Just to see if I could get a better error message, I downloaded
ArachnoRuby and ran w/ that. My script runs successfully when I run
it from the IDE. While that has suddenly sold me on ArachnoRuby, it
doesn’t clear up my problem. Any thoughts?
unusual way.
Please contact the application’s support team for more information.
I’ve tried with ruby 1.8.2, 1.8.5, 1.8.6 (all installed w/ the One-
click installer), and I get the exact same thing with each of them.
Just to see if I could get a better error message, I downloaded
ArachnoRuby and ran w/ that. My script runs successfully when I run
it from the IDE. While that has suddenly sold me on ArachnoRuby, it
doesn’t clear up my problem. Any thoughts?
I’m sure it would help if you posted the code causing the error. The
first guess would be that there’s a bug or incompatibility in the
p4ruby extension.
unusual way.
Please contact the application’s support team for more information.
Is line 63 of SourceControl.rb a call into the p4ruby API’s? If so,
then you need to open a bug with the p4ruby developer(s). Since
p4ruby is a ruby C extension, the error most likely lies there.
Is line 63 of SourceControl.rb a call into the p4ruby API’s? If so,
then you need to open a bug with the p4ruby developer(s). Since
p4ruby is a ruby C extension, the error most likely lies there.
Unfortunately no. I’ll post the code (to my eternal
embarrassment). I hate posting code to usenet groups. You get
everything questioned from your variable names to your personal
lineage. My qualifiers - this is my quick and dirty parser to get
something going and I’m still learning ruby. Please be kind to
me.
The parameter passed in is a string containing the depot location
followed by whitespace, followed by a local location
Returns the Depot path and the local path for the provided
viewspec line
def SourceControl.parseViewSpecLine(line)
depot = []
local = []
state = :findDepot
line.each_byte do |b|
ch = b.chr # convert to ascii
case state
when :findDepot
depot << ch if ch !~ /\s/
state = :findDepotQuoted if ch == “"” ## ← Ln 63 HERE!!
state = :findPath if ch =~ /\s/
when :findDepotQuoted
depot << ch
state = :findDepot if ch == “"”
when :findPath
local << ch
end
end
# Join the character arrays in a string and return an array of the
two
[depot.join, local.join]
end
I should mention that this is called once for each line in the
Perforce view, and it is not crashing on the first call.
Because I love monologuing . . .
On a hunch I added a GC.start right after the first call, and it
crashes there now, so I guess p4ruby doesn’t care for garbage
collection. So y’all were right - I should contact the p4ruby
author. Thanks!