Re: theApp->Exit() causing invalid page fault
- To: "VGUI Submit" <firstname.lastname@example.org>
- Subject: Re: theApp->Exit() causing invalid page fault
- From: "Tom Hilinski" <email@example.com>
- Date: Tue, 7 Mar 2000 10:09:11 -0700
- Message-id: <001901bf8857$de28a080$debefea9@northpal>
- References: <firstname.lastname@example.org>
You may have to put your call to exit outside the catch block.
At the end of the catch block, the exception cleanup tasks are performed, such as destructor calls etc. So the page fault may be due to things being done out of order.
One suggestion on this: In a GUI app, in general catching an error shouldn't close the GUI interface. Usually you want the user to handle the "end the application" task explicitly. Display the error message, and suggest to the user what to do next. In this design, you wouldn't have the Exit call here, and the problem would be sidestepped.
Cheers... Tom Hilinski
----- Original Message -----
From: "Dan Osborne" <email@example.com>
To: "VGUI Submit" <firstname.lastname@example.org>
Sent: Tuesday, March 07, 2000 8:00 AM
Subject: theApp->Exit() causing invalid page fault
| I'm getting annoying errors on calling theApp->Exit() and wonder if anyone
| can put me straight. In a command window I attempt to open my database. If
| an exception is thrown I do this ...
| catch(otl_exception& p)
| // intercept OTL exceptions
| vNoticeDialog note(this);
| note.Notice("Failed to open database");
| The Exit function just does the default ...
| file://============================>>> ora2App::Exit
| void ora2App::Exit(void)
| // This is called to close all windows.
| vApp::Exit(); // Default behavior
| The error I get is ...
| ORA2 caused an invalid page fault in
| module ORA2.EXE at 0137:0044dba7.
| EAX=0258f108 CS=0137 EIP=0044dba7 EFLGS=00010202
| EBX=00459630 SS=013f ESP=0258d840 EBP=0258f158
| ECX=0258f140 DS=013f ESI=0258f608 FS=3a27
| EDX=00000000 ES=013f EDI=00401781 GS=0000
| Bytes at CS:EIP:
| c7 42 08 84 60 45 00 89 d1 83 c1 10 89 4a 4c 89
| Stack dump:
| 0258f4f8 0258f608 00401781 5328203d 3d204449 43524f20 2929294c 65722041
| 72697571 2e206465 204c4c44 656c6966 7325202c 6177202c 6f6e2073 6f662074
| Normal exits work fine.
| Thanks in anticipation,
| Dan Osborne
| Specialist Business Solutions Ltd.
| To UNSUBSCRIBE, email to email@example.com
| with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org