Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Author |
Message |
Phil Harri #1 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
On certain machines ( with win95 ) some of our apps will, without fail, present the Invalid Page Fault in Module Kernel32.dll I have never seen it happen on a Win98 or NT 4.0 machine. This only happens when the application is Ended. It does not matter what method is used to end the program but on theses machines it will happen every time. The program will otherwise run perfectly. You can turn around and launch the app again and it will run fine. Other apps on the machine do not do this. The only reference to this that I could find in MSDN is posted at the bottom of this message. It sounds almost exactly like what I am experiencing, but it relates to a bug in VC++ 5, not VB at all... I am using DAO with the 25/35 compatibility library. As best that I can tell, I am using the newest DAO related files. No matter how well people like my app, if the last thing they see is "Invalid Page Fault in Kernel32.dll" then... well you know. Any and all suggestions will be greatly appreciated.
Article ID: Q153897 SYMPTOMS An application intermittently crashes on exit and an error similar to the following appears: <application> caused an invalid page fault in module KERNEL32.DLL at 0137:bff9a07c. This behavior occurs when the application is using the MFC DAO classes, the MFC ODBC classes, or the ODBC API to access a database using the Jet Database Engine. RESOLUTION Call the LoadLibrary() function on the Jet Engine as shown in the sample code below. This call needs to be done only once during execution of the program. To minimize any adverse affect on performance, call LoadLibrary() only after the database has been opened. Do not call FreeLibrary() for this DLL. The DLL will be automatically unloaded when the application exits. This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0. If you are using the ODBC, you can simply use the newer ODBC driver that is available with Visual C++ 5.0. If you are using DAO, you need to build your application using Visual C++ 5.0 to use DAO 3.5. The earlier MFC classes use DAO/Jet 3.0 and do not recognize DAO 3.5. STATUS This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0.
|
Thu, 20 Sep 2001 04:00:00 GMT |
|
 |
Bertie Wooste #2 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Quote:
>On certain machines ( with win95 ) some of our apps >will, without fail, present the Invalid Page Fault in Module >Kernel32.dll I have never seen it happen on a Win98 >or NT 4.0 machine.
I bet it doesn't happen either on a Win95 machine that's been kept clear of IE4? If that's the case I share your problem without having found the solution. Problem halved? Bertie
|
Thu, 20 Sep 2001 04:00:00 GMT |
|
 |
Paul Parkhurs #3 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Are you doing any API calls or accessing any third-party controls or DLLs? -- Paul Parkhurst Software Engineer
Quote:
>On certain machines ( with win95 ) some of our apps >will, without fail, present the Invalid Page Fault in Module >Kernel32.dll I have never seen it happen on a Win98 >or NT 4.0 machine. >This only happens when the application is Ended. It does >not matter what method is used to end the program but >on theses machines it will happen every time. The program >will otherwise run perfectly. You can turn around and >launch the app again and it will run fine. Other apps on the >machine do not do this. >The only reference to this that I could find in MSDN is >posted at the bottom of this message. It sounds almost >exactly like what I am experiencing, but it relates to a bug >in VC++ 5, not VB at all... I am using DAO with the >25/35 compatibility library. As best that I can tell, I am >using the newest DAO related files. >No matter how well people like my app, if the last thing >they see is "Invalid Page Fault in Kernel32.dll" then... >well you know. >Any and all suggestions will be greatly appreciated.
>Article ID: Q153897 >SYMPTOMS >An application intermittently crashes on exit and an error similar to the >following appears: > <application> caused an invalid page fault in > module KERNEL32.DLL at 0137:bff9a07c. >This behavior occurs when the application is using the MFC DAO classes, the >MFC ODBC classes, or the ODBC API to access a database using the Jet >Database Engine. >RESOLUTION >Call the LoadLibrary() function on the Jet Engine as shown in the sample >code below. This call needs to be done only once during execution of the >program. To minimize any adverse affect on performance, call LoadLibrary() >only after the database has been opened. Do not call FreeLibrary() for this >DLL. The DLL will be automatically unloaded when the application exits. >This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0. If >you are using the ODBC, you can simply use the newer ODBC driver that is >available with Visual C++ 5.0. If you are using DAO, you need to build your >application using Visual C++ 5.0 to use DAO 3.5. The earlier MFC classes use >DAO/Jet 3.0 and do not recognize DAO 3.5. >STATUS >This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0.
|
Fri, 21 Sep 2001 03:00:00 GMT |
|
 |
