Segmentation Fault; more info?

R

Ralph Shnelvar

[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?
 
L

Luis Lavena

[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.
 
R

Ralph Shnelvar

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

Luis,



Monday, September 27, 2010, 9:55:13 AM, you 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 Lavena

I wish I did.

Ralph
 
C

Chuck Remes

Luis,



Monday, September 27, 2010, 9:55:13 AM, you 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 Lavena

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 <script name>

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
 
R

Ralph Shnelvar

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

Chuck,



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



Monday, September 27, 2010, 9:55:13 AM, you 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 Lavena
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 <script name>

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.
 
C

Chuck Remes

Chuck,



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



Monday, September 27, 2010, 9:55:13 AM, you 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 Lavena
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 <script name>

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.

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
 
C

Chuck Remes

Chuck,



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


Luis,


Monday, September 27, 2010, 9:55:13 AM, you 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 Lavena
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 <script name>

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.

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.

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

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
 
L

Luis Lavena

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,825
Members
47,371
Latest member
Brkaa

Latest Threads

Top