Delphi runtime error 216 at

delphi runtime error 216 at

Delphi Run-Time Errors. Go Up to Delphi Compiler Errors Index. Certain errors at run time cause Delphi programs to display an error message and terminate. The problem may occur due to that dll is on a network drive. Try to reproduce the problem on a local drive avoiding network drives, and if the. The one I encountered most is the runtime error 216 during shutdown: it is an Access Violation (EAccessViolation).

Delphi runtime error 216 at - you the

Runtime Error 216 with frxChartObject

Hello,

I have a problem with frxChartObject. When I drop a chart object component on a form/datamodule, and when I build -> run the project, it doesnt start and gives a runtime error 216 instead. No other component causes such a problem, and rest of FR4 works fine.

I tried to add ShareMem to uses clause, hoping it was some memory management/dll problem, but that didnt help.

By the way, I'm using Delphi XE with FR 4.13.1 VCL (according to frxReport component version property).

Any idea, pointers would help. Thanks.

(I hope this is right place to post my problem)

Tuncay Goncuoglu

EDIT
Additional information:

Two scenarios:
1) Create new clean project, use frxReport and frxChartObject, everything works fine.
2) Open existing project without frxChartObject (but with frxReport), everything works fine. Add frxChartObject, get runtime error 216. Then remove frxChartObject and remove frxChart unit, everything is fine again.

Is there any prerequisite that frxChartObject assumes that I should know of ? The project also uses JediVCL and ZeosLib, but not much else as components, so interference with other components is not very likely.

Symptoms

When you start Windows, Internet Explorer, or a Windows-based program, you may receive the following error message:

Runtime Error 216 at Address

Cause

This issue can occur if your computer is infected with a SubSeven Trojan virus.


To determine if your computer is infected with this virus, visit the following Web sites:

http://www.symantec.com/avcenter/venc/data/backdoor.subseven.html
http://www.europe.f-secure.com/v-descs/subseven.shtml

Resolution

To resolve this issue, run an updated antivirus program to remove the virus from your computer.

Make sure that all your infected computers are physically disconnected from the Internet and any other networks while you work to resolve this issue. For instructions about how to recover an infected computer, visit the following Carnegie Mellon Web site:

http://www.cert.org/tech_tips/win-UNIX-system_compromise.htmlMicrosoft does not provide software that can detect or remove computer viruses. If you suspect or confirm that your computer is infected with a virus, obtain current antivirus software. For a list of antivirus software manufacturers, click the following article number to see the article in the Microsoft Knowledge Base:

49500 List of Antivirus Software Vendors

More Information

For additional information about distributed denial-of-service attacks and Trojan viruses, visit the following Microsoft Web site:

http://technet.microsoft.com/en-us/library/cc722931.aspx

Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

For additional information about the "Runtime Error 216" error message, see the following article in the Microsoft Knowledge Base:

189989 Error Message: Runtime Error 216 at 00009275

The Wiert Corner – irregular stream of stuff

Since I always forget where to get the full list: there is none in the documentation. Only parts.

Usually the mapping is from run-time errors to exceptions:

In addition, exceptions are converted to run-time errors when the exception handling mechanism in the unit is not up.

This can happen early in start-up, or late un shut-down of an application.

The one I encountered most is the runtime error 216 during shutdown: it is an Access Violation (EAccessViolation).

