Background: Our application uses a component written by an external provider. This component sometimes crashes with a C ++ runtime error Pure Virtual Function Dialog Box. We have an application deployed on the LCD and we would like the crash to simply crash because we have a process to restart the application if it works.
We have identified the source of the problem in the component supplied by the supplier, which we cannot change, since we do not have the source. We could wait for the provider to decide if we could automatically restart the application after a crash. The problem is that the application does not crash before the user clicks the OK button for the error, so we cannot detect that the process is stopped.
I built a small test application, the Winilla Win32 graphical 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();
}
Then I created an instance of A after the window popped up in the VS created win32 and voilà application template! I have a modal dialogue. I tried the solution here , but it still displayed an error dialog.
Any hint on how to suppress this dialog and quietly collapse