Background information: Our application uses a componenent written by an external vendor. That component sometimes crashes with the C++ runtime error "Pure virtual function called" dialog. We have the application deployed on a LCD display and we would like the crash to simply crash, as we have a process in place to restart the application if it crashes.
We identified the source of the problem to be in the vendor supplied component, which we cannot modify since we do not have the source. We could wait for a vendor supplied solution if we were able to automatically restart application upon the crash. The problem is that the application does not crash before the user click on the OK button of the error so we cannot detect that the process stopped running.
I built a small test application, a vanilla Win32 GUI application to which I added the following code:
class A
{
public:
A();
protected:
virtual void myTest() = 0;
void zubzub();
};
class B : public A
{
protected:
virtual void myTest();
};
A::A()
{
zubzub();
}
void B::myTest()
{
}
void A::zubzub()
{
this->myTest();
}
I then created an instance of A after the window pops up in the VS generated win32 application template and voilà! I have the modal dialog. I tried the solution here but it still displayed the error dialog.
Any clue on how to suppress that dialog and crash silently