Skip Menu |

This queue is for tickets about the RPC-XML CPAN distribution.

Report information
The Basics
Id: 29351
Status: resolved
Priority: 0/
Queue: RPC-XML

Owner: rjray [...]
Requestors: dannyr [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.60

Subject: incorrect error reported for parse errors
Date: Thu, 13 Sep 2007 17:56:17 -0400
To: bug-RPC-XML [...]
From: Danny Rathjens <dannyr [...]>
Download (untitled) / with headers
text/plain 1.2k
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/ 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.
Download (untitled) / with headers
text/plain 275b
It turns out that the real error was in not catching that the parsing had bottomed out, before trying to pass what was (supposedly) a RPC::XML::request object to the server's dispatch() method. This is fixed and will be in the 0.60 release (to come within the next few days).
Download (untitled) / with headers
text/plain 134b
Committed. Example from this bug report used as basis for extra tests in t/40_server.t to test for this sort of problem going forward.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to