Forum Replies Created
-
AuthorPosts
-
January 28, 2020 at 6:07 pm in reply to: AC 15.00 Memory corruption in combi button animation and dynamic skin switching. #68344HeDiBoParticipant
I can add to this:
Any control that causes a click animation will throw an exception on the next click on another control!!!Not only on this particular frame, but on any frame in my project.
January 28, 2020 at 5:54 pm in reply to: AC 15.00 Memory corruption in combi button animation and dynamic skin switching. #68342HeDiBoParticipantI have some added info.
The problem occurs when changing the skin after a click on any control with special click animation. (SkinManager.AnimEffects.Buttons.beCklick = True)- This reply was modified 4 years, 10 months ago by HeDiBo.
HeDiBoParticipantThe WM_MOUSEMOVE message is more handy for that. We should check position of the mouse after each moving.
WM_MOUSEHOVER can’t do that.Both have the cursor position in the lParam parameter. But WM_MOUSEHOVER only occurs once at the right time. Maybe I don’t get your point.
January 28, 2020 at 3:24 pm in reply to: AC 15.00 Memory corruption in combi button animation and dynamic skin switching. #68340HeDiBoParticipantThe problem seems to stem from the use of an acThdTimer.TacThreadedTimer.Timer where it was already freed.
The timer was used in [acAnimation.DoClickAnimation][516].
According to the FastMM Trace it was freed in [acThdTimer.TacThreadedTimer.Timer][381], but I don’t see a free of a timer there.The code to select a skin is:
procedure TfrSettings.lvSkinsSelectItem( Sender: TObject; Item: TListItem; Selected: Boolean ); begin if Selected and ( not MySelection ) and ( dmWIP4.sSkinManager.SkinName <> Item.Caption ) then begin dmWIP4.sSkinManager.SkinName := Item.Caption; end{if}; end;
The code to fill the lvSkins ListView is:
procedure TfrSettings.SetupSkinsView; var i: Integer; li: TListItem; begin with dmWIP4 do begin lvSkins.Items.BeginUpdate; Try lvSkins.Clear; lvSkins.Visible := sSkinManager.Active; gbSamples.Visible := lvSkins.Visible; if lvSkins.Visible then begin lvSkins.SortType := stText; // Show in skin name sequence lvSkins.LargeImages := SkinImages; for i := 0 to SkinNames.Count-1 do begin li := lvSkins.Items.Add; li.Caption := SkinNames; li.ImageIndex := i; end{for}; end{if}; Finally lvSkins.Items.EndUpdate; end{try}; end{with}; end;
the code to fill skinnames and skin images is:
SkinImages: TCustomImageList; SkinNames: TStringList; . . procedure TdmWIP4.LoadInternalSkins(sl: TacStringList; WithImages: Boolean ); var ski: TacSkinListData; begin if Assigned(sSkinManager.SkinListController) then with sSkinManager.SkinListController do begin if WithImages then begin SkinManagerFreeImages; SkinImages := TCustomImageList.Create(Self); SkinImages.Height := sSkinManager.SkinListController.ImgList.Height; SkinImages.Width := sSkinManager.SkinListController.ImgList.Width; sSkinManager.SkinListController.UpdateIfNeeded(True{Force Update}); // Added in AC 12.20/21 // Changed in AC 14.25 (True parm needed now) end else begin FreeAndNil(SkinNames); end{if}; SkinNames := TStringList.Create; sl.Clear; for ski in SkinList do begin if ski.skSkinMode = smInternal then begin SkinImages.AddImage(sSkinManager.SkinListController.ImgList, ski.skImageIndex); SkinNames.Add(ski.skName); end{if}; end{for}; sl.Assign(SkinNames); end; end;
HeDiBoParticipantRemember, it’s a mess if the Windows color mode is dark (“Dark” option under the “Choose your app mode” section in Settings > Personalization > Colors).
I’ve made a new little test project to demonstrate.
When SkinManager is active, the opendialog look hideous. It will also not close with the window close button, and it will not be sizable with the sizing triangle.
When SkinManager is not active all’s well.Attachments:
You must be logged in to view attached files.HeDiBoParticipantI didn’t wrote about exceptions. I mean, that this dialog is not skinned by default (the acTryToSkinCommonDialogs variable is False in the sDefaults.pas).
Why you have this dialog skinned partially?No, I wrote about the exception that ocurred. I don’t know why you think that’s not a problem. If dialog should not be skinnable (the best way to go at the moment) don’t allow it or prevent exceptions.
January 27, 2020 at 7:31 pm in reply to: AC 15.00 Memory corruption in combi button animation and dynamic skin switching. #68329HeDiBoParticipantIt has nothing to do with MaterialDark. The problem occurs on every skin. Click the huge button, then change skin: loop resulting in memory overflow, or another exception.
The button is huge, because that page shows a sample of controls used in the project.HeDiBoParticipantThe message is simply not posted. No error message.
HeDiBoParticipantCheck whether the control that is child to the parent is disabled. Then take over its hint handling if the parent itself has no hint handling.
HeDiBoParticipantHeDiBoParticipantI saw that, but that would overcomplicate things.
Don’t you think catching the WM_MOUSEHOVER message for the control that is parent to the disabled control would be the way to go?HeDiBoParticipantStill, exceptions are not a good idea.
In the given situation, SkinData is nil and should be tested.
I’m not sure what the given compiler directives have to do with it. Or do you mean that you’re going to set it up like that?- This reply was modified 4 years, 10 months ago by HeDiBo.
January 26, 2020 at 1:35 pm in reply to: AC 15.00 Memory corruption in combi button animation and dynamic skin switching. #68291HeDiBoParticipantI’ve sent it by separate mail.
HeDiBoParticipantPlease close this bug report
HeDiBoParticipantPressing sOpenDialog shows a partly skinned dialog that will throw an exception if cancelled (same demo project) in AC 15.00.
procedure TacDialogWnd.acWndProc(var Message: TMessage); var PS: TPaintStruct; X, Y, i: integer; cR, rClient: TRect; begin {$IFDEF LOGGED} // if (SkinData <> nil) and (SkinData.SkinSection <> 'DIALOG') then AddToLog(Message); {$ENDIF} case Message.Msg of WM_DESTROY, WM_NCDESTROY: begin if SkinData.FCacheBmp <> nil then << Access violation, because SkinData = nil!!! SkinData.FCacheBmp.Assign(nil);
So, please do not attempt to skin the dialog at all in this situation. The unskinned variant is what users are used to anyway.
- This reply was modified 4 years, 10 months ago by HeDiBo.
HeDiBoParticipantHave you tried to show that link somewhere?
HeDiBoParticipantNo progress in 15.00?
January 25, 2020 at 2:55 pm in reply to: ShowPopupForm will sometimes throw an exception (new in AC14,33) #68276HeDiBoParticipantAny progress on letting authors close their own topics?
January 25, 2020 at 2:50 pm in reply to: AC 15.00 Memory corruption in combi button animation and dynamic skin switching. #68275HeDiBoParticipantI did not mention that beClick and beLighting was enabled in SkinManager.
HeDiBoParticipantProblem solved in AC 14.36 👍🏾
PS. I’m still not able to close this item. Problem is probably in WordPress settings. The menu item to tag the item as resolved is not present in a user’s reply heading.
-
AuthorPosts