Skip to content
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

Make sure unused places in ChannelHandleMap are initalized #3882

Merged
merged 2 commits into from
May 20, 2021

Conversation

daschuer
Copy link
Member

The using code assumes that empty places are nullptr, which is not the case:

https://doc.qt.io/qt-5/qvarlengtharray.html

QVarLengthArray doesn't initialize the memory if the value is a basic type. (QVector always does.)

This PR fixes the assumption. And hopefully the rasher in https://bugs.launchpad.net/mixxx/+bug/1775497

Unfortunately the over all design is still broken and instead of crashing it will probably now hit VERIFY_AND_DEBUG_ASSERTs that have been added as safety net.

I think for 2.4 a bigger refactoring is required with a better memory management, fixing these edge cases.
Before building on it in #2618

@daschuer daschuer added this to the 2.3.0 milestone May 19, 2021
Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't really comment on the changes. They build and I noticed no issues when testing. Let's wait a little until the original reporter had the chance to confirm that this fixes the crash.

@daschuer
Copy link
Member Author

Done

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! No risk to break anything. Let's hope the bug is fixed. LGTM

@uklotzde uklotzde merged commit 4664fc1 into mixxxdj:2.3 May 20, 2021
@daschuer daschuer deleted the lp1775497 branch September 26, 2021 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants