Recent

Author Topic: Program crashing with no debug info while creating a PNG on Linux/GTK2  (Read 2001 times)

mhainze

  • Newbie
  • Posts: 1
Was on Fedora 28 x86_64, tested on both stable (via .rpm) and trunk (via fpcupdeluxe) versions of Lazarus.

Sample code:
Code: Pascal  [Select][+][-]
  1.   // create thumbnail
  2.   thumb := TPortableNetworkGraphic.Create;
  3.   thumb.Width := r.Width; // r = TRect
  4.   thumb.Height := r.Height;
  5.   thumb.Canvas.AntialiasingMode := amOn;
  6.   thumb.Canvas.StretchDraw(r, orig.Graphic); // orig = loaded TPicture
  7.   thumb.SaveToFile(Target);

Unfortunately I've switched back to Windows so can't do much for replication or testing, just a heads up.  Fails on .JPG creation, too IIRC.  Stepping through shows the fail consistently (on just some files; being private files I can't provide them) at the StretchDraw operation.  This is inside of a separate thumbnailer thread.  I can StretchDraw onto a visible canvas from the main thread just fine.  Possibly related to needing a system handle?  I tried various tricks to force a handle but none solved the problem.

Also having problems with .ICO files (at least) stored as Glyphs in speedbuttons being glitched or missing.  So for some reason the graphics format parser on Linux is not at parity with Windows.

 

TinyPortal © 2005-2018