[ 
https://issues.apache.org/jira/browse/THRIFT-3346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14903004#comment-14903004
 ] 

Simon South edited comment on THRIFT-3346 at 9/22/15 5:11 PM:
--------------------------------------------------------------

In C, handler methods return a boolean value indicating whether they succeeded 
(TRUE) or failed (FALSE). If a method fails, it _must_ set its {{error}} 
parameter (using 
[{{g_set_error}}|https://developer.gnome.org/glib/stable/glib-Error-Reporting.html#g-set-error]
 or similar) before it returns FALSE. You've apparently modified the 
implementation of {{ping}} so it no longer follows this rule.

Take a second look at [the tutorial's 
implementation|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=tutorial/c_glib/c_glib_server.c;h=47bf47fa06377a23048af45f208225856267b7cf;hb=HEAD#l105],
 including the comment block immediately above it, and compare it to your own. 
If everything looks the same, attach to this ticket the copy of the server code 
you're working on and I'll take a closer look.

(Despite what Jens told you, StackOverflow is really a more appropriate place 
to ask questions regarding how to use the Thrift library. JIRA reports should 
be for problems with Thrift itself.)


was (Author: simonsouth):
In C, handler methods return a boolean value indicating whether they succeeded 
(TRUE) or failed (FALSE). If a method fails, it _must_ set its {{error}} 
parameter (using 
[{{g_set_error}}|https://developer.gnome.org/glib/stable/glib-Error-Reporting.html#g-set-error]
 or similar) before it returns FALSE. You've apparently modified the 
implementation of {{ping}} so it no longer follows this rule.

Take a second look at [the tutorial's 
implementation|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=tutorial/c_glib/c_glib_server.c;h=47bf47fa06377a23048af45f208225856267b7cf;hb=HEAD#l105],
 including the comments immediately above it, and compare it to your own. If 
everything looks the same, attach to this ticket the copy of the server code 
you're working on and I'll take a closer look.

(Despite what Jens told you, StackOverflow is really a more appropriate place 
to ask questions regarding how to use the Thrift library. JIRA reports should 
be for problems with Thrift itself.)

> c_glib: Tutorials example crashes saying Calculator.ping implementation 
> returned FALSE but did not set an error
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-3346
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3346
>             Project: Thrift
>          Issue Type: Question
>          Components: C glib - Library
>    Affects Versions: 0.9.2
>         Environment: 32 bit Ubuntu 14.10, with gcc version 4.8.2
>            Reporter: AkhlD
>            Assignee: Simon South
>            Priority: Minor
>
> In my environment, whenever i run the calculator example under the c_glib 
> directory by executing the ./tutorial_server it starts the server and 
> whenever i run the ./tutorial_client it connects to the server and calls the 
> ping() and then crashes with the following message on the server console:
> ** (process:9613): WARNING **: Calculator.ping implementation returned FALSE 
> but did not set an error
> And 
> ERROR: application error: (null)
> In the client console.
> Can someone point at me whats happening?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to