Run-time errors (not changed since Delphi 2007)

  • [WayBack] Delphi 2007: Exceptions

    When an application uses the  unit, most runtime errors are automatically converted into exceptions. Many errors that would otherwise terminate an application – such as insufficient memory, division by zero, and general protection faults – can be caught and handled.

  • [WayBack] Delphi 2007: Delphi Runtime Errors

    Runtime errors take the form:

    Runtime error nnn at xxxxxxxx

    where is the runtime error number, and is the runtime error address.

    Applications that use the SysUtils class map most runtime errors to Exceptions, which allow your application to resolve the error without terminating.

    Delphi runtime errors are divided into the following categories:

    • I/O errors, numbered 100 through 149
    • Fatal errors, numbered 200 through 255
    • Operating system errors

     

  • [WayBack] Delphi 2007: I/O Errors

    I/O errors cause an exception to be thrown if a statement is compiled in the state. (If the application does not include the class, the exception causes the application to terminate).

    In the state, the program continues to execute, and the error is reported by the function.

    Number

    Name

    Description

    100

    Disk read error

    Reported by Read on a typed file if you attempt to read past the end of the file.

    101

    Disk write error

    Reported by CloseFile, Write, WriteIn, or Flush if the disk becomes full.

    102

    File not assigned

    Reported by Reset, Rewrite, Append, Rename, or Erase if the file variable has not been assigned a name through a call to Assign or AssignFile.

    103

    File not open

    Reported by CloseFile, Read Write, Seek, Eof, FilePos, FileSize, Flush, BlockRead, or BlockWrite if the file is not open.

    104

    File not open for input

    Reported by Read, Readln, Eof, Eoln, SeekEof, or SeekEoln on a text file if the file is not open for input.

    105

    File not open for output

    Reported by Write or Writeln on a text file if you do not generate a Console application.

    106

    Invalid numeric format

    Reported by Read or Readln if a numeric value read from a text file does not conform to the proper numeric format.

  • [WayBack] Delphi 2007: Fatal errors

    Number

    Name

    Exception

    200

    Division by zero

    EDivByZero

    201

    Range check error

    ERangeError

    202

    Stack overflow

    EStackOverflow

    203

    Heap overflow error

    EOutOfMemory

    204

    Invalid pointer operation

    EInvalidPointer

    205

    Floating point overflow

    EOverflow

    206

    Floating point underflow

    EUnderflow

    207

    Invalid floating point operation

    EInvalidOp

    210

    Abstract Method Error

    EAbstractError

    215

    Arithmetic overflow (integer only)

    EIntOverflow

    216

    Access violation

    EAccessViolation

    217

    Control-C

    EControlC

    218

    Privileged instruction

    EPrivilege

    219

    Invalid typecast

    EInvalidCast

    220

    Invalid variant typecast

    EVariantError

    221

    Invalid variant operation

    EVariantError

    222

    No variant method call dispatcher

    EVariantError

    223

    Cannot create variant array

    EVariantError

    224

    Variant does not contain array

    EVariantError

    225

    Variant array bounds error

    EVariantError

    226

    TLS initialization error

    No exception to map to.

    227

    Assertion failed

    EAssertionFailed

    228

    Interface Cast Error

    EIntfCastError

    229

    Safecall error

    ESafecallException

    230

    Unhandled exception

    No exception to map to.

    231

    Too many nested exceptions

    Up to 16 permitted.

    232

    Fatal signal raised on a non-Delphi thread

    No exception to map to.

For completeness, some DOS Borland/Turbo Pascal errors from [WayBack] where are the runtime error codes, eh? – delphi

Borland Pascal 7 runtime errors; most applicable to Delphi:
*** DOS ***
1   Invalid function number
2   File not found
3   Path not found
4   Too many open files
5   File access denied
6   Invalid file handle
12  Invalid file access code
15  Invalid drive number
16  Cannot remove current directory
17  Cannot rename across drives
18  No more files
*** I/O ***
100 Disc read error
101 Disc write error
102 File not assigned
103 File not open
104 File not open for input
105 File not open for output
106 Invalid numeric format read from file
*** CRITICAL ***
150 Write protected
151 Unknown unit/Bad drive request struct length
152 Drive not ready
153 Unknown command
154 CRC error in data
155 Bad drive request structure length
156 Disc seek error
157 Unknown media type
158 Sector not found
159 Printer out of paper
160 Device write fault
161 Device read fault
162 Hardware failure (C-DOS: file/device opened by another process)
*** FATAL ***
200 Division by zero
201 Range check
202 Stack overflow (on entry to a procedure or function)
203 Heap overflow (from New() or GetMem())
204 Invalid pointer operation (from Dispose() or FreeMem())
205 Floating point overflow
206 Floating point underflow
207 Invalid floating point operation
208 Overlay manager not installed (usually when calling OvrInit)
209 Overlay file read error
210 Object not initialized
211 Call to abstract method
212 Stream registration error
213 Collection index out of range
214 Collection overflow error
215 Arithmetic overflow error
216 General Protection fault

