473,661 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Run-Time Check Failure #2" on Xerces & Xalan (Bug?)

Dear colleagues,

i'm getting in troubles using one XML library with Visual Studio .NET
and Xerces with Xalan.
When i execute the code i get the next run time error:

"Run-Time Check Failure #2 - Stack around the variable 'resolver' was
corrupted."

Looking on internet i've seen that the compiler, if you're running your
code in debug mode and you have activated the compile option /CRTs, adds
the hexadecimal sequence "cc cc cc cc cc cc cc cc" in memory just before
and after each variable in order to check if one of these bytes have
been modified after the excution.
If i not wrong, i understood that the error that i've showed is
triggered if the VC see that one of these "cc*" sequence have been
modified, coz it would mean that some part of the code has modified this
address, which would be a wrong behaivour.
Looking on the hexadecimal memory values of each variable, i've seen
that the sequences of "cc*" are modified for the variable "theEvaluat or"
at the end the execution (this inspection has been done carefully of all
values that are near to the variable "resolve").
This change is done when the declaration of "XPathEvalu ator
theEvaluator;" is executed.

The next lines are the important part code that generates the error:

LISTMSG XMLeanDBStatist icMsg::selectMs gs(char* selector)
{

LISTMSG llista;

XPathEvaluator: :initialize();

XalanSourceTree DOMSupport theDOMSupport;
this->document->normalize();

XercesParserLia ison * Liasion = new XercesParserLia ison();

XalanDocument* proxyDocument;
XalanNode* xalContextNode ;

XalanNode * node_porqueria = xalContextNode;

try
{
proxyDocument = Liasion->createDocument (this->document);
xalContextNode = proxyDocument->getDocumentEle ment();
}
catch(XalanDOME xception& error)
{
return llista;
}

XPathEvaluator theEvaluator;
XalanDocumentPr efixResolver resolver(proxyD ocument); /* <----- the
variable that triggers the run-time error */
try
{
XalanDOMString f = xalContextNode->getNodeName( );
....
...

At the end of the email i show the hexadecimal values of the variables
taken after and before the "resolve" variable in the memory, before and
after the execution, and some detailed explanations.
If i compile the code without the /CRTs flag a error is also get.

If anyone can orient me on how can i solve the problem i would be soo
thankul. What i'm doing wrong ? it would be a bug of the libraries ? or
may be i'm looking something in a wrong way ?

cheers !

Francesc Guim Bernat
*************** *************** *************** ***** EXTRA INFORMATION ***

- Variable theEvalutaor:

Address: 0x0012FD78
size : 16

Memory dump just when it's declared:
cc cc cc cc cc cc cc cc
0x0012FD78 38 6d 3b 00 30 7b 3b 00 00 6f 3b 00 78 6f 3b 00 cc cc cc cc
cc cc cc cc cc cc cc
(the two sequences of cc cc cc cc cc cc cc cc are present)

Memory dump after the execution:
00 00 00 00 00 00 00 00
0x0012FD78 38 6d 3b 00 30 7b 3b 00 00 6f 3b 00 78 6f 3b 00 cc cc cc cc
cc cc cc cc cc cc cc

as can be seen now the "cc cc cc cc cc cc cc cc" has been changed for
"00 00 00 00 00 00 00 00", this value is changed when the line :
"XalanDocumentP refixResolver resolver(proxyD ocument)" is executed, it
seems like if the declaration would be overlapping the previous
declaration, because if you add 36 at the address of resolver the
computed address is 0x0012FD82 that and is overlaping the variable
theEvaluator !

- Variable resolver:

Address: 0x0012FD4C
size: 36

Memory dump just when it's declared:
cc cc cc cc cc cc cc cc
0x0012FD4C fc 17 11 10 70 70 cc cc 10 aa 3b 00 d0 a9 3b 00 00 cc cc cc
02 00 00 00 70 cc cc
0x0012FD67 cc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 6d 3b
00 30 7b 3b 00 00 6f
0x0012FD82 3b 00 78 6f 3b 00 cc cc cc cc cc cc cc cc

(the two sequences of cc cc cc cc cc cc cc cc are present)

Memory dumo after the execution:
cc cc cc cc cc cc cc cc
0x0012FD4C 28 13 10 10 70 70 cc cc 00 00 00 00 00 00 00 00 00 cc cc cc
00 00 00 00 70 cc cc
0x0012FD67 cc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 6d 3b
00 30 7b 3b 00 00 6f
0x0012FD82 3b 00 78 6f 3b 00 cc cc cc cc cc cc cc cc cc cc

- Variable node_porqueria:

Address: 0x0012FD40
Size: 4

Memory dump just when it's declared:
cc cc cc cc cc cc cc cc
0x0012FD40 e0 70 3b 00 cc cc cc cc cc cc cc cc

(the two sequences of cc cc cc cc cc cc cc cc are present)

Memory dump after the execution:
cc cc cc cc cc cc cc cc
0x0012FD40 e0 70 3b 00 cc cc cc cc cc cc cc cc

All the size have been taken through the debuger.

Jul 22 '05 #1
1 2737
Francesc Guim Bernat <ne**@guim.ne t> spoke thus:
i'm getting in troubles using one XML library with Visual Studio .NET
and Xerces with Xalan.


Your post is off-topic for comp.lang.c++. Please visit

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4349
by: Colleyville Alan | last post by:
My app is giving me this error. Run-time error 3211: The database engine could not lock table 'Sorted_Template' because it is already in use by another person or process. When I run the app the first time through, it runs fine. I get this when I run a make-table query that tries to write out the table called "Sorted_Template". I tried using a TableDefs.Delete command thinking that make using the docmd.openquery was causing the...
3
2163
by: Stinky Pete | last post by:
I've mananged to get Access Run-time working on a Win 98 PC. I was stoked at that achievement, however I'm now stuck in that the files are opening Read only. That is, I can view all the records via the two forms I need but not change anything. Why? The command line for the user to access the file is simply as follows (from advice via msdn.microsoft.com) "C:\MS Runtime\Office10\MSACCESS.EXE" "Q:\QA Records Database\Vaccine...
4
37458
by: charliewest | last post by:
I need to set the selected drop down list value at run time. I am aware of the method "SelectIndex" however this works only if you know the precise location of the value within the ListItem collection. Otherwise, what is the recommended approach? I have managed to set the appropriate value using the following loop: for (int i = 1; i < ddlUsers.Items.Count; i++) { if (ddlUsers.Items.ToString() == sUserId)
1
2542
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2 - Stack around the variable 'resolver' was corrupted." Looking on internet i've seen that the compiler, if you're running your
6
2291
by: Andre Ranieri | last post by:
I'm trying to create a login page for customers to log into our corporate website, our presidents naturally wants the user and password fields to populate from a cookie so the customer doesn't have to type their credentials every time, this seems like a pretty common thing. However, when I try to populate the password HTML textbox from the cookie, the textbox remains blank. However, if I try this from an equivalent web control, the...
3
3881
by: DontB3 | last post by:
Hi, I'm new in this forum, and i hope someone can help. I'm creating an automatic application that transfer a database from Access -> DBF -> Oracle. When My App try to execute Insert SQL statement from DBF to Oracle database i found an error like this {Run-time error "7": Error executing statement! Error: System resource exceeded.} and then my program crash! i have to close my app, and start again. could some one help me to...
4
7614
by: PH.D.Condidater.Li.Ning | last post by:
Hi, all, I am using an uninitialised variable that generating a 'Run-Time Check Failure #3' when the debug version is running. The code is complex and changing it would be risky, so how do I turn off this annoying run time check? in platform : vista + visual studio 2005
6
8982
by: MISASIA | last post by:
I really hope someone can help me... My office is using a Menu which running VB. There got many button in that Menu and one of the button which name as "GMR" hit error. Its prompt a message box "Run time error 3343 : Unrecognized database format \\sunsrv2\GMR\Database\GMR.mdb.". I check the path given and the file GMR.mdb is there. I not sure what is the problem since I don't have VB knowledge. It is a VB coding problem? But I didn't modify...
5
6259
by: stpgmn | last post by:
I'm executing the following procedure within Access mdb. The query that I'm trying to run works nolrmally when executed as Query. Do anybody has any idea of reason of the error?. Thanks a lot Private Sub Form_BeforeInsert(Cancel As Integer) Dim Istruz As Variant
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8754
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8542
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.