[xsde-users] "Hello world" document_pimpl::parse() crash when built
in VS 2008
Митя Балахонский
dnomaid at gmail.com
Mon Apr 12 09:25:42 EDT 2010
Hi all,
I'm trying to engage XSD/e in a Windows Mobile 5.0 project.
(To reproduce this you must have Windows Mobile 5.0 Smartphone SDK installed)
First of all I build xsde.lib using the config from etc\vc-9.0\
(It builds for PocketPC2003/ARMv4 - can this be an issue?)
Then I create Win32 Smart Device Project (Windows Mobile 5.0
Smartphone, Windows Application).
I put the source code from examples\cxx\hybrid\hello\driver.cxx
Into the WndProc():
case IDM_OK:
{
try
{
hello_paggr hello_p;
xml_schema::document_pimpl doc_p (hello_p.root_parser (),
hello_p.root_name ());
hello_p.pre ();
static const char * KTestXml =
"<hello>\
<greeting>Hello</greeting>\
<name>sun</name>\
<name>moon</name>\
<name>world</name>\
</hello>" ;
doc_p.parse (KTestXml, strlen(KTestXml), true);
}
catch (const xml_schema::parser_exception& e)
{
return 1;
}
catch (const std::ios_base::failure&)
{
return 1;
}
}
DestroyWindow(hWnd);
break;
Then I add 6 files generated by
xsde.exe cxx-hybrid --no-long-long --generate-parser
--generate-aggregate hello.xsd
I specify
xsde.lib in the Additional Dependencies section of the Linker-Input options
secchk.lib in the Ignore Specific Library section
It builds ok.
Then I put a break-point on the line:
doc_p.parse (KTestXml, strlen(KTestXml), true);
I press F5, the debug starts, the blank window with Ok softkey shows
(on the device or the emulator)
Then I press Ok, the breakpoint hits, I press F10 and the program
crashes (the DestroyWindow(hWnd); line doesn't get executed)
The following lines appear in the Output Window:
Data Abort: Thread=81dd0918 Proc=802fe110 'XSDETest2.exe'
AKY=00080001 PC=0001195c(XSDETest2.exe+0x0000195c)
RA=0001193c(XSDETest2.exe+0x0000193c) BVA=28000000 FSR=00000007
Thanks in advance
--
Best regards,
Dmitry Balakhonsky
More information about the xsde-users
mailing list