Access violation in OnHintTimer for Floating Button in Win64 binary

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #58059
    HeDiBo
    Participant

    Redefining the hint timer as this:

    Code:
    TsTimer = class(TTimer)
    protected
    FOwner: TObject;
    end{class};

    and making the appropriate adjustments in TacFloatBtn.pas, replacing the use of the Tag property with the FOwner property will do the trick.

    The same problem could arise in procedure TsSkinProvider.StartHintTimer(TitleItem: TacTitleBarItem);

    #58069
    Support
    Keymaster

    Thank you for researching, I will check it soon.

    #58077
    Support
    Keymaster

    Hello!

    Can you help me to repeat this error in the test-application? Is it possible?

    #58078
    HeDiBo
    Participant
    'Support' wrote:

    Hello!

    Can you help me to repeat this error in the test-application? Is it possible?

    Your code uses a Tag (which is a NativeInt) as a pointer to a TObject (which is 64 bits Word in the Win64 binary).

    That's what's wrong, I think.

    But my problem is only reproducable if the object resides at an address that requires more than 63 bits and has the sign set.

    By the way, my solution works, I implemented it in the appropriate places in AC and got rid of the problem.

    #58079
    Support
    Keymaster

    You are right, I will change it in the nearest release.

    #58094
    HeDiBo
    Participant
    'Support' wrote:

    You are right, I will change it in the nearest release.

    The sSkinProvider module has the same problem:

    Code:
    procedure TsSkinProvider.OnHintTimer(Sender: TObject);
    begin
    if (FHintTimer nil) and (FHintTimer.Tag 0) then begin
    FHintTimer.Enabled := False;
    if PtInRect(FHintRect, acMousePos) then
    ShowHintWnd(TacTitleBarItem(FHintTimer.Tag)); // This causes trouble
    end;
    end;

    Making a similar change as in TacFloatBtn, solved this problem too.

    #58117
    Support
    Keymaster

    This code will be changed in the nearest release, also.

    #58172
    HeDiBo
    Participant
    'Support' wrote:

    This code will be changed in the nearest release, also.

    Problem solved in AC 13.17a7.gif

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.