473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

pure virtual function call C++ error

Hi,

I have a multi-threaded, vb.net service which access a database at a high
rate and makes use of com interop components (It is running on Windows XP
Pro and has been built in VS 2003). I get no error's when in debug build,
but in release build I sporadically receive the following error:

Microsoft Visual C++ Runtime Library:
Runtime Error!
Program: blah.exe

R6025
-pure virtual function call.
The service continues to run until the ok button is clicked, then the
service is stopped. I have very little idea what could be causing this and
ideas are welcome. I have updated to ado 2.8 but this hasn't seemed to
improve the situation.

Any help on this would be much appreciated :)

Alex.
Nov 20 '05 #1
3 4231
Alex,

It seems to me that somehow you are occasionally calling this function with
arguments of the wrong type. The COM object you are calling was not
designed to handle whatever arguments you are sending it, and its designer
accidentally left a bad function available. "Pure virtual" means "This
function can't be used. When you derive a class from this class, you must
override this function." The only way I can think of that this could happen
is if you are using an instance of a derived class and the library code
explictly calls the base class's version of a function.

None of this makes any sense to me. The bottom line is that this looks like
a bug in the COM object.

Good luck! (You'll need it.)

Rob
Nov 20 '05 #2
Thanks for the prompt reply Rob :)

Unfortunately I think you may be correct, a COM error is most likely - but I
am confused as to why this error occurs only in a release build, and even
then after a rather random period of time (about 1 - 2 minutes). If a call
was incorrect would it break on the first use? The service makes repeated
calls to the same methods (very fast) but it seems to break when it is
heavily loaded.

Alex.
"Rob Richardson" <no*******@n2net.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Alex,

It seems to me that somehow you are occasionally calling this function with arguments of the wrong type. The COM object you are calling was not
designed to handle whatever arguments you are sending it, and its designer
accidentally left a bad function available. "Pure virtual" means "This
function can't be used. When you derive a class from this class, you must
override this function." The only way I can think of that this could happen is if you are using an instance of a derived class and the library code
explictly calls the base class's version of a function.

None of this makes any sense to me. The bottom line is that this looks like a bug in the COM object.

Good luck! (You'll need it.)

Rob

Nov 20 '05 #3
Alex,

I'm afraid I can't help you with that. Apparently the COM object is getting
into an unanticipated, untested state as you are stressing it. I've never
heard of a run-time call to a pure virtual function before. I was a C++
programmer for a long time, and I've had said that it was impossible.

Rob
Nov 20 '05 #4

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

Similar topics

9
by: Dario | last post by:
This is a technical C++ post regarding the Microsoft runtime error R6025 Pure Virtual Function Call that sometime occurs in programs compiled with Microsoft Visual C++ 6.0. Please consider the...
2
by: Derek | last post by:
The following simple program causes a runtime error (pure virtual method called): struct Base { Base() { init(); } void init() { badIdea(); } virtual void badIdea() = 0; };
5
by: Ruben Campos | last post by:
I've recently noticed that it's not allowed to call a pure (non-implemented) virtual method inside a constructor or a destructor, doesn't matter if this method is declared in the considered class...
11
by: santosh | last post by:
Hello, I was going through the Marshal Cline's C++ FAQ-Lite. I have a doubt regarding section 33.10. Here he is declaring a pure virtual destructor in the base class. And again defining...
10
by: PengYu.UT | last post by:
Hi, A pure function is called in the base function constructor. It generate a run time error: "pure virtual method called". My problem is that class A have some derived classes. I want A's...
6
by: pakis | last post by:
I am having a problem of pure virtual function call in my project. Can anyone explaine me the causes of pure virtual function calls other than calling a virtual function in base class? Thanks
21
by: sks | last post by:
Hi , could anyone explain me why definition to a pure virtual function is allowed ?
10
by: John Goche | last post by:
Hello, page 202 of Symbian OS Explained by Jo Stichbury states "All virtual functions, public, protected or private, should be exported" then page 203 states "In the rare cases where a...
3
by: a | last post by:
Hi, I need clarification for virtual method and pure virtual method. e.g Class Base{ virtual void func(){ ---- } } Class Child : public Base{ void func()
14
by: Jack | last post by:
Hi, I meet a question with it , I did not get clear the different betteen them, for example: #include <iostream>
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.