Forum > General

Runtime error 216 when lunching project1 on FreeBSD

(1/2) > >>

flax57:
Hi all

i have installed FreeBSD compiler with fpcupdeluxe (without any errors) but when compiling to x86_64 (amd64) and then lunching executable file on FreeBSD 12.2 amd64 machine i get error message :

Runtime error 216 at $00000000004124AC
  $00000000004124AC

(when i test very simple program:  writeln('hello word'); i get the same Runtime error , i have reinstall the compiler x86_64 FREEBSD but shows the same error)

(and when i compile for FreeBSD i386(32bit cpu) the executable file works fine on FreeBSD 12.2 amd64 machine)

i think this is a bug on compiler for FreeBSD (x86_64 target cpu)
i uses fpc 3.0.4 - lazarus 2.0.6

trev:
Are you sure your current FreeBSD system is 64 bit?

If so, I would uninstall what is currently installed and follow the Wiki article: Installing Lazarus on FreeBSD for an installation using the FreeBSD ports system. Note: This will install the current release versions of FPC (3.2.0) and Lazarus (2.0.10).

flax57:

--- Quote from: trev on January 24, 2021, 04:42:23 am ---Are you sure your current FreeBSD system is 64 bit?

If so, I would uninstall what is currently installed and follow the Wiki article: Installing Lazarus on FreeBSD for an installation using the FreeBSD ports system. Note: This will install the current release versions of FPC (3.2.0) and Lazarus (2.0.10).

--- End quote ---

yes FreeBSD 12.2 amd64(x86_64)

i can install just fpc compiler not to install lazarus ide, because x11 desktop not installed on this machine, and my app is a free pascal program or console utility not gtk.

and from free pascal docs (Run-time errors):

216 General Protection fault
The application tried to access invalid memory space. This can be caused by several problems:
1.Dereferencing a nil pointer.
2.Trying to access memory which is out of bounds (for example, calling move with an invalid length).

but my app is just simple free pascal program writeln('hello world'); so no nil pointer used ??!!!

MarkMLl:
I suggest that you post your code. Why is the binary called project1... what IDE/editor were you using?

In general I'd have thought that you should be able to run Lazarus, not having an X11 desktop does not mean you can't load the client libraries, and you should be able to run the system headless by tunnelling the X11 protocol over SSH.

MarkMLl

trev:

--- Quote from: flax57 on January 24, 2021, 12:41:50 pm ---i can install just fpc compiler not to install lazarus ide, because x11 desktop not installed on this machine, and my app is a free pascal program or console utility not gtk.
--- End quote ---

Your first post says your program name is "project1" (a Lazarus default) and that you're using "fpc 3.0.4 - lazarus 2.0.6".

Now you say you're using FPC and not using Lazarus.

Which is it? It's hard to help when the details you provide conflict.

Navigation

[0] Message Index

[#] Next page

Go to full version