[xsd-users] Access Violation

bruno.marotta at fortis.com bruno.marotta at fortis.com
Thu Jun 26 11:26:02 EDT 2008


And yes, you were right. The application was linking with both libraries.

Thanks!

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Thursday, June 26, 2008 4:01 PM
To: Marotta Bruno
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Access Violation

Hi Bruno,

bruno.marotta at fortis.com <bruno.marotta at fortis.com> writes:

> obj.action((xml::action::value)at);
> 
> raises an Access Violation... 
>
> [...]
>
> The call stack:
> 
>  	ntdll.dll!_DbgBreakPoint at 0() 	
>  	vrfcore.dll!00363933() 	
>  	vfbasics.dll!003a09b7() 	
>  	vfbasics.dll!0039b953() 	
>  	msvcr71d.dll!_heap_alloc_base(unsigned int size=3846624)  Line 212	C
>  	vfbasics.dll!003a236f() 	
>  	vfbasics.dll!003a236f() 	
>  	vfbasics.dll!0039928a() 	
>  	vfbasics.dll!0039928a() 	
>  	vfbasics.dll!0039707a() 	
>  	vfbasics.dll!003967ed() 	
>  	vrfcore.dll!00367487() 	
>  	ntdll.dll!_RtlpDphReportCorruptedBlock at 16()  + 0x151	
>  	ntdll.dll!_RtlpDphNormalHeapFree at 12()  + 0x2e	
>  	ntdll.dll!_RtlpDebugPageHeapFree at 12()  + 0x79	
>  	ntdll.dll!_RtlDebugFreeHeap at 12()  + 0x2c	
>  	ntdll.dll!_RtlFreeHeapSlowly at 12()  + 0x23d19	
>  	ntdll.dll!_RtlFreeHeap at 12()  + 0x16470	
>  	vfbasics.dll!0039bb0b() 	
>  	msvcr71.dll!free(void * pBlock=0x0a8120a0)  Line 103	C
>  	msvcp71.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy(bool _Built=true, unsigned int _Newsize=0)  Line 1517 + 0x6	C++
>  	msvcp71.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >()  Line 458	C++
>  	TradeExporterBase.dll!xsd::cxx::tree::string<char,xsd::cxx::tree::simple_type<xsd::cxx::tree::_type> >::~string<char,xsd::cxx::tree::simple_type<xsd::cxx::tree::_type> >()  + 0x6b	C++
>  	TradeExporterBase.dll!xml::action::~action()  + 0x2b	C++

Since the enum value is legal the only suspect I have is the situation
where the memory is allocated and deallocated on different heaps. Looking
at the stack trace I see both msvcr71.dll and msvcr71d.dll which may
indicate that your DLLs are built using different runtime libraries.
Try to make sure that all your DLLs that contain the generated code as
well the executable use the same runtime flavor (e.g., debug/release,
single/multi-threaded) and the runtime is DLL.

If the above does not help I will need a small test case from you that
reproduces the problem.

Boris


= = = = = = = = = = = = = = = = = = = = = = = = =
Fortis disclaimer :
http://www.fortis.be/legal/disclaimer.htm

Privacy policy related to banking activities of Fortis:
http://www.fortis.be/legal/privacy_policy.htm
= = = = = = = = = = = = = = = = = = = = = = = = =







More information about the xsd-users mailing list