[xsde-users] VxWorks crashes when first starting parse
Terry.O'Laughlin at ipc.com
Wed Dec 15 23:21:55 EST 2010
We have attempted with our code for the very first time, to parse an incoming message using XSDe as the XML parser tool.
We are not exactly sure, but it appears the crash occurs at the beginning of the document_pimpl::parse() function.
We can't be exactly sure,but this is the calling method.
Our parsing design follows the 'multi-root' parser method.
We subclass 'document_pimpl' and override the methods; start_root_element, and end_root_element.
It appears that in the 'start_root_element' we determine the 'name' of the root element correctly.
In our specific case, with code snippet included below, we are trying to parse a 'ConnectRequestAck' message.
With this design, this is where the 'pre()' function is called on the ConnectRequestAck_paggr object, then we return the ConnectRequestAck root parser which ends the 'start_root_element' function.
Our crash occurs sometime after determining the 'name'.
We commented out the 'pre()' but we still crashed...
So any ideas why on VxWorks 5.5.1 this would happen? It seems like the crash results from trying to free mememory?
We haven't performed a detailed analysis to know exactly which object and function where the exception occurred.
Hopefully we'll do that first thing tomorrow morning (Thurs am).
So we took the input XML data, ran it successfully through our Windows-based parser with no problem. At least it appeared to have no problem.
So not sure if that is an 'apples-to-apples' test.
I've been parsing our messages on Windows for several weeks now. This is the first time after integrating the parser into our VxWorks environment to test this functionality.
So we were also thinking that if you could give us some pointers of where to follow the underlying parser code, where we could insert printf statements? We at present are not using a debugger and hadn't planned on it, so we've been debugging using printfs.
Appreciate the help,
start_root_element (const ro_string& ns,
const ro_string& name)
start_root_element (const ro_string& ns,
const ro_string& name,
const char* /* xsi:type */)
printf("Start Root Element \n");
if (name == connectRequest_parser.root_name ())
return &connectRequest_parser.root_parser ();
else if (name == connectRequestAck_parser.root_name ())
printf("Start Root Element: connectRequestAck parser \n");
// printf("Start Root Element: connectRequestAck parser PRE \n");
printf("Start Root Element: connectRequestAck parser PRE ++++++++ \n");
return &connectRequestAck_parser.root_parser ();
else if (name == sessionRequest_parser.root_name ())
Sr. Software Engineer
TS Engineering Alliance Sustaining Dept.
777 Commerce Drive
Fairfield, CT 06825
Terry.O'Laughlin at ipc.com<mailto:first.last at ipc.com>
[cid:green-logo32cf.jpg]Please consider the environment before printing this email.
DISCLAIMER: This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail.E-mail messages may contain computer viruses or other defects, may not be accurately replicated on other systems, or may be intercepted, deleted or interfered with without the knowledge of the sender or the intended recipient. If you are not comfortable with the risks associated with e-mail messages, you may decide not to use e-mail to communicate with IPC. IPC reserves the right, to the extent and under circumstances permitted by applicable law, to retain, monitor and intercept e-mail messages to and from its systems.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1268 bytes
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20101215/f708a6ff/green-logo32cf.jpg
More information about the xsde-users