Forum: Ruby I have this error while executing my Ruby Script

5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-06-27 18:12
hi,

when I am executing Ruby Script, Program is abruptly terminating and
it's printing text that it's a segmentation fault. Since it's stopping
the Ruby Interpreter, i couldn't catch this error in rescue block also.
So could anyone please provide me the solution ?

RAJ
14b5582046b4e7b24ab69b7886a35868?d=identicon&s=25 Joel Pearson (virtuoso)
on 2014-06-27 20:30
So you don't show any of your code, the error message, your operating
system details, your version of Ruby... and you expect a magical fix?
5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-06-28 05:48
hi Joel,

today is holiday here, I have my code in my office. I will give you all
the detail to you on Monday. By the way I give you some of the details
which you have asked me.

My operating System : Windows 7
Ruby version        :1.8.7

I will post that exact error message and code on Monday because I don't
have the code right now.

Thanks.
5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-06-30 13:35
hi Joel Pearson

You have asked me the details of my error and code,

Here is my code

def modalDialog(flg,flag=false)
  begin
    sleep 5
    if($browser.modal_dialog().exists?)
      begin
        if (flg == 'Ok')
          errLog=$browser.modal_dialog().td(:class,"PopupMsgTitleMenu").text
          $browser.modal_dialog().table(:id,"OK").click
'
'
'
'
'
end

And here is my error,

C:/Ruby187/lib/ruby/gems/1.8/gems/rautomation-0.7.2/lib/rautomation/adapter/win_32/functions.rb:319:
[BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]


This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
________________________________________________________________________
This error is coming for me when I execute this statement
"$browser.modal_dialog().exists?" So Can you suggest me what type of
Error is this? how would I resolve this problem?
14b5582046b4e7b24ab69b7886a35868?d=identicon&s=25 Joel Pearson (virtuoso)
on 2014-06-30 20:49
All I can find about segmentation faults in this context suggests that
it's caused by a  bug.

Try updating your gems.
If possible, upgrade your Ruby version since the one you're using is
very old
(https://www.ruby-lang.org/en/news/2013/06/30/we-re...), and
will contain bugs which have been fixed in newer versions.
5dfc843f9ecf6fb64b52a35bdce43910?d=identicon&s=25 Raja gopalan (arc)
on 2014-07-01 07:51
Hi,

I resolved this issue yesterday evening and I forgot to reply to you and
exactly as you said I upgrade a gem named ffi this issue was resolved.
And yes we are planning to move into a higher version of Ruby soon.

Thank you.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.