Solved

App causes a page fault in kernel32.

Posted on 2003-12-01
8
487 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

789 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