Solved

my pascal program has runtime error 216

Posted on 2000-03-19
3
1,494 Views
Last Modified: 2008-02-26
I wrote a pascal program that is used to store member and book of a book shop
I am now writing a procedure to save and load files in the program that use a single link list to store

There is no problem on saving to a file from the link list records
but when I load the saved file to the link list there is an runtim error 216 occur

do anybody can help me ? please give me your email address so that I can send the source code to you to have a look
0
Comment
Question by:adrianmak
3 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 50 total points
Comment Utility
Error code 216 means that there is a general protection fault.

Here's what the Pascal help says.

 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 ³ General Protection fault  ³
 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

This error results if you try to access memory that is not legal for your
application to access. The operating system halts your application and tells
you that a general protection (GP) fault occurred, but your system does not
crash.

The following practices cause GP faults:

 * Loading constant values into segment registers

 * Performing arithmetic operations on segment registers of selectors

 * Using segment registers for temporary storage

 * Writing to code segments

 * Accessing memory beyond the local address space given to your application

 * Derefencing nil pointers

I think you have to look through your code one more time, or maybe try to run it on another computer. If it works ok there, it could be something wrong with the setup on your PC.

Regards
Batalf

0
 

Author Comment

by:adrianmak
Comment Utility
I have a procedure that is open an existing file for read in

assign(memberfile,'member.txt')
reset(memberfile)

{ read(member,newnode^.id,newnode^.name);

..
..
..
..

writeln(newnode^.id,newnode^.name);



when I run the program
error 104: file not open for input

what wrong ?
0
 
LVL 47

Expert Comment

by:dbrunton
Comment Utility
That's really another question you are asking.

What I am suspecting is that you have declared memberfile to be a file of text.  In which case using reset means that you can only open the file for reading.  You are trying to write to the file hence the error.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Convertion SDK Vc++ to Delphi - fingerprint reader 5 783
Threads Delphi Programs 2 1,601
HTTP-POST Delphi 7 5 2,720
File restrict, lock. 4 210
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

14 Experts available now in Live!

Get 1:1 Help Now