Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3802522
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:13:19+00:00 2026-05-19T14:13:19+00:00

I have a very odd Problem: I use one of my base classes: IEventlistener()

  • 0

I have a very odd Problem:

I use one of my base classes: IEventlistener() which gets implemented by many other classes. Most of the time the system works. But now a very strange problem occured.

Once class (CGUIService) implements the interface, one method (VGetListenerName) works as expected the other one (VHandleMessage) gets a pure call when I check the callstack and I don’t understand why -.- (seems as if the vtable gets somehow overwritten or out of bounds …)

I made a screenshot so you can see variable before I call the VHandleMessage, which of course leads to a debug assertion R6025 – pure virtual function call because somehow the implemented method isn’t entered in the vtable of the IEventlistener().

Highres: http://www.fantasyhaze.com/cb/Error_purecall.png
www.fantasyhaze.com/cb/Error_purecall.png

I hope someone can give me a hint 🙂

Edit1.)

So just to explain it a little bit more I have created a new screenshot which
shows the same process, but now I have included 2 more virtual function
which are not pure and have a implementation (becuase of time reasons, I have not the time to implement all
methods again in each class which uses the interface)

The purple ones are the new ones,
The red one is the one which does not work
The orange one is the method which was there before and which worked and still works

You can see on the left side, that the VGetListenerName,VHandleEvent1,VHandleEvent2 work (debugpoint + current position)
and that those 3 are in the vtable … but not the important one (red)

highres: http://www.fantasyhaze.com/cb/Error_purecall2.png
vtable problem 2

Edit2.)

SOLUTION:

The main problem was, that CGUIService inherites from IBase. To have access to the Service I used a Service Locator which stores each service. Therefore it performes a static_cast in the Instance Getters Service::GetServiceInstance() and a static_cast was also performed to store the service as IBase. But IEventListener was not implemented in IBase furthermore the Service was cast back to IBase witout IEventListener and the vtable wasn’t ok.
Now IBase implements IEventListener and it works because the static_cast casts IEventListener correctly 🙂

Thx for the hints guys 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T14:13:19+00:00Added an answer on May 19, 2026 at 2:13 pm

    It is hard to judge from one screenshot, but from the information you gave my first guess would be a dangling pointer – perhaps you attempt to call the virtual method on an object which was already destroyed? Another possibility is the object is not completely constructed yet, but this is not very likely, as this would most likely needs some race condition in multiple threads.

    This and other possibilities are listed in What can cause a pure virtual function call in C++? quite exhaustively.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very odd problem. Whenever I try to use the Add View
I have a very odd problem. A class property is mysteriously reset between method
We have a very odd problem here with SVN. Let me first explain the
I have a very odd problem with javascript. My code is rather long so
I have a very odd problem with Flash 10 and ExternalInterface. I am currently
I have come across a very odd problem in C that I have never
I'm having a very odd problem that I can't understand. I have created an
Ok, so I have some problems with C++ iostreams that feels very odd, but
I have a very odd issue. When I execute a specific database stored procedure
This is very odd. I have never had this issue with ShowDialog in C#.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.