Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / November 2005

Tip: Looking for answers? Try searching our database.

Strange behaviour with mixed-mode C++ program

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ralphsieminsky@hotmail.com - 10 Nov 2005 00:08 GMT
I am seeing a strange behavior with a managed/unmanaged C++ program.

The program is a large application made of DLLs, COM components,
and an exe.  When I recompile the exe with /clr a problem occurs: at
some point, deep down the stack far from main() and far from the
managed to native transition, a call to IXMLDOMNode::selectSingleNode
through a ComPtr<IXMLDOMNode> fails.  Under the debugger, several
"First-chance exception - interface not registered" messages appear
at that point.

This happens only in Release mode, under Debug mode everything
works fine.  What's even stranger is that in Release mode, if I make
the
program a bit slower by requiring that the user clicks an OK MessageBox
before the call to selectSingleNode is made, then the call succeeds.
It is systematic, no MessageBox the call fails, MessageBox the call
succeeds. The rest of the program is is unchanged.

I suspect that there is a nasty bug somewhere in my program, but is
there anything done under the covers at the .NET level that could
explain this ?  Like some background processing of loaded libraries
when the exe is compiled with /clr  ?....

Thanks for any insight.

Best,
Ralph
ralphsieminsky@hotmail.com - 10 Nov 2005 00:11 GMT
Forgot to mention: this is using VS 2005 (the release).

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.