[fpc-pascal]Runtime Error 216 (oCrt).

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Mon Jan 12 19:20:37 CET 2004

On Mon, 12 Jan 2004, Arne Hanssen wrote:

> I've installed FPC 1.9 on Linux and try to use the oCrt unit.
> It seems like my app crashes on this statement
>   TitleWin^.FWrite(2,2,TextAttr,1,'Text');
> When I try to compile and run the ocrt_demo program which is
> included with FPC, it seems to crash also on such a statement
> (its the FWrite method that fails other methods of pnWindow
> objects, like Show, are ok).
> Is this a bug, and how can I fix this?

It is a bug.  The value of 'sub' in line 875 of ocrt is nil, and this is not
checked for. However, the values given to the newwin() statement on that
line are total bogus, and they come from:
They are transnslated macros. (line 1312 of ncurses.pp). There are 2
- The fpc compiler generated wrong alignment code for the win_st struct.
- The win_st struct of ncurses has changed in newer versions of ncurses,
  and the ncurses unit doesn't have the right definition.

My guess is that it is the latter. 


More information about the fpc-pascal mailing list