You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@etch.apache.org by Se...@ese.de on 2013/05/17 14:16:57 UTC
Etch C++: How can I debug a deserialization failure?
I enabled logging and got these messages:
...
..\..\..\..\..\src\main\serialization\EtchBinaryTaggedDataInput.cpp:640 EtchBinaryTaggedDataInput, Custom value has been received
..\..\..\..\..\src\main\serialization\EtchBinaryTaggedDataInput.cpp:68 EtchBinaryTaggedDataInput, Deserialization of Message body has failed
..\..\..\..\..\src\main\transport\EtchMessagizer.cpp:99 EtchMessagizer, Deserialization of messages has been failed
When I send null instead of a real object, the error disappears.
How can I continue debugging?
Sebastian
________________________________
Von: Sebastian.Setzer@ese.de [Sebastian.Setzer@ese.de]
Gesendet: Freitag, 17. Mai 2013 11:55
An: user@etch.apache.org
Betreff: AW: Etch C++ EtchAsyncResultNone: How do you return "successful"?
Update: Analyzed with Wireshark.
The problem is not in the client. The message is sent. The (C++) server doesn't send a result.
Is there a way to log Errors receiving etch data?
For example by overwriting one of these?
status_t _sessionQuery( capu::SmartPointer<EtchObject> query, capu::SmartPointer<EtchObject> &result );
status_t _sessionControl( capu::SmartPointer<EtchObject> control, capu::SmartPointer<EtchObject> value );
status_t _sessionNotify( capu::SmartPointer<EtchObject> event );
Sebastian
________________________________
Von: Sebastian.Setzer@ese.de [Sebastian.Setzer@ese.de]
Gesendet: Freitag, 17. Mai 2013 11:31
An: user@etch.apache.org
Betreff: AW: Etch C++ EtchAsyncResultNone: How do you return "successful"?
Update:
The cause for the hanging client may be something else.
First, I had only log messages in the server. Now, I've got log messages in the client, too. What I see is this:
- client sends a message which returns a value: Ok
- Server receives the message
- client logs the result
- client sends a message which returns void:
- server receives the message
- client logs that the call returned
(This log is new. Before I had it, I thought that the server didn't answer)
- client sends a more complex message
- server doesn't receive it
- client hangs (call of server proxy method doesn't return)
So I think the problem's in my (Java) client.
Sebastian
________________________________
Von: Sebastian.Setzer@ese.de [Sebastian.Setzer@ese.de]
Gesendet: Freitag, 17. Mai 2013 10:24
An: user@etch.apache.org
Betreff: Etch C++ EtchAsyncResultNone: How do you return "successful"?
Hi list,
from the example I've seen that you return values like this:
say_helloAsyncResultPtr res = new EtchAsyncResult<EtchString>();
res->setResult(new EtchString("Hi From C++ Server!"));
return res;
But I've got some "void" functions. How do I return, there?
Returning NULL doesn't work (crash).
When I return a "new EtchAsyncResultNone()", the crash is gone, but the program hangs.
I suppose that's because I didn't call setResult (which doesn't exist for EtchAsyncResultNone).
I can't call setMailboxStatus because that's protected.
So how can I return "successful" whithout a value?
Sebastian
AW: Etch C++: How can I debug a deserialization failure?
Posted by Aa...@partner.bmw.de.
Hi Sebastian,
my first guess would be, that you don't use the same IDL File on Server and Client side.
In general you always have to return a result. If it is a void function, you neet to return the AsyncResultNone (as you said) which counts as successful as long as you haven't defined a exception.
Check your IDL, if this doesn't help send a small example of your code (IDL function, implementation and client call)
Aaron
________________________________
Von: Sebastian.Setzer@ese.de [Sebastian.Setzer@ese.de]
Gesendet: Freitag, 17. Mai 2013 14:16
An: user@etch.apache.org
Betreff: Etch C++: How can I debug a deserialization failure?
I enabled logging and got these messages:
...
..\..\..\..\..\src\main\serialization\EtchBinaryTaggedDataInput.cpp:640 EtchBinaryTaggedDataInput, Custom value has been received
..\..\..\..\..\src\main\serialization\EtchBinaryTaggedDataInput.cpp:68 EtchBinaryTaggedDataInput, Deserialization of Message body has failed
..\..\..\..\..\src\main\transport\EtchMessagizer.cpp:99 EtchMessagizer, Deserialization of messages has been failed
When I send null instead of a real object, the error disappears.
How can I continue debugging?
Sebastian
________________________________
Von: Sebastian.Setzer@ese.de [Sebastian.Setzer@ese.de]
Gesendet: Freitag, 17. Mai 2013 11:55
An: user@etch.apache.org
Betreff: AW: Etch C++ EtchAsyncResultNone: How do you return "successful"?
Update: Analyzed with Wireshark.
The problem is not in the client. The message is sent. The (C++) server doesn't send a result.
Is there a way to log Errors receiving etch data?
For example by overwriting one of these?
status_t _sessionQuery( capu::SmartPointer<EtchObject> query, capu::SmartPointer<EtchObject> &result );
status_t _sessionControl( capu::SmartPointer<EtchObject> control, capu::SmartPointer<EtchObject> value );
status_t _sessionNotify( capu::SmartPointer<EtchObject> event );
Sebastian
________________________________
Von: Sebastian.Setzer@ese.de [Sebastian.Setzer@ese.de]
Gesendet: Freitag, 17. Mai 2013 11:31
An: user@etch.apache.org
Betreff: AW: Etch C++ EtchAsyncResultNone: How do you return "successful"?
Update:
The cause for the hanging client may be something else.
First, I had only log messages in the server. Now, I've got log messages in the client, too. What I see is this:
- client sends a message which returns a value: Ok
- Server receives the message
- client logs the result
- client sends a message which returns void:
- server receives the message
- client logs that the call returned
(This log is new. Before I had it, I thought that the server didn't answer)
- client sends a more complex message
- server doesn't receive it
- client hangs (call of server proxy method doesn't return)
So I think the problem's in my (Java) client.
Sebastian
________________________________
Von: Sebastian.Setzer@ese.de [Sebastian.Setzer@ese.de]
Gesendet: Freitag, 17. Mai 2013 10:24
An: user@etch.apache.org
Betreff: Etch C++ EtchAsyncResultNone: How do you return "successful"?
Hi list,
from the example I've seen that you return values like this:
say_helloAsyncResultPtr res = new EtchAsyncResult<EtchString>();
res->setResult(new EtchString("Hi From C++ Server!"));
return res;
But I've got some "void" functions. How do I return, there?
Returning NULL doesn't work (crash).
When I return a "new EtchAsyncResultNone()", the crash is gone, but the program hangs.
I suppose that's because I didn't call setResult (which doesn't exist for EtchAsyncResultNone).
I can't call setMailboxStatus because that's protected.
So how can I return "successful" whithout a value?
Sebastian