The run-time error 216

Delphi Runtime error 216 thrown in SysUtils.FinaliseUnits, line number not in mapfile

2021-6-20 anglehua

I have a random Runtime Error 216 that appears on application close.

I have debugged as far as I can and the error is thrown in SysUtils.FinalizeUnits.

I have gone over the code and ensure all created objects are freed.

The number on the runtime error, 0040054A, is not present in the mapfile. Do you know what this means?

Can anyone tell me how to find out what is throwing the error?


I'd suspect a memory leak (all Runtime Errors 216 I've encountered so far were) and use a profiler (visual inspection is never as good as a tool). Since you're using Delphi XE, you should give AQTime a try (it's included), see also

Delphi - Check if memory is being released "on time"

Kind regards, Frank



This is VERY OLD Delphi problem - wrong exception handling in unit initialization/finalization process.

The problem easy to reproduce - just make any program error/exception (division by zero for instance) in initialization block of any unit. The exception will be created correctly. But then, before the exception rise, the unit finalization process destroy the exception object. And thus, when the exception object accessed, the "runtime error 216" occured.



采集自互联网,如有侵权请联系本人

you are welcome.
Are you sure the error is raised on fStartupHook.UnHook(fStartupHookToken), and not on Shutdown(fToken)?
In any case, I think the problem could be related to gdi objects not released before the TGDIPlus.Destroy
Shutdown procedure must be called only after all gdi objects are released...
Try to place a breakpoint in TPrintPreview.Destroy, TThumbnailPreview.Destroy and TPaperPreview.Destroy and see if the runtime error is raised before the destroy of you "Print Preview" component.
If it does not release all gdi objects before destruction it could bring to this kind of problems.

I have taken a brief look into preview.pas and I see it has its own gdiplus support.. maybe the problem is a conflict between the two.
In preview.pas, I would check also TGDIPlusSubset.Create and _gdiPlus.Free in finalization (TGDIPlusSubset.Destroy)

Finally..
I'm still using Delphi 2007 so, I'm not sure about that, but I have read here that in XE2 the calls to “GdiplusStartup” and “GdiplusShutdown” are only performed if not IsLibrary is True to avoid hangs in shutdown..

Last edited by MtwStark (2018-03-29 08:43:28)

DLL headaches - runtime error 216, 217 - solved!

Dave Lively's profile photo

Dave Lively

unread,
Feb 25, 1998, 12:00:00 PM2/25/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to


For anyone who may get a problem similiar to this in the future..

I had a DLL that suddenly stopped working. Effects were that on free, I
received a series of error messages:

EInvalidPointer msg = 'Invalid Pointer Operation';
Runtime Error 217 -
This is described as an EControlC exception in HELP, as in someone
pressed Ctrl+c to terminate a console app. This wasn't a console app and
I certainly didn't hit Ctrl+c.
Runtime Error 216 - EAccessViolation

I got runtime error 216 repeatedly until terminating the task via the NT
process list or Delphi.

Solution: Create a new project of the same name and add all your units
to it. Apparantly one of the project files was corrupt. ARGHRHAHRHGGH!!!
*******************************************************************
BORLAND: Checksum routines are EASY to write and implement; how about
sometime of corruption check on save/load in Delphi 4? I lost a week on
this problem.

Dave


--
~~~~~~~~~~~~~~~~~~
Dave Lively
Keil Software
** Opinions stated are not necessarily that of Keil Software.

Krasimir Stoyanov's profile photo

Krasimir Stoyanov

