Recent

Author Topic: BGRA Controls  (Read 172995 times)

circular

  • Hero Member
  • *****
  • Posts: 3703
    • Personal webpage
Re: BGRA Controls
« Reply #450 on: December 12, 2020, 06:25:55 pm »
@lucamar: that's what I am talking about
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4039
  • Leandro Diaz
Re: BGRA Controls
« Reply #451 on: February 16, 2021, 06:42:08 pm »
BGRAControls v7.2
https://github.com/bgrabitmap/bgracontrols/releases/tag/v7.2

@circular17 redundant copyright
@circular17 linking exception available as SPDX (for LGPL-3.0)
@circular17 update sprite on change
@circular17 implement AutoSize, add 180 rotation, implement Color property
@circular17 use AssignToBitmap, handle more formats
@circular17 Assign sprite to and from animated Gif
@circular17 autosize when sprite count changes, fix memory leak
@circular17 unnecessary trunc

The last fix solves the compiling issues.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

lainz

  • Hero Member
  • *****
  • Posts: 4039
  • Leandro Diaz
Re: BGRA Controls
« Reply #452 on: April 18, 2021, 10:22:19 pm »
Hi, I found a bug that produces a memory leak and closing bad the application if you use the TBGRASVGImageList.

Bug:
https://forum.lazarus.freepascal.org/index.php/topic,54216.msg402599.html#msg402599

To solve (now), try using it without design mode, create the object with code, and comment this method:

Code: Pascal  [Select][+][-]
  1. procedure TBGRASVGImageList.ReadData(Stream: TStream);
  2. var
  3.   FXMLConf: TXMLConfig;
  4. begin
  5.   FXMLConf := TXMLConfig.Create(Self);
  6.   try
  7.     Stream.Position := 0;
  8.      // COMMENT THESE LINES
  9.     {FXMLConf.LoadFromStream(Stream);
  10.     Load(FXMLConf);}
  11.   finally
  12.     FXMLConf.Free;
  13.   end;
  14. end;

Hope we can find a compatible solution with current designed forms.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

circular

  • Hero Member
  • *****
  • Posts: 3703
    • Personal webpage
Re: BGRA Controls
« Reply #453 on: April 18, 2021, 11:25:23 pm »
There is small memory leak with some XML functions, maybe that's not so important.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4039
  • Leandro Diaz
Re: BGRA Controls
« Reply #454 on: April 19, 2021, 12:24:01 am »
There is small memory leak with some XML functions, maybe that's not so important.

The problem is not the leak itself, just that the app doesn't close properly sometimes.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

lainz

  • Hero Member
  • *****
  • Posts: 4039
  • Leandro Diaz
Re: BGRA Controls
« Reply #455 on: April 19, 2021, 02:54:03 am »
There is small memory leak with some XML functions, maybe that's not so important.

Oh I see, yes you're right. The problem is that I detected the bug in an application that has an access violation when closing  :(

I think both things was related, but maybe not, and is just a memory leak.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

circular

  • Hero Member
  • *****
  • Posts: 3703
    • Personal webpage
Re: BGRA Controls
« Reply #456 on: April 19, 2021, 08:42:24 am »
Yeah. That may be unrelated.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018