Phil Harri #4 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Quote:
> Are you doing any API calls or accessing any third-party controls or
Yes... FindWindow Lib "user32.dll" ( not using, but in a module that I reuse.) FindWindowEx Lib "user32.dll" ( not using ) GetUserName Lib "advapi32.dll" ( am using ) SetWindowPos Lib "user32.dll" ( not using ) GetPrivateProfileString Lib "kernel32.dll" (am using ) WritePrivateProfileString Lib "kernel32.dll" ( am using ) mciSendString Lib "winmm.dll" ( am using, but only recently and the problem existed prior ) ... as a test, I removed the profile string functions (kernel32.dll) and the problem persisted. I am also using some of the Sheridan controls... however... another developer is having the same problem, and he has stripped all of his Sheridan out. Also Using the Wang Image Controls.... I am not distributing them as that is not good. I have had the best results compiling with the version found in the MSDN win95 disk. (This is an area that I suspect; however, I cannot strip it out of my app to see because my app uses them heavily.) I am also using a couple of ActiveX controls which I wrote. They do not do anything special, but I am looking at them to make sure that I am not doing something stupid. Quote:
> Are you doing any API calls or accessing any third-party controls or >DLLs? >-- >Paul Parkhurst >Software Engineer
>>On certain machines ( with win95 ) some of our apps >>will, without fail, present the Invalid Page Fault in Module >>Kernel32.dll I have never seen it happen on a Win98 >>or NT 4.0 machine. >>This only happens when the application is Ended. It does >>not matter what method is used to end the program but >>on theses machines it will happen every time. The program >>will otherwise run perfectly. You can turn around and >>launch the app again and it will run fine. Other apps on the >>machine do not do this. >>The only reference to this that I could find in MSDN is >>posted at the bottom of this message. It sounds almost >>exactly like what I am experiencing, but it relates to a bug >>in VC++ 5, not VB at all... I am using DAO with the >>25/35 compatibility library. As best that I can tell, I am >>using the newest DAO related files. >>No matter how well people like my app, if the last thing >>they see is "Invalid Page Fault in Kernel32.dll" then... >>well you know. >>Any and all suggestions will be greatly appreciated.
>>Article ID: Q153897 >>SYMPTOMS >>An application intermittently crashes on exit and an error similar to the >>following appears: >> <application> caused an invalid page fault in >> module KERNEL32.DLL at 0137:bff9a07c. >>This behavior occurs when the application is using the MFC DAO classes, the >>MFC ODBC classes, or the ODBC API to access a database using the Jet >>Database Engine. >>RESOLUTION >>Call the LoadLibrary() function on the Jet Engine as shown in the sample >>code below. This call needs to be done only once during execution of the >>program. To minimize any adverse affect on performance, call LoadLibrary() >>only after the database has been opened. Do not call FreeLibrary() for this >>DLL. The DLL will be automatically unloaded when the application exits. >>This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0. If >>you are using the ODBC, you can simply use the newer ODBC driver that is >>available with Visual C++ 5.0. If you are using DAO, you need to build your >>application using Visual C++ 5.0 to use DAO 3.5. The earlier MFC classes >use >>DAO/Jet 3.0 and do not recognize DAO 3.5. >>STATUS >>This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0.
|
Fri, 21 Sep 2001 03:00:00 GMT |
|
 |
Phil Harri #5 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
One machine that I know of in particular does have IE4 installed... Do you think? Quote:
>>On certain machines ( with win95 ) some of our apps >>will, without fail, present the Invalid Page Fault in Module >>Kernel32.dll I have never seen it happen on a Win98 >>or NT 4.0 machine. >I bet it doesn't happen either on a Win95 machine that's been kept clear of >IE4? If that's the case I share your problem without having found the >solution. Problem halved? >Bertie
|
Fri, 21 Sep 2001 03:00:00 GMT |
|
 |