unread,
Feb 25, 1998, 12:00:00 PM2/25/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to


Dave Lively wrote:

> Solution: Create a new project of the same name and add all your units
> to it. Apparantly one of the project files was corrupt. ARGHRHAHRHGGH!!!

Have you tried Build All?

Regards,
Krasimir Stoyanov

Dave Lively's profile photo

Dave Lively

unread,
Feb 25, 1998, 12:00:00 PM2/25/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

I think I broke my build-all button rebuilding. Yes, I rebuilt it. It's
solved now; believe me, I tried *everything*. But the new project file
only took about a minute to put together and everything started working
correctly.

Wierd, but it's over. =)

Jeff Kohler's profile photo

Jeff Kohler

unread,
Feb 26, 1998, 12:00:00 PM2/26/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]


I had problem with the exact same solution. In Delphi 2.0, a
symbol remained in the symbol table even though it was absolutely
no where in the source code!

Creating a new project and rebuilding killed the bug. I've never
encountered the problem again.

I'll second your advice: when you are perplexed about something
you believe is in the tool and not your code, create a new
project from scratch in a different folder!

Dave Lively's profile photo

Dave Lively

unread,
Feb 27, 1998, 12:00:00 PM2/27/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

=)

The thing that "bugs" me most about this is that Delphi never gave any
hint that there was something wrong with the project file set; even the
mysterious "Stream read error" would've been helpful.

I love Delphi, but now that it's a third-generation compiler (built on a
4th generation compiler - BC++), I think some error-checking is in
order. A checksum/CRC routine for binary data would be fantastic; hell,
I'll write the damn thing and send it along if necessary.

BTW - this brings a new thought to mind. Anybody know if it's possible
to write a plug-in for Delphi that would perform this kind of error
detection/correction? I'd pay for that.

Just a thought for those that have more time than me.. =)

D

Krasimir Stoyanov's profile photo

Krasimir Stoyanov

unread,
Feb 27, 1998, 12:00:00 PM2/27/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to


Dave,

You know that the project itself is a source file - nothing hidden, nothing
binary.
As a solution for such problems deleting of the Delphi generated binary files
with the name same as the project name (*.res, *.dof ..... ) should be enough.
Deleting of the *.dcu files also is recommended.
After all these binaries deleted you will have only Pascal source code and *.dfm
files.
Restarting Delphi and Windows and reopening the project will be the last step.
No need to recreate the project.
I have had such problems and the above steps were the solution.

Regards,
Krasimir Stoyanov

Dave Lively's profile photo

Dave Lively

unread,
Feb 27, 1998, 12:00:00 PM2/27/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Well, ya know, you'd think so, wouldn't ya?

I tried all of that - no dice. The only thing that fixed the problem was
*recreating* the project.

[

I have a random Runtime Error 216 that appears on application close.

I have debugged as far as I can and the error is thrown in SysUtils.FinalizeUnits.

I have gone over the code and ensure all created objects are freed.

The number on the runtime error, 0040054A, is not present in the mapfile. Do you know what this means?

Can anyone tell me how to find out what is throwing the error?

,

This is VERY OLD Delphi problem – wrong exception handling in unit initialization/finalization process.

The problem easy to reproduce – just make any program error/exception (division by zero for instance) in initialization block of any unit. The exception will be created correctly. But then, before the exception rise, the unit finalization process destroy the exception object. And thus, when the exception object accessed, the “runtime error 216” occured.

,

I’d suspect a memory leak (all Runtime Errors 216 I’ve encountered so far were) and use a profiler (visual inspection is never as good as a tool). Since you’re using Delphi XE, you should give AQTime a try (it’s included), see also

Delphi – Check if memory is being released “on time”

Kind regards, Frank

,

Since runtime error 216 is an access violation, this may indicate that you’re attempting to use something that you’ve already freed.

Addresses in the map file are based at 0, but that’s not where your EXE file gets loaded into memory. Your EXE gets loaded at its preferred base address, which is usually $400000. Subtract that from the address you have. The address you’re looking for in the map file is $0000054a.

,

There was a similar question, Read:
How to debug a crash that only occurs on application shutdown? (Delphi)

Consider using Memory profiler, this may help identifying live objects after app was terminitated.

,

I suggest you try the FastMM Full Debug Mode, and either statically link that into your app, or use it as a package (if your app uses packages).

,

You can use the method I used to fix mine.

I commented out the main program, and added code back until it failed.

Turns out that it did not want me to call couninitialize at all. Did not throw an error at the time, but failed after program termination with a 216. Removing the offending statement fixed it.

Since this was maybe 6 statements before end. statement, I don’t imagine it will matter.

This method is easy if you are consistent about using // for comments. I moved IO statements that needed curly brackets to a procedure.

,

On Microsoft’s oficial web site it is mentioned that, this issue can occur if your computer is infected with a SubSeven Trojan virus.

Antivirus software and windows registry cleaner should help.

]

