Repository navigation
[DC-30] fix: memory leak and general cleanup of AccountSettings - #12146
Conversation
see item #13 in the refactoring todo list
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
|
added mystery: we do have a check earlier in the code that should just return/skip creation of a new validator if the current validator is not null. for completely unknown reasons the debugger only very rarely ends up returning via this trap, so it very frequently goes on to create a new validator even though it appears to be a non-null pointer already. Yes, indeed Erik saw this on his machine too - I'm not crazy - but the behavior is completely inexplicable. New tack will be to replace the already low value use of qpointer with just a normal raw pointer so we don't have to worry about some subtle weirdness related to that. and I will also start refactoring this function to JUST DO ONE THING instead of this, that and the other thing (including not only creating a new validator, but also adding the connections with plenty of lambdas inside lambdas) fingers crossed that once it's simplified it behaves in a more reasonable way. |
…ng QPointer to raw ptrs
… into work/fixSevereMemoryLeak
…ng a new validator unless the member is actually null. I will clean up a bit more now.
… we use normal RAII to manage this resource. SO much healthier (especially in the AccountState impls) also moved various connections to dedicated connectXXX methods. this not only makes the ctr much easier to read, but in future we may want to connect at a different point in time, OUTSIDE the ctr. now we can move them around super easily. next step is obliterating the lambdas...after a nice long easter break I should have the energy for this again.
…ions also refactored the very strangely implemented dialog to confirm updating the url after a server redirect. I still need to find a way to test that but coceptually this is now cleaned up A LOT got rid of the supportsSpaces property as it had a weird notification for "supportsSpacesChanged" that made no sense, then I could not find anyone using the property anyway. Goodbye!
put the mysterious property that requires a "supportsSpacesChanged" signal back, as removing that broke the bottom area of the account settings page
… the handling of the updated certificate acceptance dialog
… into work/fixSevereMemoryLeak
|
hello @saw-jan and @ishabaral I would like to ask for help with the test failure. since my last "real" commit (which passed) it has failed twice, once on a test related to syncing a file with special characters in the name, and once on a file with a very long name (but in that case the test with special chars passed). I'm really confused about what is actually happening there. I also see what look like some connection failures but not sure if those are expected or indicate some other problem. any info is appreciated. |
it was a flaky failure. I have restarted the build and it's green now. |
Original: 24ae284 ("[DC-30] fix: memory leak and general cleanup of AccountSettings (owncloud#12146)", 2025-04-28)
see item #13 in the refactoring todo list
short story is: we almost always create a new ConnectionValidator when checkConnectivity is run. Fun part is that in addition to being called explicitly here and there, it also auto-runs in a polling pattern. In some cases the pointer is cleaned up but what I see when I break on the "new" for that ptr is that it's only null the very first time I hit it (eg when creating a new account)