Solved

App causes a page fault in kernel32.

Posted on 2003-12-01
8
483 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
 

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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now