Segmentation Fault while running echo_client.rb

pranav's picture

Hi,

I am facing the Segmentation fault whie running the echo_client.rb(after fixing the buffer overflow error). The execution is aborted and the error is reported at line 16 of  my_rails_app/app/controller/echo_service_controller.rb

This line is wsservice.reply(resquest,response).

Dunno if this is the real problem or if the bug is something else. But the error thrown is for this line.

I have tried a few things but with no success.

Im working on Linux.

Has anyone faced the same bug? Any fix?

Does this problem have something to do with installation or is the sample example incorrect?

Thanx in advance.

PS -

1. While running in 'gdb' the error was reported in 'wsf_util.c' at line num 630 (the corresponding is as follows)

                                            mep = RSTRING(mep_value)->ptr

2. I have already resolved the buffer overflow error. ( Refer - http://wso2.org/forum/thread/3083 )

pranav's picture

BUG Segmentation Fault fixed

Hi, In JIRA, raised a ticket for the bug, along with a (possible) patch. Pranav.
bmueller's picture

BUG Segmentation Fault

Hi, I had the same Seg-Fault-Error. While studying your patch, I was wondering about the following code-statement in wsc_util.c (line 629): if(mep_value == Qnil) { mep = RSTRING(mep_value)->ptr; So i replaced the '==' in the if-condition by '!=', and it seems to work! beat ruby: ruby 1.8.5 (2006-08-25) [x86_64-linux] linux: centos/xen wsf-ruby: wso2-wsf-ruby-src-1.1.0
dimuthuc's picture

Hi bmueller, Thanks for

Hi bmueller, Thanks for pointing that out. I corrected it in the svn. Thanks Dimuthu