|Subject:||incorrect error reported for parse errors|
|Date:||Thu, 13 Sep 2007 17:56:17 -0400|
|To:||bug-RPC-XML [...] rt.cpan.org|
|From:||Danny Rathjens <dannyr [...] wirespring.com>|
RPC-XML-0.59 perl-5.8.8 I'm not exactly sure if this is an XML::Parser bug or XML::RPC::Parser bug, but the error comes from not following rpc-xml spec. Our API said to use <param> <value><string>foo</string></value> </param> <param> <value><string>bar</string></value> </param> but the client did: <param> <value><string>foo</string></value> <value><string>bar</string></value> </param> The misleading error message was: syntax error at line 1, column 0, byte 0 at /usr/lib/perl5/site_perl/5.8.8/i386-linux/XML/Parser.pm line 187 After a long wild goose chase, by editing the module I was able to add some debug warnings and find out that the real error message was: "Stack corruption detected at document line 32, column 4 (byte 875, closing tag param)" which pointed us at the </param> tag and helped us solve the issue. The byte 0 error seems to be because after the stack error occurs the "Stack Corruption" error string itself is passed to the expat parser. So the real error gets hidden by this extra one. I guess this has something to do with the overridden __DIE__ so it's not exiting at the right place with the right error. Sorry I haven't been able to pinpoint the problem more accurately. I thought I should get the info out there about the erroneous error message, though. :) Thanks.