Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another GPV question 2

Status
Not open for further replies.

CleoMan

Programmer
Jun 18, 2003
110
ZA
I am sorry for asking this question, but i have looked through previous posts,FAQ's and other forums.

Can someone please explain why General Protection Violation errors occur? I get this problem when i open or print certain reports. This only happens when our program runs in WIndows XP, but it works fine in Win98.

I have checked for stylesheets and filters on my reports, but there are none to my knowledge.

I know this topic has been covered over and over again, but any help is greatly appreciated.

Richard
 
Sometimes I have been able to isolate report related GPFs to Data problems. Usually it only happens when there is a memo field involved. The culprit is always a stray tab or other strange (usually invisible) control character in the data. Typically, I've traced the occurence to a user cutting an pasting text from a word processor.

Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
Richard,

A GPV violation is a standard Windows error that appears when a program tries to refer to an object or a variable that is no longer defined or available in memory. Usually, it's a mistake by the programmer.

There are several causes, many of which should be handled by Paradox. Unfortunately, not all of these issues are handled by Paradox and older versions tend to raise more of these than more recent versions of the product.

Some of these can be avoided, however, not all can. The most common causes I've seen include:

1) Opening forms with stylesheet problems (which you've checked).

2) Opening forms (or reports) containing saved filters or ranges.

To check for this:

1. Open the document in Design mode.
2. Choose Format | Filter.
3. Clear any values that appear in the Filter on Fields panel.
4. Click the Range button.
5. Remove any values that appear in the Field Values panel.
6. Choose OK to close the Range dialog.
7. Choose OK to close the Format Filter dialog.
8. Save the document.
9. Close the document and try to open it again.

3) Opening documents containing corrupted tables and/or indexes (especially linking indexes). Utilities | Table Repair to verify every table in a document's data model. Rebuild as needed.

IMPORTANT: Be sure to verify any tables references by the table(s)'s properties, such as table lookups and referential integrity members.

You can't detect corrupt indexes; you can only delete all indexes and then re-create them manually.

Note that the document must be closed before its tables can be verifies or rebuilt.

4. Starting Paradox when documents containing corrupted tables and/or indexes. In this case, you can usually start Paradox by adding the -nec command-line parameters to the shortcut. See for a description of these options.

There are a number of other situations. When you get a GPV error, look for a Details button and click it for the complete error message, which usually includes a memory address and the name of the module that triggered the error. The memory address is periodically useful, but not always. More useful is the name of the module.

If you continue to receive these errors, please try to determine the name of the module raising the error. That may help us figure out the actual problem.

Hope this helps...

-- Lance
 
I checked for filters and ranges and they all seem fine. Also i could not find any index/table corruption problems. I also rebuilded all the tables.

But the GPV only occurs after the report is opend and you want to go to the next page, and it only happens on machines that run winXP. This error never occurs in Win98...

Any ideas?

As always gratefull
Richard

PS: No module name or memory address is given, I only receive msgStop box telling me to abort/OK/Cancel

 
I now have a similar problem on newer PCs with XP Pro. I'm beginning to think it is related to the operating system version. I will investigate and compare the builds between the XP Pro PCs that work and those that don't. It is a very frustrating problem.

Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
Hm. Here are some other possible ideas:

1. Verify you're using the latest available printer driver for your version of Windows. Depending on the printer (and driver) you're using, this may be available from the printer's property sheet.

To check the driver's version number:

1.1 Choose Control Panel | Printers and Faxes from the Windows Start menu.

1.2 When the list of installed printers appears, right-click the one you're using and then choose Properties.

1.3. At this point, you'll need to hunt around. Some drivers include a tab (or a button) for driver details. Many of this list the driver's version number.

1.4 If you can't find the driver version on the property sheet, print a text page. The standard Printer Test Page usually contains the driver details.

1.5 Refer to the printer vendor's web site to see if there's a later driver available.

2. If the driver is up to date, try deleting your driver and then restart Windows. This should place a new entry for your Printer into the Printers applet.

3. Random GPV's can also be caused by currupted .VAL files. See if any tables in your report's data model shave .VAL files. Delete them manually and then recreate them.

4. Verify the Application Compatibility properties (see for details).

5. Verify that you have a TEMP directory defined (run CMD.EXE, type set, and then make certain there's a TEMP variable defined.

If there's no TEMP variable, modify (or create) an AUTOEXEC.BAT file that defined TEMP as your WINDOWS\TEMP directory.

If there is a TEMP variable, make certain there's at least 2MB of space available on that drive. (Also, you might need to clean it out.)

Let's see, that's about all I can recall at the moment. I'll root around some more and see if I can find anything more relevant.

Hope this helps...

-- Lance
 
Alright, I'll try all of these today. Will be posting if it still gives the error.

Thanks for all the help so far.

Richard
 
Nope, I tried every thing i (and the others)could think of, but still no luck.

To make it even stranger, certain reports work fine and others dont and there is no real significance between them!!

This must be some kind of WinXP specific problem.

Anyway, I am at a dead end.. so thx for all the help, but if anyone still has any ideas, i would appreciate them, if not, thanks anyway.

Richard
 
Richard,

If you'd care to bundle the files together into a ZIP file and email them to the address shown on my profile, I'll take a look at them and see if the problem occurs on my home machines.

That's about the only alternative I can think of at this point.

If you choose to do this, please include the version number reported in your Paradox Help | About dialog, so I can try to use the same version here.

-- Lance
 
I seem to have found the problem! This sounds weird but it works..

The problem seem to be with the labels fields in the Records/details part of the report. Every label consists of 2 parts.

1. The edit region which shows the values in your table.
2. The text region which displays a custom text message.

No for every label I had cleared the text region to be blank, this is what seemed to cuase the problem. If the text region had a BLANK value in it's text property the GPV occured. I simply had to put in a value (blank space) in the text property and this seemed to solve the problem.

NOTE: This should be done to all label fields in group header and footers as well.

Well there you go, who would have thought that could be the problem.

Dont know why XP has a problem with this, but at least I now know how to solve it.

Thanks for all the help
Richard
 
Great work Richard. I dub you the Sherlock Holmes of Paradox GPVs. I'll let you know if that solves my problem too. I usually use edit fields instead of labeled ones, but I'm going to check my reports immediately.

Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
Well, my problem was linked to XP and was not the labelling issue at all. Apparently (and due to an oversight) the newer PCs did not have all of the latest Windows XP service packs/updates applied. Once we applied said updates the Pdox app worked fine. We found this consistantly solved the problem on all 6 laptops that were generating GPVs when Paradox9 reports were run.

Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
The XP machines we had the problems on had the latest service pack installed and still the error continued. But since i changed the fields in the reports, they are still running fine :)

But I'm glad to hear everything is working fine on that side as well.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top