Segmentation Fault; more info?

I am getting a segmentation fault.

Is there some way to get more information about what caused the fault?

You’ll have to get a core dump and examine it with gdb. A quick google
search comes up with this:
http://linux-digest.blogspot.com/2008/01/working-with-core-dump.html

Jason

On Sep 27, 12:48 pm, Ralph S. [email protected] wrote:

[Note: parts of this message were removed to make it a legal post.]

I am getting a segmentation fault.

Is there some way to get more information about what caused the fault?

Along the segmentation fault you should be seen the backtrace of it.

Luis,

Monday, September 27, 2010, 9:55:13 AM, you wrote:

LL> On Sep 27, 12:48 pm, Ralph S. [email protected] wrote:

[Note: parts of this message were removed to make it a legal post.]

I am getting a segmentation fault.

Is there some way to get more information about what caused the fault?

LL> Along the segmentation fault you should be seen the backtrace of it.

LL> –
LL> Luis L.

I wish I did.

Ralph

On Sep 27, 2010, at 1:04 PM, Ralph S. wrote:

Is there some way to get more information about what caused the fault?

LL> Along the segmentation fault you should be seen the backtrace of it.

LL> –
LL> Luis L.

I wish I did.

You haven’t provided any useful information for us to help you
(platform, ruby version, code example that causes the crash, etc), but
I’m going to try again anyway.

If you are running on a UNIX platform with gdb installed, try this:

gdb --args ruby

When gdb starts up, type “run” at the prompt. When it crashes this time
you might be able to get more information as to location (type ‘bt’ to
get a backtrace from gdb).

cr

Chuck,

Monday, September 27, 2010, 12:44:14 PM, you wrote:

CR> On Sep 27, 2010, at 1:04 PM, Ralph S. wrote:

Luis,

Monday, September 27, 2010, 9:55:13 AM, you wrote:

LL> On Sep 27, 12:48 pm, Ralph S. [email protected] wrote:

[Note: parts of this message were removed to make it a legal post.]

I am getting a segmentation fault.

Is there some way to get more information about what caused the fault?

LL> Along the segmentation fault you should be seen the backtrace of it.

LL> –
LL> Luis L.

I wish I did.

CR> You haven’t provided any useful information for us to help you
(platform, ruby version, code example that causes the crash, etc), but
I’m going to try again anyway.

CR> If you are running on a UNIX platform with gdb installed, try this:

CR> gdb --args ruby

CR> When gdb starts up, type “run” at the prompt. When it crashes this
time you might be able to get more information as to location (type ‘bt’
to get a backtrace from gdb).

CR> cr

Sorry … Windows Platform.
[BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]

The program is an FXRuby program with about 4 threads running. Trimming
the problem down is not an option.

I was hoping there was some cross-platform general way of getting that
info.

On Sep 27, 2010, at 2:08 PM, Chuck R. wrote:

CR> On Sep 27, 2010, at 1:04 PM, Ralph S. wrote:

I am getting a segmentation fault.
CR> You haven’t provided any useful information for us to help you (platform, ruby version, code example that causes the crash, etc), but I’m going to try again anyway.
[BUG] Segmentation fault
Check the rubyinstaller wiki for instructions on installing the devkit:

http://github.com/oneclick/rubyinstaller/wiki/Development-Kit

I don’t know if it puts gdb into your path or not. Regardless, try to run ruby under gdb like I suggested above and see what happens.

I just checked and it doesn’t look like the devkit install includes gdb.
:frowning:

So, what I suggested won’t work just by installing devkit. You’ll need
to download gdb (get a version that matches the gcc version that
compiled your ruby binary) and compile it yourself.

cr

On Sep 27, 2010, at 2:02 PM, Ralph S. wrote:

The program is an FXRuby program with about 4 threads running. Trimming the problem down is not an option.

I was hoping there was some cross-platform general way of getting that info.

Ah, there might still be a way…

It appears that your ruby was installed from rubyinstaller.org which
means that your ruby was built by gcc. I think that if you install the
devkit that you might be able to run ruby under gdb on Windows.

Check the rubyinstaller wiki for instructions on installing the devkit:

http://github.com/oneclick/rubyinstaller/wiki/Development-Kit

I don’t know if it puts gdb into your path or not. Regardless, try to
run ruby under gdb like I suggested above and see what happens.

cr

On Sep 27, 4:02 pm, Ralph S. [email protected] wrote:

Sorry … Windows Platform.
[BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]

The program is an FXRuby program with about 4 threads running. Trimming the problem down is not an option.

I was hoping there was some cross-platform general way of getting that info.

Please note that Ruby 1.8.x is not multithread and that the
interpreter cannot enter in the context from another thread.

Also, there must be a code that raised this segmentation fault, any
particular function you’re invoking either form C side of FXRuby or in
Ruby-land.

If you ask the same question on FXRuby group you will get the same
answers: show some code.

Either to report a bug to Ruby or FXRuby you will need this, so better
start looking what your code is doing and see what could be the
culprit.

As for GDB, You can clone RubyInstaller repository and build the
DevKit yourself to include GDB in it. But don’t expect see in GDB a
backtrace of the root of your problem, because is not defined if is
FXRuby or Ruby-land.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs