Alaska Software Inc. - GPF - anyone has experiences
Username: Password:
AuthorTopic: GPF - anyone has experiences
Hannes ZieglerGPF - anyone has experiences
on Sat, 14 Jun 2008 03:47:26 +0200
Hi All,

has anyone collected experiences with Windows GPF errors? (General 
Protection Fault).

A GPF is indicated when the Xbase++ debugger indicates an exit code 
of -1073741819 (or 0xC0000005).

I'm currently struggeling with a situation that (re)produces GPFs.

TIA,
--
Hannes
Joe Carrick Re: GPF - anyone has experiences
on Fri, 13 Jun 2008 21:21:30 -0700
Sounds like you're writing to a restricted area of memory - something 
critical to the OS.  Can you isolate the function that causes it?

I haven't seen this sort of error for several years with Xbase++, but I 
did see it when I was developing my version of the Windows File Dialog 
and had some improper values in the structure I created with BAP.  I 
didn't like the XbpFileDialog because it could return three different 
value types.  I think it still does:  cFileName, aFileNames, .F.

My version always returns and array - either empty or containing 1 or 
more file names.  IAE, once I got the correct values in the structure 
the GPF errors stopped.  Sorry that I can't tell you exactly what values 
I was using that caused it but that's the basics.

BTW, does Yukon provide anything like BaStruct, BaAccess & BaCallback ?  
I'm particularly interested in the structures needed for the File, 
Folder and Color Dialogs.  I have all three implemented using BAP and 
would like to get away from that if possible.  I'v looked at your 
example for "GetRunningProcesses()" and note that I have a similar 
function which I call "AllWindows()".  It uses some different WinAPI 
calls but requires BaCallback.

-Joe

Hannes Ziegler wrote:
> Hi All,
>
> has anyone collected experiences with Windows GPF errors? (General 
> Protection Fault).
>
> A GPF is indicated when the Xbase++ debugger indicates an exit code of 
> -1073741819 (or 0xC0000005).
>
> I'm currently struggeling with a situation that (re)produces GPFs.
>
> TIA,
> -- 
> Hannes
Hannes ZieglerRe: GPF - anyone has experiences
on Sun, 15 Jun 2008 02:07:46 +0200
Hi Joe,

> Sounds like you're writing to a restricted area of memory - something 
> critical to the OS.  Can you isolate the function that causes it?

The GPF occurs while I'm debugging. So I'm not quite sure if my 
application or _XppDbg.exe_ is the culprit.

> I haven't seen this sort of error for several years with Xbase++, but I 
> did see it when I was developing my version of the Windows File Dialog and 
> had some improper values in the structure I created with BAP.

Did you see a GPF in a DEBUG or NONDEBUG version?

> IAE, once I got the correct values in the structure the GPF errors 
> stopped.  Sorry that I can't tell you exactly what values I was using that 
> caused it but that's the basics.

Thanks for this hint. It provides valuable information I'll dig into...

> BTW, does Yukon provide anything like BaStruct, BaAccess & BaCallback ? 
> I'm particularly interested in the structures needed for the File, Folder 
> and Color Dialogs.  I have all three implemented using BAP and would like 
> to get away from that if possible.  I'v looked at your example for 
> "GetRunningProcesses()" and note that I have a similar function which I 
> call "AllWindows()".  It uses some different WinAPI calls but requires 
> BaCallback.

YUKON knows >2000 structures of the Windows platfrom SDK. The YUKON classes 
CFunction() and CStructure() replace BAP entirely, and extend BAP's 
functionality to a degree where Structures and Callback functions become 
really useful for an Xbase++ programmer.

For example:

- creating a sructure from name with the StructLoad() function,
  instead of building it with BAP step by step, member by member

- accessing structure members via symbolic names

- receiving 0-20 parameters from the OS
  in callback functions

- replacing BaCallback with a user defined class
  so that the OS calls the :exec() method of your class

Please read this page for first information:

http://www.knowlexbase.com/en/software/downloads/yukon/folderbrowser.html

This page addresses the following issues:

- calling an API function (ShBrowseForFolder)
- loading a structure into memory (BROWSEINFO)
- implementing a callback function (BrowseCallbackProc = FolderBrowser:exec)
- loading a group of #define constants into memory
  (Browse For Folder Messages = BFFM_*)

