Jump to content

Willicious

Members
  • Content Count

    144
  • Joined

  • Last visited

  • Days Won

    1

Willicious last won the day on May 29

Willicious had the most liked content!

Community Reputation

8 Neutral

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yeah, that's because I'm in the process of migrating over to GitHub (as you've suggested), because BitBucket sucks 😉 I'm getting some help with the BitBucket PR at the moment, once that's done I'll probably switch completely to GitHub for all projects.
  2. Still haven't managed to figure this one out, hopefully getting some help with it tomorrow (Monday 25th). I'll post back here if a solution is found.
  3. Willicious

    TTreeView arrows appearing too small

    OK, managed to fix this! The images needed to be slightly larger (24 x 24 instead of 16 x 16), and the indent needed to be made slightly smaller (16 rather than 19). Those values result in larger arrows and smaller "....":
  4. Willicious

    TTreeView arrows appearing too small

    Found out it's definitely to do with the "Images" properties, but no amount of tweaking will yield good results. The "...." part of the node is too big, and the clickable area is actually just to the right of the actual arrow.
  5. The arrows on this treeview are way too small: I added another treeview as a test, and the arrows are the correct size: So, Delphi's treeviews are clearly capable of decent sized arrows. The problem is that the first treeview has all of the relevant code linked to it, the second is there purely for testing/demonstration purposes. I'm not sure exactly whats been done to reduce the size of the arrows in the first example. Removing the custom images (i.e. the little blue dot) doesn't help, instead there is just blank space where the images were. The joys of working on existing code that you had nothing to do with! 🙂
  6. I'm attempting to create a pull request on BitBucket. I've taken the following steps, in this order: 1. Made changes to the repo 2. Created NewBranch in SourceTree 3. Checked out NewBranch in SourceTree 4. Committed changes to NewBranch 5. Commited a test change to the master branch just to make doubly sure that NewBranch is in fact separate from the master - it is 6. Pushed everything to origin 7. Opened BitBucket in a web browser 8. Clicked Create > Pull request 9. Chosen NewBranch as the source branch From here, I get different results depending on what I do next. 10. Chosen the destination repo, and chosen (a new branch with the same name i.e. NewBranch) as the destination branch If I do this, the most recent 8* commits are added to the PR, from both the source branch (i.e. NewBranch) and the master branch. 10. Chosen the destination repo's master branch as the destination branch If I do this, the most recent 8 commits are added to the PR, but I get little yellow warning symbols and an error saying "something went wrong". Clearly, I'm not used to working with branches. Based on the above, can anyone see what I might be doing wrong? *NOTE: NewBranch consists of a single commit, the other 7 are from master
  7. Willicious

    How to debug a Not Responding program element

    Well, this is very strange. I went to try madExcept again today, and now the Level Select can't even be accessed: With madExcept disabled, the program runs fine and the memory leak is gone. Not sure what's happening here...
  8. Willicious

    How to debug a Not Responding program element

    OK, so Anders' solution gets rid of the built-in resource leak dialog👍, but madExcept still gives us this:
  9. Willicious

    How to debug a Not Responding program element

    Ah yes, I get it now. "Clear;" is called from Clone (as JonRobertson has also pointed out). But, it isn't in the call stack (not directly, anyway). So, (and this is possibly one of those noobish questions), without prior knowledge of where "Clear" is being called, how can the call stack be used to trace this by itself? If the answer is that it can't, that's of course fine - at least we know what we're looking for, so we can search for it initially and obtain the prior knowledge needed to interpret the call stack usefully. Got it. Thanks to you both for all the explanations of what's going on, it's made everything much clearer. I'll go ahead and implement Anders' suggested change and report back what happens.
  10. Willicious

    How to debug a Not Responding program element

    Good shout. Here's the call stack up to the breakpoint: It's still not 100% clear how we got to the "Free" call, though... I've highlighted the most recent thing that isn't in System.Generics
  11. Willicious

    How to debug a Not Responding program element

    OK... this is a bit of a can of worms. fPrimaryAnimation doesn't get freed, and PrimaryAnimation (property referring to fPrimaryAnimation) doesn't get freed. NewInstance and NewAnim also don't get freed. I honestly don't know where to start. The joys of working on someone else's code 🤨
  12. Willicious

    How to debug a Not Responding program element

    Should it? Bear in mind I'm very new to fixing memory leaks: nothing is obvious to me. NewAnim doesn't appear to be freed anywhere. However, my attempts to free it have so far only led to program crashes, or the memory leak persisting. Here's TGadgetAnimation's destructor: destructor TGadgetAnimation.Destroy; begin Dec(fTempBitmapUsageCount); if (fTempBitmapUsageCount = 0) then fTempBitmap.Free; fTriggers.Free; fSourceImage.Free; fSourceImageMasked.Free; inherited; end; If I shift-click "inherited" here, we get this empty procedure, in System. So, I assume that either Delphi just somehow 'knows' what to do here, or it does nothing: destructor TObject.Destroy; begin end; TGadgetMetaAccessor doesn't have a destructor, but TGadgetMetaInfo does. Maybe (i.e. I very much don't know for sure) "Animations.Free" is responsible for dispensing with all created TGadgetAnimations: destructor TGadgetMetaInfo.Destroy; var i: Integer; begin for i := 0 to ALIGNMENT_COUNT-1 do begin fVariableInfo[i].Animations.Free; fInterfaces[i].Free; end; inherited; end; Shift-clicking "inherited" there leads to the same empty procedure in System. So yes, I'm as baffled as you are.
  13. Willicious

    How to debug a Not Responding program element

    Here's the last 2 items in the call stack (I assume that only the most recent lines in the call stack are relevant?): procedure TGadgetAnimations.AddPrimary(aAnimation: TGadgetAnimation); begin Add(aAnimation); if fPrimaryAnimation <> nil then fPrimaryAnimation.fPrimary := false; <---------------------------------------- this is line 935 fPrimaryAnimation := aAnimation; aAnimation.fPrimary := true; end; procedure TGadgetAnimations.Clone(aSrc: TGadgetAnimations); var i: Integer; NewAnim: TGadgetAnimation; begin Clear; NewAnim := TGadgetAnimation.Create(aSrc.PrimaryAnimation.fMainObjectWidth, aSrc.PrimaryAnimation.fMainObjectHeight); NewAnim.Clone(aSrc.PrimaryAnimation); AddPrimary(NewAnim); <------------------------------------------------- this is line 949 for i := 0 to aSrc.Count-1 do begin if aSrc.Items[i].Primary then Continue; NewAnim := TGadgetAnimation.Create(aSrc.Items[i].fMainObjectWidth, aSrc.Items[i].fMainObjectHeight); NewAnim.Clone(aSrc.Items[i]); Add(NewAnim); end; SortByZIndex; end; This points to fPrimaryAnimation being the problem. Maybe this has already been freed and then not re-created for use here (best guess from what you've said)? Question is, which is the best action to take: 1) Free fPrimaryAnimation later 2) Re-create and re-free fPrimaryAnimation 3) Something else?
  14. Willicious

    How to debug a Not Responding program element

    Thanks, I've given this a try. It crashed on attempting to load a level with Pickup skill objects. Here's the call stack: Does this give us any more clues as to what to target? Should I FreeAndNil everything in TGadgetAnimations just to be sure?
  15. Willicious

    How to debug a Not Responding program element

    Here's the regular memory leak dialog:
×