-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refectoring that aims to fix Rekordbox crash on macOS #10608 #11230
Conversation
This avoids memory leaks
This way it cannot become a dangling pointer
It can become a dangling pointer
…the behavior of the native Mixxx library
I took a quick look at this PR and I agree that this likely won't really fix any crash but it highlights the unsafe pointer handling by use of unsafe unique_ptr APIs. I will conduct a full review asap. |
Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I'll still have to re-review a couple other parts though.
2.3 is fine if we leave comments in the code for the stuff that has to be done in 2.4. |
Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
I think I have addressed everything. |
There are still a couple questions from me and ronso0 which have yet to be answered. I have double checked every comment and IMO everything that is not marked resolved yet is still an unfinished discussion. |
I think I have added now all missing answers. |
Thank you, I replied in their respective threads. |
Done |
Thank you, there is still another open comment where I requested to document the lifetime of a raw pointer. |
Done |
Thank you, can you take care of the failing pre-commit clang-format? |
Ups, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, sorry for not merging earlier. Lost track of this PR. Busy week.
We have a confirmed crasher on macOS regarding Reckordbox #10608.
Because it is not reproducible a did a tight review of the memory management in the surrounding code.
I have discovered a suspicious pointer handling that has been introduced because of the dynamic nature of the tree view in case of the Reckordbox feature. Unprotected raw pointers are carried by the QModelIndex and may become dangling after a tree rebuild. I have introduces smart pointers as best as possible without a complete rewrite and deleted the possible dangling pointers in 3260e9c and 83973e1
In addition I have cleand up the code around the search columns that has suffered some rotting.
Even though I have still no evidence that this PR fixes any crash there is a chance. If not this is IMHO a useful refactoring.
That's why I have target this to 2.3. If we think it is to big for a bug fix we can merge it to 2.4.