Categories Codes

you are welcome.
Are you sure the error is raised on fStartupHook.UnHook(fStartupHookToken), and not on Shutdown(fToken)?
In any case, I think the problem could be related to gdi objects not released before the TGDIPlus.Destroy
Shutdown procedure must be called only after all gdi objects are released.
Try to place a breakpoint in TPrintPreview.Destroy, TThumbnailPreview.Destroy and TPaperPreview.Destroy and see if the runtime error is raised before the destroy of you "Print Preview" component.
If it does not release all gdi objects before destruction it could bring to this kind of problems.

I have taken a brief look into preview.pas and Delphi runtime error 216 at see it has its own gdiplus support. maybe the problem is a conflict error field tringhas incomplete type the two.
In preview.pas, I would check also TGDIPlusSubset.Create and _gdiPlus.Free in finalization (TGDIPlusSubset.Destroy)

Finally.
I'm still using Delphi 2007 so, I'm not sure about that, but I have read here that in XE2 the calls to “GdiplusStartup” and “GdiplusShutdown” are only performed if not IsLibrary is True to avoid hangs in shutdown.

Last edited by MtwStark (2018-03-29 08:43:28)

Symptoms

When you start Windows, Internet Explorer, or a Windows-based program, you may receive the following error message:

Runtime Error 216 at Address

Cause

This issue can occur if your computer is infected with a SubSeven Trojan virus.


To determine if your computer is infected with this virus, visit the following Web sites:

http://www.symantec.com/avcenter/venc/data/backdoor.subseven.html
http://www.europe.f-secure.com/v-descs/subseven.shtml

Resolution

To resolve this issue, run an updated antivirus program to remove the virus from your computer.

Make sure that all your infected computers are physically disconnected from the Internet and any other networks while you work to resolve this issue. For instructions about how to recover an infected computer, visit the following Carnegie Mellon Web site:

http://www.cert.org/tech_tips/win-UNIX-system_compromise.htmlMicrosoft does not provide software that can detect or remove computer viruses. If you suspect or confirm that your computer is infected with a virus, obtain current antivirus software. For a list of antivirus software manufacturers, click the following article number to see the article in the Microsoft Knowledge Base:

49500 List of Antivirus Software Vendors

More Information

For additional information about distributed denial-of-service attacks and Trojan viruses, visit the following Microsoft Web site:

http://technet.microsoft.com/en-us/library/cc722931.aspx

Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

For additional information about the "Runtime Error 216" error message, see the following article in the Microsoft Knowledge Base:

189989 Error Message: Runtime Error 216 at 00009275

The Wiert Corner – irregular stream of stuff

Since I always forget where to get the full list: there is none in the documentation. Only parts.

Usually the mapping is from run-time errors to exceptions:

In addition, delphi runtime error 216 at, exceptions are converted to run-time errors when the exception handling mechanism in the unit is not up.

This can happen early in start-up, or late un shut-down of an application.

The one I encountered most is the runtime error 216 during shutdown: it is an Access Violation (EAccessViolation).