Jimmy Fik #6 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
I actually got this error in vb3 and track it down. (I know you're not using vb3) I track it down to a printer object that was not cleared (set to nothing). After I put the code in to cleared the object, I stop getting the page fault. Are you setting all your Data Objects to nothing before exiting the program? Jimmy
Quote: > On certain machines ( with win95 ) some of our apps > will, without fail, present the Invalid Page Fault in Module > Kernel32.dll I have never seen it happen on a Win98 > or NT 4.0 machine. > This only happens when the application is Ended. It does > not matter what method is used to end the program but > on theses machines it will happen every time. The program > will otherwise run perfectly. You can turn around and > launch the app again and it will run fine. Other apps on the > machine do not do this. > The only reference to this that I could find in MSDN is > posted at the bottom of this message. It sounds almost > exactly like what I am experiencing, but it relates to a bug > in VC++ 5, not VB at all... I am using DAO with the > 25/35 compatibility library. As best that I can tell, I am > using the newest DAO related files. > No matter how well people like my app, if the last thing > they see is "Invalid Page Fault in Kernel32.dll" then... > well you know. > Any and all suggestions will be greatly appreciated.
> Article ID: Q153897 > SYMPTOMS > An application intermittently crashes on exit and an error similar to the > following appears: > <application> caused an invalid page fault in > module KERNEL32.DLL at 0137:bff9a07c. > This behavior occurs when the application is using the MFC DAO classes, the > MFC ODBC classes, or the ODBC API to access a database using the Jet > Database Engine. > RESOLUTION > Call the LoadLibrary() function on the Jet Engine as shown in the sample > code below. This call needs to be done only once during execution of the > program. To minimize any adverse affect on performance, call LoadLibrary() > only after the database has been opened. Do not call FreeLibrary() for this > DLL. The DLL will be automatically unloaded when the application exits. > This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0. If > you are using the ODBC, you can simply use the newer ODBC driver that is > available with Visual C++ 5.0. If you are using DAO, you need to build your > application using Visual C++ 5.0 to use DAO 3.5. The earlier MFC classes use > DAO/Jet 3.0 and do not recognize DAO 3.5. > STATUS > This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0.
|
Sat, 22 Sep 2001 03:00:00 GMT |
|
 |
Paul Parkhurs #7 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
The last time I had an EXE GPF when I exited was when I was doing some DLL calls and was passing them the wrong information or data types. The calls themselves didn't error, but when I tried exiting I'd GPF every time. Once I figured out what was happening (it was on ONE call in an auxiliary DLL that I had created that my app was using) and fixed the call, I no longer had the problem. You might want to check your API calls to make sure they're defined correctly and that they're being passed valid pointers and data. Also, check to see if anyone else has experienced problems with the third-party controls you're using. And make sure you're accessing the controls properly. VB is a very robust environment and I've never had anything I've written in straight VB crash on me. Crashes have only occurred when accessing something outside the system. -- Paul Parkhurst Software Engineer
Quote:
>> Are you doing any API calls or accessing any third-party controls or >Yes... >FindWindow Lib "user32.dll" ( not using, but in a module that I >reuse.) >FindWindowEx Lib "user32.dll" ( not using ) >GetUserName Lib "advapi32.dll" ( am using ) >SetWindowPos Lib "user32.dll" ( not using ) >GetPrivateProfileString Lib "kernel32.dll" (am using ) >WritePrivateProfileString Lib "kernel32.dll" ( am using ) >mciSendString Lib "winmm.dll" ( am using, but only recently and the problem >existed prior ) >... as a test, I removed the profile string functions (kernel32.dll) and the >problem persisted. >I am also using some of the Sheridan controls... however... another >developer >is having the same problem, and he has stripped all of his Sheridan out. >Also Using the Wang Image Controls.... I am not distributing them as that is >not >good. I have had the best results compiling with the version found in the >MSDN >win95 disk. (This is an area that I suspect; however, I cannot strip it out >of my app >to see because my app uses them heavily.) >I am also using a couple of ActiveX controls which I wrote. They do not do >anything >special, but I am looking at them to make sure that I am not doing something >stupid.
>> Are you doing any API calls or accessing any third-party controls or >>DLLs? >>-- >>Paul Parkhurst >>Software Engineer
>>>On certain machines ( with win95 ) some of our apps >>>will, without fail, present the Invalid Page Fault in Module >>>Kernel32.dll I have never seen it happen on a Win98 >>>or NT 4.0 machine. >>>This only happens when the application is Ended. It does >>>not matter what method is used to end the program but >>>on theses machines it will happen every time. The program >>>will otherwise run perfectly. You can turn around and >>>launch the app again and it will run fine. Other apps on the >>>machine do not do this. >>>The only reference to this that I could find in MSDN is >>>posted at the bottom of this message. It sounds almost >>>exactly like what I am experiencing, but it relates to a bug >>>in VC++ 5, not VB at all... I am using DAO with the >>>25/35 compatibility library. As best that I can tell, I am >>>using the newest DAO related files. >>>No matter how well people like my app, if the last thing >>>they see is "Invalid Page Fault in Kernel32.dll" then... >>>well you know. >>>Any and all suggestions will be greatly appreciated.
>>>Article ID: Q153897 >>>SYMPTOMS >>>An application intermittently crashes on exit and an error similar to the >>>following appears: >>> <application> caused an invalid page fault in >>> module KERNEL32.DLL at 0137:bff9a07c. >>>This behavior occurs when the application is using the MFC DAO classes, >the >>>MFC ODBC classes, or the ODBC API to access a database using the Jet >>>Database Engine. >>>RESOLUTION >>>Call the LoadLibrary() function on the Jet Engine as shown in the sample >>>code below. This call needs to be done only once during execution of the >>>program. To minimize any adverse affect on performance, call LoadLibrary() >>>only after the database has been opened. Do not call FreeLibrary() for >this >>>DLL. The DLL will be automatically unloaded when the application exits. >>>This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0. >If >>>you are using the ODBC, you can simply use the newer ODBC driver that is >>>available with Visual C++ 5.0. If you are using DAO, you need to build >your >>>application using Visual C++ 5.0 to use DAO 3.5. The earlier MFC classes >>use >>>DAO/Jet 3.0 and do not recognize DAO 3.5. >>>STATUS >>>This bug has been fixed in Jet 3.5 that is included with Visual C++ 5.0.
|
Sat, 22 Sep 2001 03:00:00 GMT |
|
 |
Bertie Wooste #8 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Quote:
>One machine that I know of in particular does have IE4 installed... >Do you think?
I had a simple app written in VB5 which used a 3rd-party code component. Early in the code I created an object from that component, and just before exiting the app I set the reference to Nothing. However, immediately after the app closed, users on Win95+IE4 platforms got this kernel32 page fault with exactly the same addresses/values you listed. Users on other platforms didn't get the problem. If the user exited the app before the object was created there was no problem on any platform. Interestingly, when the code component's OCX was registered (using REGSVR) on a Win95+IE4 platform the kernel fault appeared. Uninstalling IE4 made it go away. This lets my app out, I believe! I assign the blame to a combination of Microsoft and the component authors, probably due to undocumented spec creep (to coin a phrase). Bertie
|
Sat, 22 Sep 2001 03:00:00 GMT |
|
 |
Phil Harri #9 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Thanks to all who have contributed to this thread! I think that I have nailed down specifically what is causing the problem in my apps. I use the Imaging for Windows OCX controls extensively. I created a single-form exe with nothing on it but one of my OCX controls. No code except to load it with data. This program worked fine and DID NOT page fault on exit. I created another single-form exe with nothing on it but the Wang ImgEdit OCX control. No code except to load it with an image. This program DID page fault on exit. So... I think, at least in my case, the culprit has something to do with the Versions of Imaging for Windows controls. You are not allowed to distribute these files with your apps, so you must rely on the client computer having the needed controls. Unfortunately, if you compile your app under Windows 98 which has the newer Kodak ocx's, Win 95 apps with the earlier Wang version will not function properly... so you must compile under the Older Wang version, and all seems well ( except for this page fault thing in 95 ). So... that is my bed and I must now figure out how to lie in it. Quote:
>On certain machines ( with win95 ) some of our apps >will, without fail, present the Invalid Page Fault in Module >Kernel32.dll I have never seen it happen on a Win98 >or NT 4.0 machine. > . . . . .
|
Sat, 22 Sep 2001 03:00:00 GMT |
|
 |
RJol #10 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Quote:
> >One machine that I know of in particular does have IE4 installed... > >Do you think? > I had a simple app written in VB5 which used a 3rd-party code component. > Early in the code I created an object from that component, and just before > exiting the app I set the reference to Nothing. However, immediately after > the app closed, users on Win95+IE4 platforms got this kernel32 page fault > with exactly the same addresses/values you listed. Users on other platforms > didn't get the problem. If the user exited the app before the object was > created there was no problem on any platform. > Interestingly, when the code component's OCX was registered (using REGSVR) > on a Win95+IE4 platform the kernel fault appeared. Uninstalling IE4 made it > go away. This lets my app out, I believe! > I assign the blame to a combination of Microsoft and the component authors, > probably due to undocumented spec creep (to coin a phrase).
I saw a similar problem in an app that would crash on exit in Win95 only. Removed the End statement and it went away. You don't use "End" do you, Bertie ;-)
|
Sat, 22 Sep 2001 03:00:00 GMT |
|
 |
Bertie Wooste #11 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Quote:
>I saw a similar problem in an app that would crash on exit in Win95 only. >Removed the End statement and it went away. You don't use "End" do you, >Bertie ;-)
Ha ha... I will certainly try to see whether that app "End"s and if so whether removing the End makes a difference, but as I said, the OCX on its own caused the fault to occur when registering itself so it's a complex situation. If I can give you more End is Evil ammo. RJ, I won't flinch! Bertie
|
Sat, 22 Sep 2001 03:00:00 GMT |
|
 |
RJol #12 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Quote:
> Ha ha... I will certainly try to see whether that app "End"s and if so > whether removing the End makes a difference, but as I said, the OCX on its > own caused the fault to occur when registering itself so it's a complex > situation. > If I can give you more End is Evil ammo. RJ, I won't flinch!
hehe, couldn't resist. Could be some Win95 "features" have been "improved" in later versions of Windows? I swore it (End) off after problems with VB4 and Win95. Possibly that's why I view End as more Evil than other people do.
|
Sun, 23 Sep 2001 03:00:00 GMT |
|
 |
David Phillip #13 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Phil, I saw this thread from the start, but didn't think I had anything to contribute. But not that you mentioned the Wang Image controls, I'm right with you. I use those freebies as well, and have had problems as well. I don't have a solution, but perhaps we can share all we know. Here are some facts/beliefs: (can you confirm) - If you compile on NT 4 your EXE will crash on 95/98. (won't even load the form) - If you compile on Win95 (original flavor) your app may crash on some Win95 machines (what you describe below) - Developers are legally prohibited from distributing the OCX's/DLL's w/out using Wang's installation program Can you please tell me exactly what version is crashing for you? I haven't been able to get the crash here on any of my boxes. (My clients are 100's of miles away) Sincerely, David Phillips =========================================================== Quote:
>Thanks to all who have contributed to this thread! >I think that I have nailed down specifically what is causing the problem in >my apps. I use the Imaging for Windows OCX controls extensively. >I created a single-form exe with nothing on it but one of my OCX controls. >No code except to load it with data. This program worked fine and DID NOT >page fault on exit. >I created another single-form exe with nothing on it but the Wang ImgEdit >OCX control. No code except to load it with an image. This program DID >page fault on exit. >So... I think, at least in my case, the culprit has something to do with the >Versions of Imaging for Windows controls. You are not allowed to distribute >these files with your apps, so you must rely on the client computer having >the needed controls. Unfortunately, if you compile your app under Windows >98 which has the newer Kodak ocx's, Win 95 apps with the earlier Wang >version will not function properly... so you must compile under the Older >Wang version, and all seems well ( except for this page fault thing in 95 ). >So... that is my bed and I must now figure out how to lie in it.
>>On certain machines ( with win95 ) some of our apps >>will, without fail, present the Invalid Page Fault in Module >>Kernel32.dll I have never seen it happen on a Win98 >>or NT 4.0 machine. >> . . . . .
|
Tue, 25 Sep 2001 03:00:00 GMT |
|
 |
Sylvai #14 / 15
|
 Invalid Page Fault in Kernel32.DLL (AAaauggghhh)
Quote: >- If you compile on Win95 (original flavor) your app may crash on some Win95 >machines (what you describe below)
I never have had any of those problems (on Win95/98 but not NT). I may be lucky. Quote: >- Developers are legally prohibited from distributing the OCX's/DLL's w/out >using Wang's installation program
Yes; Check their site, and much more, I beleive you CANNOT redistribute whatever : their page said that their product is delivered on the Win95 CD, and you must ask your users that installing the imaging tool in windows is a pre-requierement to make your app work. Like for instance, many third party OCX request winsock and DialUpNetwork to be properly installed. Sylvain
|
Tue, 25 Sep 2001 03:00:00 GMT |
|
|
|