Recent

Author Topic: PTCError: Cannot recycle because it is not alredy open  (Read 280 times)

mimill

  • Newbie
  • Posts: 2
PTCError: Cannot recycle because it is not alredy open
« on: February 07, 2021, 08:59:29 pm »
I have following part of program to make DOS Graphics with fclimage. Therefore the TFPfclCanvas class.

Code: [Select]
constructor TFPfclCanvas.Create;   //TFPfclCanvas, weil eigene neu abgeleitete Klasse
begin
    inherited;
    FHashWidth := DefaultHashWidth;
    FFont := DoCreateDefaultFont;
    FPen  := DoCreateDefaultPen;
    FBrush := DoCreateDefaultBrush;
   
    FConsole:= TPTCConsoleFactory.CreateNew;
   
    FFormat := TPTCFormatFactory.CreateNew(32, $00FF0000, $0000FF00, $000000FF);
   
    FConsole.Open('Canvas',SCREENWIDTH,SCREENHEIGHT,FFormat,1);                                   //Here the debugger does stop
   
    FSurface := TPTCSurfaceFactory.CreateNew(SCREENWIDTH, SCREENHEIGHT, fformat);
end;

Now i get the EPTCError as shown in the thread title.

What is going wrong here? Why i get this error?


mimill

  • Newbie
  • Posts: 2
Re: PTCError: Cannot recycle because it is not alredy open
« Reply #1 on: February 11, 2021, 01:10:46 pm »
The error is in PTC or Freepascal 3.0.4! With Freepascal 3.0.2 PTC graphics is working!

If the PTC graphics not changed in Freepascal 3.0.4, the error is in Freepascal!


 

TinyPortal © 2005-2018