Run-time errors (not changed since Delphi 2007)

  • [WayBack] Delphi 2007: Exceptions

    When an application uses the  unit, most runtime errors are automatically converted into exceptions. Many errors that would otherwise terminate an application – such as insufficient memory, division by zero, and general protection faults – can be caught and handled.

  • [WayBack] Delphi 2007: Delphi Runtime Errors

    Runtime errors take the form:

    Runtime error nnn at xxxxxxxx

    where is delphi runtime error 216 at runtime error number, and is the runtime error address.

    Applications that use the SysUtils class map most runtime errors to Exceptions, which allow your application to resolve the error without terminating.

    Delphi runtime errors fdisk runtime error r6003 divided into the following categories:

    • I/O errors, numbered 100 through 149
    • Fatal errors, numbered 200 through 255
    • Operating system errors

     

  • [WayBack] Delphi 2007: I/O Errors

    I/O errors cause an exception to be thrown if a statement is compiled in the state. (If the application does not include the class, the exception causes the application to terminate).

    In the state, the program continues to execute, and the error is reported by the function.

    Number

    Name

    Description

    100

    Disk read error

    Reported by Read on a typed file if you attempt to read past the end of the file.

    101

    Disk write error

    Reported by CloseFile, Write, WriteIn, or Flush if the disk becomes full.

    102

    File not assigned

    Reported by Reset, Rewrite, Append, Rename, or Erase if the file variable has not been assigned a name through a call to Assign or AssignFile.

    103

    File not open

    Reported by CloseFile, Read Write, Seek, Eof, FilePos, FileSize, Flush, BlockRead, or BlockWrite if the file is not open.

    104

    File not open for input

    Reported by Read, Readln, Eof, Eoln, delphi runtime error 216 at, SeekEof, or SeekEoln on a text file if the file is not open for input.

    105

    File not open for output

    Reported by Write or Writeln on a text file if you do not generate a Console application.

    106

    Invalid numeric format

    Reported by Read or Readln if a numeric value read from a text file does not conform to the proper numeric format.

  • [WayBack] Delphi 2007: Fatal errors

    Number

    Name

    Exception

    200

    Division by zero

    EDivByZero

    201

    Range check error

    ERangeError

    202

    Stack overflow

    EStackOverflow

    203

    Heap overflow error

    EOutOfMemory

    204

    Invalid pointer operation

    EInvalidPointer

    205

    Floating point overflow

    EOverflow

    206

    Floating point underflow

    EUnderflow

    207

    Invalid floating point operation

    EInvalidOp

    210

    Abstract Method Error

    EAbstractError

    215

    Arithmetic overflow (integer only)

    EIntOverflow

    216

    Access violation

    EAccessViolation

    217

    Control-C

    EControlC

    218

    Privileged instruction

    EPrivilege

    219

    Invalid typecast

    EInvalidCast

    220

    Invalid variant typecast

    EVariantError

    221

    Invalid variant operation

    EVariantError

    222

    No variant method call dispatcher

    EVariantError

    223

    Cannot create variant array

    EVariantError

    224

    Variant does not contain array

    EVariantError

    225

    Variant array bounds error

    EVariantError

    226

    TLS initialization error

    No exception to map to.

    227

    Assertion failed

    EAssertionFailed

    228

    Interface Cast Error

    EIntfCastError

    229

    Safecall error

    ESafecallException

    230

    Unhandled exception

    No exception to map to.

    231

    Too many nested exceptions

    Up to 16 permitted.

    232

    Fatal signal raised on a non-Delphi thread

    No exception to map to.

For completeness, some DOS Borland/Turbo Pascal errors from [WayBack] where are the runtime error codes, eh? – delphi

