Jump to content

kevind7

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio
  1. 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.
  2. 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.
  3. 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.
  4. 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(???)
×