Jump to content

kevind7

Members
  • Content Count

    4
  • Joined

  • Last visited

Posts posted by kevind7


  1. 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.


  2. 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(???)

     

×