Borland Pascal 7 runtime errors; most applicable to Delphi:
*** DOS ***
1   Invalid function number
2   File not found
3   Path not found
4   Too many open files
5   File access denied
6   Invalid file handle
12  Invalid file access code
15  Invalid drive number
16  Cannot remove current directory
17  Cannot rename across drives
18  No more files
*** I/O ***
100 Disc read error
101 Disc write error
102 File not assigned
103 File not open
104 File not open for input
105 File not open for output
106 Invalid numeric format read from file
*** CRITICAL ***
150 Write protected
151 Unknown unit/Bad drive request struct length
152 Drive not ready
153 Unknown command
154 CRC error in data
155 Bad drive request structure length
156 Disc seek error
157 Unknown media type
158 Sector not found
159 Printer out of paper
160 Device write fault
161 Device read fault
162 Hardware failure (C-DOS: file/device opened by another process)
*** FATAL ***
200 Division by zero
201 Range check
202 Stack overflow (on entry to a procedure or function)
203 Heap overflow (from New() or GetMem())
204 Invalid pointer operation (from Dispose() or FreeMem())
205 Floating point overflow
206 Floating point underflow
207 Invalid floating point operation
208 Overlay manager not installed (usually when calling OvrInit)
209 Overlay file read error
210 Object not initialized
211 Call to abstract method
212 Stream registration error
213 Collection index out of range
214 Collection overflow error
215 Arithmetic overflow error
216 General Protection fault

The run-time error 216

Runtime Error 216 with frxChartObject

Hello,

I have a problem with frxChartObject. When I drop a chart object component on a form/datamodule, and when I build -> run the project, it doesnt start and gives a runtime error 216 instead. No other component causes such a problem, and rest of FR4 works fine.

I tried to add ShareMem to uses clause, hoping it was some memory management/dll problem, but that didnt help.

By the way, I'm using Delphi XE with FR 4.13.1 VCL (according to frxReport component version property).

Any idea, pointers would help. Thanks.

(I hope this is right place to post my problem)

Tuncay Goncuoglu

EDIT
Additional information:

Two scenarios:
1) Create new clean project, use frxReport and frxChartObject, everything works fine.
2) Open existing project without frxChartObject (but with frxReport), everything works fine. Add frxChartObject, get runtime error 216. Then remove frxChartObject and remove frxChart unit, everything is fine again.

Is there any prerequisite that frxChartObject assumes that I should know of delphi runtime error 216 at The project also uses JediVCL and ZeosLib, but not much else as components, so interference with other components is not very likely.

[

I have a random Runtime Error 216 that appears on application close.

I have debugged as far as I can and the error is thrown in SysUtils.FinalizeUnits.

I have gone over the code and ensure all created objects are freed.

The number on the runtime error, 0040054A, is not present in the mapfile. Do you know what this means?

Can anyone tell me how to find out what is throwing the error?

,

This is VERY OLD Delphi problem – wrong exception handling in unit initialization/finalization process.

The problem easy to reproduce – just make any program delphi runtime error 216 at (division by zero for instance) in initialization block of any unit. The exception will be created correctly. But then, before the exception rise, the unit finalization process destroy the exception object. And thus, when the exception object accessed, the “runtime error 216” occured.

,

I’d suspect a memory leak (all Runtime Errors 216 I’ve encountered so far were) and use a profiler (visual inspection is never as good as a tool). Since you’re using Delphi XE, you should give AQTime a try (it’s included), see also

Delphi – Check if memory is being released “on time”

Kind regards, Frank

,

Since runtime error 216 is an access violation, delphi runtime error 216 at, this may indicate that you’re attempting to use something that delphi runtime error 216 at already freed.

Addresses in the map file are based at 0, but that’s not where your EXE file gets loaded into memory. Your EXE gets loaded at its preferred base address, which is usually $400000. Subtract that from the address you have. The address you’re looking for in the map file is $0000054a.

,

There was a similar question, Read:
How to debug a crash that only occurs on application shutdown? (Delphi)

Consider using Memory profiler, this may help identifying live objects after app was terminitated.

,

I suggest you try the FastMM Full Debug Mode, and either statically link that into your app, or use it as a package (if your app uses packages).

,

You can use the method I used to fix mine.

I commented out the main program, and added code back until it failed.

Turns out that it did not want me to call couninitialize at all. Did not throw an error at the time, but failed delphi runtime error 216 at program termination with a 216. Removing the offending statement fixed it.

Since this was maybe 6 statements before end. statement, I don’t imagine it will matter.

This method is easy if you are consistent about using // for comments. I moved IO statements that needed curly brackets to a procedure.

,

On Microsoft’s oficial web site it is mentioned that, this issue can occur if your computer is infected with a SubSeven Trojan virus.

Antivirus software and windows registry cleaner should help.

]

