Board index » Visual Studio » RTTI Errors
|
SimiB
|
|
SimiB
|
RTTI Errors
Visual Studio376
I have a COM+ component that continues to throw "Access violation - no RTTI data" even though the module has been compiled with the RTTI switch. I am wondering if anyone has experience of under what other circumstances this might occur? - |
| Arnaud
Registered User |
Wed Feb 14 01:26:13 CST 2007
Re:RTTI Errors"davidn" <newmandav@gmail.com>a écrit dans le message de news: 1171432829.364963.104210@p10g2000cwp.googlegroups.com... QuoteI have a COM+ component that continues to throw "Access violation - no RTTI is generated for a class only if this class has at least one virtual function. This is perhaps the reason for your problem. Arnaud MVP - VC - |
| armancho_x
Registered User |
Wed Feb 14 02:45:10 CST 2007
Re:RTTI ErrorsQuoteRTTI is generated for a class only if this class has at least one virtual -- ====== Arman - |
| Ulrich
Registered User |
Wed Feb 14 03:41:19 CST 2007
Re:RTTI Errors
donotspam wrote:
Quote[Quoting Arnaud Debaene] Now, RTTI is a requirement for some operations but only generated and embedded in the binary code in above mentioned case. Uli - |
| Arnaud
Registered User |
Wed Feb 14 15:28:02 CST 2007
Re:RTTI Errors"Arman Sahakyan" <armancho_x@rambler.ru(donotspam)>a écrit dans le message de news: 59042CF3-F776-4745-8459-CF131D8BC335@microsoft.com... Quote
a type identifier that you can query at run-time on an object) is generated for a class only if that class has a virtual function. This is because this information is stored in the v-tbl of the class, and is accessed through the v-pointer. Arnaud MVP - VC - |
| davidn
Registered User |
Wed Feb 14 16:38:03 CST 2007
Re:RTTI Errors
On Feb 15, 8:28 am, "Arnaud Debaene" <adeba...@club-internet.fr>
wrote: Quote"Arman Sahakyan" <armanch...@rambler.ru(donotspam)>a =E9crit dans le mes= is really appreciated. firstly before i post code i want to give a bit a background the component is part of a classic 3 tier web app where you have asp for front end, COM+ c++ middle tier components and sql serve db. the particular component of concern is one of the components of the middle tier. The component that throws the error i have mentioned seems only to throw it after a period of time. The component is one of a set of components that have been set up to run in their own process (high isolation). Looking at the logs for the app one can see that things are ok then the no rtti errors start to be thrown continuously. QuoteFrom this point the application degenerates and it seems the only way have been put forward in particular memory leaks could be occuring somewhere. This has not been entirely eliminated as a possibility but i thought i would put a post out to canvas opinion/knowledge . I have written test scripts that call this component in the manner in which it is called in the app to run all night and never invoked any rtti errors. So thats the problem i cannot seem to replicate the problem in any test environment so i am seeking some knowledge regarding RTTI and under what other circumstances it would ultimately throw this error. to you Arnaud.. i will have a look at the code and see if there is a virtual fuction anywhere in the class once again thanks to all david - |
| Arnaud
Registered User |
Thu Feb 15 01:17:01 CST 2007
Re:RTTI ErrorsQuotefirstly before i post code i want to give a bit a background COM+ components, 3-tiers apps and this kind of voodoo if you don't perfectly understand the caveats of the language you are using (C++ in your case). So, with wich library is your COM+ compenent written? ATL, MFC, something else? Anyway, your component most probably have a virtual function, if it is a COM component... So, other possible explanations are : - part of the compoenent is compiled with RTTI enabled (compiler flag /GR)) and part isn't, wich will incur a disperancy in the binary represnetion of the object. - you have a wild pointer somewhere that is trahsing memory and happens to fill with garbage the RTTI information of your object. Look for suspicous pointer manipulation. In order to reproduce the problem, can you run the program in "live" environment with a debugger attached and configured to stop when an Access Violation is raised? If you can't deploy Visual Studio in your live environment, you could use WinDbg a a "light", installable-by-xcopy, debugger. Arnaud MVP - VC - |
| Ulrich
Registered User |
Thu Feb 15 01:57:27 CST 2007
Re:RTTI Errors
davidn wrote:
QuoteThe component that throws the error i have mentioned seems only to memory and handles. I guess that some allocation fails after some time and then new returns null or throws bad_alloc. If you don't handle this error, you will keep on working with invalid data that might cause above errors. Uli - |
| Vladimir
Registered User |
Thu Feb 15 11:50:56 CST 2007
Re:RTTI ErrorsQuotefirstly before i post code i want to give a bit a background from other dll. When referred dll is unloaded (and possibly reloaded again) the RTTI reference points to an invalid location, which leads to the error. -- Vladimir Nesterovsky - |
| davidn
Registered User |
Thu Feb 15 17:32:47 CST 2007
Re:RTTI Errors
On Feb 16, 4:50 am, "Vladimir Nesterovsky" <vladi...@nesterovsky-
bros.com>wrote: Quote>firstly before i post code i want to give a bit a background the com component is ATL and many have been written in the company i work for and underpin many of their early apps. so the use of ATL and COM is well estalished but i think most avoid it if possible!!! Obviously now we have moved onto .NET (c#) & java for new applications. i am involved in maintaining th legacy stuff and that is why i am asking this question. Also many of the people who were involved in writting it originally are no longer with us which is awkward. Anyway once again thanks you have given me some things to look at/ think about - |
