Solved

App causes a page fault in kernel32.

Posted on 2003-12-01
8
488 Views
Last Modified: 2011-09-20
Every time my DELPHI Application closes I got the error:

APP caused an invalid page fault in module KERNEL32.DLL at 0167:bff9db61

Does anybody knows what things may causing this application crash? (I got the error only in win 98 machines).
I have certified that every object created is freed.
The application use a lot of COM.  I do not call _Release for the COM Interfaces created, instead I assigned nil.
I got some threads too but they are all finished and destroyed before the application closes.
0
Comment
Question by:MauricioMaia
8 Comments
 
LVL 2

Expert Comment

by:Robn
ID: 9852677
Do you have any finailzation code in your application? Does this happen if you emulate the application closing by freeing the objects on a button click but not actually closing the app?
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 9852783

Well, it could be a couple of things that are causing this error (Win98 was not one of the most stable platforms to run on).

1.) Make sure you have all updates for the win98 systems, as well, you might want to check and make sure it is Win98 second edition (right click My Computer, select properties, it will tell you on first sheet of dialog what the version is)

2.) Have you taken a look at the MSDN site? If so, have you checked the things that they mention there? I am posting the link (invalid page fault common issues) in case you haven't.

http://support.microsoft.com/common/canned.aspx?R=d&H=Windows%2098%20Invalid%20Page%20Fault%20Articles&LL=kbwinmesearch%20or%20kbwinme&Sz=kbinvalidpagefault&CDID=EN-US-KB&LCID=1033

3.) Are you automating anything related to IE explorer, and if so, do you have the latest updates for IE?

Just some things to take a look at. If you could provide some more info (computer type, installed memory, free disk space, os version and service packs, com objects that you are using, modules in use when you app is running, etc), then it may be easier to narrow down the exact problem

Regards,
Russell

0
 
LVL 20

Expert Comment

by:Madshi
ID: 9852809
If you're using madExcept, please update to the very latest version (2.6a), cause the former version 2.6 sometimes lead to such problems...  :-(
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:MauricioMaia
ID: 9854120
Rodn,

I have freed all the objects and dereferenced all the interfaces on a button click event, but I did not get the same error. Things work fine.

rllibby

Before I post this question I have update my Windows with the latest services packs, the same for the IE. Nothing works.
I take a look at the Microsoft site you say, this site does not seem to have one situation that fits with mine.
And don't use nothing related with IE automation, the program does a video capture. (Interfaces came from Directshow). But the problem doesn't seem to be related with the Video Capture cause I have separated the capture code apart and the error did not appear.


madshi

No, I`m not using madExcept.

0
 
LVL 5

Expert Comment

by:delphized
ID: 9856912
Can I suggest you to have another look at your threads?
Are their exceptions handled? (if they raise an exception not managed, it goes in a AV).
Do you use BDE?
Sometimes it makes funny triks and make a programmer go crazy.
Did you looked at the event log when your appl. crashes?
Probably a dll that is unloaded...

good luck!!
0
 

Accepted Solution

by:
MauricioMaia earned 0 total points
ID: 9857584
Thanks for the help guys, but I found the answer to my problem of another way.

First I used the unit MemCheck (http://v.mahon.free.fr/pro/freeware/memcheck). The unit indicated a leak of memory that seem's to be at a free db component that I was using. Since I only have the dcus I removed the component and the error did not appear anymore.

0
 
LVL 2

Expert Comment

by:Robn
ID: 9857963
Glad to hear that you have sorted it out.

Regards,
Rob
0
 

Expert Comment

by:YensidMod
ID: 9861470
Question is PAQed and 400 points refunded.

YensidMod
Experts Exchange Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question