Categories Codes

Dear Delphi runtime error 216 at [cross-posted to www.nldelphi.com]

I'm troubled by an annoying but otherwise harmless run-time error 216 that my application generates on closing. The source code is too long to post, and I am unable to locate the code that causes the error, so I will try to just give a short description of the program:

- DB application, uses MS Access and Delphi built-in data aware components and own db-aware components. One of these (the only 'non-cosmetic' descendant) is a data-aware twebbrowser descendant.
- Uses subforms by docking other forms into the mainform
- Uses gsapi (ghostscript dll) and wingraphvi (com component).
- Uses interfaces for most interobject communication

The vague thing is that the error seems to disappear and reappear as I continue to work on the application, even if I add or remove things that seem completely unrelated. However, if the error occurs restarting the application never changes that. The only thing that seems to have effect is not connecting to the access database, which (usually) causes the error not to appear. I am using a win2k machine with D6 and D7 installed, both versions generate the error.

The nasty thing is that if I trace my closing code (even with the VCL components in the search path) the error seems to occur *after* the last line of code, which is de finalization of ADODB. It traces through the whole Form.DoneApplication down to the last 'end;', then into ADODB, delphi runtime error 216 at. After hitting f7 on the last 'end;' there, it gives an Access Violation followed by a Runtime Error if I hit f7 again.

Most forums on the Net seem to hint that I might be trying to free an object that the VCL will want to free later, or free an object multiple times. However, commenting out all lines that free objects (except for the obvious StringLists, Inifiles etc.) does not solve the problem. Freeing or not freeing my datamodule also does not seem to do anyting. Actually, commenting out my entire 'onclose' code does not seem to change anything at all, delphi runtime error 216 at.

<edit> Since I suspected my own data-aware web browser (the only component not previuosly used in applications) I removed it from the form it was in. This did not change anythign </edit>

I realize that similar questions have been asked before, but I could not retigo digital 611 si error 40 any hints on these threads that solved my problem, delphi runtime error 216 at. I hope anybody can help me out here.

Kind regards,

Wouter van Atteveldt

Delphi Runtime error 216 thrown in SysUtils.FinaliseUnits, line number not in mapfile

2021-6-20 anglehua

I have a random Runtime Error 216 that appears on application close.

I have debugged as far as I can and the error is thrown in SysUtils.FinalizeUnits.

I have gone over the code and ensure all created objects are freed.

The number on the runtime error, 0040054A, is not present in the mapfile. Do you know what this means?

Can anyone tell me how to find out what is throwing the error?


I'd suspect a memory leak error column does not exist postgresql Runtime Errors 216 I've encountered so far were) and use a profiler (visual inspection is never as good as a tool). Since you're using Delphi XE, you should give AQTime a try (it's included), see also

Delphi - Check if memory is being released "on time"

Kind regards, Frank



This is VERY OLD Delphi problem - wrong exception handling in unit initialization/finalization process.

The problem easy to reproduce - counter terrorist win mp3 make any program error/exception (division by zero for instance) in initialization block of any unit. The exception will be created correctly. But then, before the exception rise, the unit finalization process destroy the exception object. And thus, when the exception object accessed, the "runtime error 216" occured.



采集自互联网,如有侵权请联系本人

Related Videos

Error 216 - Runtime Error At 747BB382

0 Comments

Leave a Comment