digao-dalpiaz / DzHTMLText

Delphi and Lazarus HTML Label component
MIT License
194 stars 53 forks source link

Canvas not present when using FMX Frame #65

Closed LecturePress closed 2 years ago

LecturePress commented 2 years ago

Using the installed component on Delphi 10.4.2 On design-time, dropped a TDzHTMLText, with a sample text : Hello

On running the app : Exception $C0000005 with message : access violation at 0x00f90832: read of address 0x00000074, The debug show the problem at "TTokensProcess.Create"

P.S : Package installed manually

digao-dalpiaz commented 2 years ago

Hello @LecturePress ,

LecturePress commented 2 years ago

I was using the latest repo zip, on FMX framework. That bug did not occur on previous version (November 2021)

Le dim. 2 janv. 2022 à 14:45, Rodrigo Depiné Dalpiaz < @.***> a écrit :

Hello @LecturePress https://github.com/LecturePress ,

  • Are you using the last version? (3.9)
  • Are you using VCL or FMX?

— Reply to this email directly, view it on GitHub https://github.com/digao-dalpiaz/DzHTMLText/issues/65#issuecomment-1003718746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOEZA44TMMQA2GABLOBARIDUUBJI3ANCNFSM5LANWKJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

digao-dalpiaz commented 2 years ago

Ok, but the last version was released on November 2021.

I created the same app here in FMX environment, and running the app without errors.

Can you check your Library Path to ensure .DCU used by Runtime is the same as you are compiling the component ?

LecturePress commented 2 years ago

The unit (FMX.DzHTMLText.pas) is included directly in the project.

Putting the TDzHTMLText on a form in designtime, the app works fine, no problems.

But, putting the TDzHTMLText on a frame (FMX frame) in designtime, then creating that frame in the main form on runtime, the app will crash with (Exception $C0000005 at TTokensProcess.Create ...) at the moment when you call the method for creating the frame.

Here is the code used for frame creation :

MyFrame := TFrameAPP.Create(Self); MyFrame .Name := 'MyFrame' + I.ToString; MyFrame .Parent := Tab2; MyFrame .Align := TAlignLayout.Client;

digao-dalpiaz commented 2 years ago

Ok, got it. I found the bug. Fixing it now...

digao-dalpiaz commented 2 years ago

Done. New version 3.10 available!

LecturePress commented 2 years ago

It is working perfectly, Nice job