Hi,
if you want the decoder to just be less picky and gracefully
decay on faulty XML input, you can edit the source file
moses/src/XmlOption.cpp
and remove all "return false;" statements after "TRACE_ERR("ERROR:..."
lines.
This way, the XML is processed all the way through.
-phi
2009/10/1 "Münt, Bernd" <[email protected]>:
> Hi Hieu and Barry,
> Thanks for your answers.
>
> I'm one step further now:
>
>> I've successfully compiled xmlrpc-c on a 64 bit
>> machine, running SuSe11 and
>> g++ 4.3.1. I'm using the latest stable release of
>> xmlrpc-c, which its
>> version.h reports as 1.16.19.
>
> Oh yes, the stable versions are the very old ones. The "advanced" (only
> available via svn) are the most recent. A little confusing.
> Now I manage to compile 1.16.X on 64 bit too.
>
> => mosesserver can be executed on a 64 bit machine.
>
>> You can use inittab to do this. However before going
>> down this road, the moses
>> server could certainly be made more robust. I found
>> that some of our servers
>> crashed because of excessively long input (6000+
>> character sentences), so we
>> should truncate long sentences. Invalid xml also causes
>> a crash, as you have
>> observed. Any other data on what causes the server to
>> crash would definitely
>> be useful,
>
> But calling abort() when the xml is invalid is not a "crash" with a core
> dump, it's just aborting.
>
> I would like:
> - mosesserver return an empty string (or the source sentence) in the xmlrpc
> return parameter text.
> - Is it possible to add an second parameter to the xmlrpc return with the
> name error: empty, if no error and in this special case ""Unable to parse XML
> in line ..." which comes from line 52 of Sentence.cpp.
>
> But I'm not familiar with the moses source code. So I don't know how to
> achieve this.
>
> I think I have to look for all "abort()" with grep -r "abort()" *.cpp and
> modify this by somelike returnError(...); which should directly jump to the
> xmlrpc return.
> Can you give me some hints where to look for these things?
>
>
> Regards, Bernd
>
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support