If you like, you can send your BAP code to me via private mail. I'll 
translate it to YUKON code and send it back to you. You can then play around 
with this translated code using the YUKON Demo. This should give you a good 
idea on how to use YUKON (You'll be also surprised how readable your PRG 
source code becomes when accessing Windows' functionalities with YUKON ).

Regards,
--
Hannes


> Hannes Ziegler wrote:
>> Hi All,
>>
>> has anyone collected experiences with Windows GPF errors? (General 
>> Protection Fault).
>>
>> A GPF is indicated when the Xbase++ debugger indicates an exit code 
>> of -1073741819 (or 0xC0000005).
>>
>> I'm currently struggeling with a situation that (re)produces GPFs.
>>
>> TIA,
>> -- 
>> Hannes
AUGE_OHRRe: GPF - anyone has experiences
on Sun, 15 Jun 2008 03:06:17 +0200
hi,

> has anyone collected experiences with Windows GPF errors? (General
> Protection Fault).
>
> A GPF is indicated when the Xbase++ debugger indicates an exit code
> of -1073741819 (or 0xC0000005).
>
> I'm currently struggeling with a situation that (re)produces GPFs.

i get GPF if i want to debug WMP ActiveX while it is running.
reason : protected "Debug"

... but i got a Msg about Debugger like WinICE that you can not use it.

workaround for debugging : write value which you want to debug into other
Thread

greetings by OHR
Jimmy
Hannes ZieglerRe: GPF - anyone has experiences
on Sun, 15 Jun 2008 04:07:02 +0200
Hallo Jimmy,

lass es uns auf Deutsch versuchen:

Ich bekomme einen GPF während ich meine EXE debugge. Ich weiss nicht, ob 
meine EXE oder der Xbase++ Debugger den GPF verursacht.

> ... but i got a Msg about Debugger like WinICE that you can not use it.
>
> workaround for debugging : write value which you want to debug into other
> Thread

Könntest Du das bitte näher erläutern?
Gibt es einen Debugger, der in die Tiefen eines Xbase++ Programms sehen 
kann?

Danke,
--
Hannes


"AUGE_OHR" <AUGE_OHR*AT*WEB.DE> schrieb im Newsbeitrag 
news:6191e35c$3cddeb9a$1d8@news.alaska-software.com...
> hi,
>
>> has anyone collected experiences with Windows GPF errors? (General
>> Protection Fault).
>>
>> A GPF is indicated when the Xbase++ debugger indicates an exit code
>> of -1073741819 (or 0xC0000005).
>>
>> I'm currently struggeling with a situation that (re)produces GPFs.
>
> i get GPF if i want to debug WMP ActiveX while it is running.
> reason : protected "Debug"
>
> ... but i got a Msg about Debugger like WinICE that you can not use it.
>
> workaround for debugging : write value which you want to debug into other
> Thread
>
> greetings by OHR
> Jimmy
>
>
>
AUGE_OHRRe: GPF - anyone has experiences
on Sun, 15 Jun 2008 19:21:30 +0200
hi,

> lass es uns auf Deutsch versuchen:
>
> Ich bekomme einen GPF whrend ich meine EXE debugge. Ich weiss nicht, ob 
> meine EXE oder der Xbase++ Debugger den GPF verursacht.

schon verstanden. hohe negative ErrorNo. (-1234567890)

>> ... but i got a Msg about Debugger like WinICE that you can not use it.

bekommst du keine Hinweis ?

>> workaround for debugging : write value which you want to debug into other
>> Thread
>
> Knntest Du das bitte nher erlutern?
> Gibt es einen Debugger, der in die Tiefen eines Xbase++ Programms sehen 
> kann?

der WMP ist "debug-proofed" d.h. es ist nicht mglich einen Debugger
zu benutzen wie den von Xbase++ oder WinICE / SoftICE "wenn er luft".

Nun wollte ich eigendlich nur den Inhalt von Variabeln "sehen", aber solange
WMP "luft" ging es eben nicht. Also habe ich alles in ein Array gepackt
und das an einen "pure Xbase++" Thread "bergeben" den ich nun wieder
debuggen kann wenn ich den WMP auf :Stop() stelle.

hnliches habe ich dann noch mit 2 weiteren ActiveX erlebt und gleich
die Finger von gelassen ... ohne Debugger kommt ich da nicht sehr weit.

gruss by OHR
Jimmy