

kevind7
Members-
Content Count
5 -
Joined
-
Last visited
Everything posted by kevind7
-
Runtime error 217 when launching Delphi FMX Linux 64-bit application (RAD Studio 12, Ubuntu 22.04)
kevind7 replied to dmitrybv's topic in Cross-platform
I had the same runtime error when working on a new project tested with Delphi 12 and Delphi 13 and for me it ended up being a Linux dependency that was missing. The following script helped me (thanks to ChatGPT), giving enough feedback on the startup to help track down which dependencies to focus on. For me it was one of the PostgreSQL dependencies. It was running the binary from the scratch directory where PAServer deployed it rather than directly through PAServer. #!/bin/bash # Set library path for client libraries export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH # Load environment variables from .env set -a source .env set +a echo "=== Running with strace to trace system calls ===" echo "Looking for library loading failures..." echo "" # Run with strace to see what files/libraries it's trying to open (using Delphi project name of LinuxServer) strace -e openat,open,access,stat -f ./LinuxServer 2>&1 | grep -E "(libpq|\.so|\.conf|ENOENT)" | head -100 -
Trying to track down an Access Violation in "Vcl.Imaging.pngimage" method "TChunkIHDR.PrepareImageData", calling "fillchar"
kevind7 replied to jeroenp's topic in VCL
As further update, the PNG loading is working when built as 64 bit. My original project was 32 bit only as I had a dependency that was not compatible with 64 bit. After upgrading the dependency and building 64 bit, the PNG files loaded correctly for the larger image files too. The 32 bit project still fails with the larger files. -
Trying to track down an Access Violation in "Vcl.Imaging.pngimage" method "TChunkIHDR.PrepareImageData", calling "fillchar"
kevind7 replied to jeroenp's topic in VCL
Thanks for the further direction to explore. After a reboot and retesting, it is now loading the 8MB PNG file that previously failed, so this indicates the file is OK and the code is capable of reading it. It still failed on larger (128MB) PNG that worked on the older version of Delphi. Once it fails on the larger file, it will no longer load the smaller file until the software is restarted. Searching Quality portal, it could also be related to RSP-19648 - "TPngImage does not handle WinAPI errors". As a test, I have carried out the increase of GDI Handles from 10,000 to 20,000 (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota), rebooted but this hasn't changed behaviour. There is no sign of excessive GDI Handle use before trying to load the larger file. When I have time, I'll look at reinstalling an older version and checking. -
Trying to track down an Access Violation in "Vcl.Imaging.pngimage" method "TChunkIHDR.PrepareImageData", calling "fillchar"
kevind7 replied to jeroenp's topic in VCL
Yes, that will be worth doing. I don't have an appropriate version of Delphi set up at the moment so I'll report back if I make progress on this. -
Trying to track down an Access Violation in "Vcl.Imaging.pngimage" method "TChunkIHDR.PrepareImageData", calling "fillchar"
kevind7 replied to jeroenp's topic in VCL
Confirming that I have just encountered a similar error in Delphi 10.3.1 Rio, loading a PNG image from file. It is an 8MB file. As background, I'm just updating a project that hasn't had this area of code touched for a more than a couple of years and the code and the image it was attempting to load both worked in a previous version of Delphi at that time. The code looks the same as listed from Delphi 10.1 Berlin. In line 2330 of Vcl.Imaging.pngimage, the fillchar call has the correct BytesPerRow and Height, so IHDRData is populated, but ImageData is nil. Details copied directly from IDE System._FillChar(???,???,???) Vcl.Imaging.pngimage.TChunkIHDR.PrepareImageData Vcl.Imaging.pngimage.TChunkIHDR.LoadFromStream(???,(...),13) Vcl.Imaging.pngimage.TPngImage.LoadFromStream($E2A3B58) Vcl.Graphics.TGraphic.LoadFromFile(???) Vcl.Graphics.TPicture.LoadFromFile$ActRec.$0$Body(???) Vcl.Graphics.TPicture.Load(???,TPicture.LoadFromFile$ActRec($D4EBEB0) as TPicture.TLoadProc) Vcl.Graphics.TPicture.LoadFromFile(???)