EtheaDev / SVGIconImageList

Three engines to render SVG (Delphi Image32, Skia4Delphi, Direct2D wrapper) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)
Apache License 2.0
321 stars 93 forks source link

Access Violation when using with FMX and Styles #239

Closed lancerasmussen closed 1 year ago

lancerasmussen commented 2 years ago

svgImageListIssueProject.zip

Simple start to an FMX application in Delphi 11.1

Set a style to the application, connected main menu to svgiconimagelist and assigned an image to the menu item. When passing mouse over or clicking the menu item with the svg image, an A/V appears breaking into FMX.Controls.

carloBarazzetta commented 2 years ago

I did some tests, but I didn't understand the reason of the AV. I noticed that if you don't activate StyleBook1.UseStyleManager and assign the style to the form via code:

procedure TfrmMain.FormCreate(Sender: TObject);
begin
  Self.StyleBook := StyleBook1;
end;

the problem doesn't appear. For some reason the creation of the TSVGIconImageList after the style is already assigned generate some problems with the Menu component, while with other visual components I have not had any reports... Sorry but I'm not an expert of FMX, I cannot help you.

carloBarazzetta commented 2 years ago

Can I close this issue?