Recent

Author Topic: [FPC 3.2.4, Windows] PTC unit broken?  (Read 930 times)

Roland57

  • Hero Member
  • *****
  • Posts: 602
    • msegui.net
[FPC 3.2.4, Windows] PTC unit broken?
« on: April 07, 2026, 07:47:14 pm »
Hello everybody.

I tested today under Windows a program of mine using PTC unit. It crashes with an access violation without opening a window. I tested several programs, and even the Smoothris demo: same behaviour. I used FPC 3.2.4 64-bit.

Could someone confirm that observation?

I attach my programs.
My projects are on Codeberg.

Fred vS

  • Hero Member
  • *****
  • Posts: 3871
    • StrumPract is the musicians best friend
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #1 on: April 08, 2026, 01:23:21 am »
Hello Roland.

Tested on a Windows 11 machine, compilation using fpc 3.2.4 64 bit is ok but the apps crash at running.

Tested also compiling with fpc 3.2.4 32 bit, fpc 3.2.2 64 bit, fpc 3.2.2 32 bit, all compile ok but all crash at running.

Note that using Linux-wine, the apps run ok.

[EDIT] Tested with fpc 3.3.1 trunk 32 bit compilation OK but run not.
          And with ppcrossx64.exe 3.3.1 64 bit compilation fails:
Code: Bash  [Select][+][-]
  1.  ptc_agg_02.pas(16,3) Fatal: Can't find unit ptc used by PixelExample
  2. Fatal: Compilation aborted
« Last Edit: April 08, 2026, 02:40:52 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Roland57

  • Hero Member
  • *****
  • Posts: 602
    • msegui.net
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #2 on: April 08, 2026, 11:22:28 am »
Thank you Fred.

I made other tests on several machines. The problem seems to be specific to a Windows version.

Under Microsoft Windows [version 10.0.22631.3296], my test program works.

Under Microsoft Windows [version 10.0.26200.7462], it crashes.

My projects are on Codeberg.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12765
  • FPC developer.
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #3 on: April 08, 2026, 11:26:57 am »
here it complains about missing unit agg_2d.


cdbc

  • Hero Member
  • *****
  • Posts: 2716
    • http://www.cdbc.dk
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #4 on: April 08, 2026, 12:01:07 pm »
Hi
Quote
here it complains about missing unit agg_2d.
Here too, after a lot of fiddling with the 'LCL-AGGPas' I still can't get it to work, mind you - I'm on Linux...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Roland57

  • Hero Member
  • *****
  • Posts: 602
    • msegui.net
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #5 on: April 08, 2026, 12:03:51 pm »
here it complains about missing unit agg_2d.

Yes, I should have provided a simpler example without dependency. The agg_2D unit can be found either in Lazarus packages or in fpGUI. Please see the Makefile.

Or just remove the AGG stuff. The problem is not related to AGG.
My projects are on Codeberg.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12765
  • FPC developer.
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #6 on: April 08, 2026, 12:34:48 pm »
If I point to the lazarus "src" directory, the first demo shows some circles. The 2nd and 3rd only show a pink canvas, with a lot of flickering and mode changes (why does my secondary monitor suddenly show the desktop of the primary one?)
« Last Edit: April 08, 2026, 12:36:26 pm by marcov »

Fred vS

  • Hero Member
  • *****
  • Posts: 3871
    • StrumPract is the musicians best friend
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #7 on: April 08, 2026, 12:35:52 pm »
Hello.

Tested using gdb (and adding -gl parameter for compil) on Windows 11 and this crash (after the "run" in gdb) all the system, needs to reboot.

Code: Bash  [Select][+][-]
  1. > gdb ptc_agg_01.exe
« Last Edit: April 08, 2026, 12:42:33 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Roland57

  • Hero Member
  • *****
  • Posts: 602
    • msegui.net
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #8 on: April 08, 2026, 08:07:39 pm »
Thank you for testing Fred. Opened an issue on GitLab.

So it would be a Windows 11 problem? What is different in Windows 11?
My projects are on Codeberg.

Roland57

  • Hero Member
  • *****
  • Posts: 602
    • msegui.net
Re: [FPC 3.2.4, Windows] PTC unit broken?
« Reply #9 on: April 08, 2026, 08:17:27 pm »
If I point to the lazarus "src" directory, the first demo shows some circles. The 2nd and 3rd only show a pink canvas, with a lot of flickering and mode changes

Thank you for testing. Yes, this is what the programs do. (It's some code I wrote when I was searching how to use AGGPas with PTC.)

No flickering here (Linux).
« Last Edit: April 09, 2026, 05:21:08 am by Roland57 »
My projects are on Codeberg.

 

TinyPortal © 2005-2018