-
-
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
ITunesXMLImporterTest: Fix sporadic crash due to a not initalized reference. #11666
Conversation
…erence. Use a function call with a null check instead.
3ddc576
to
0572234
Compare
Finally rebased and all green. Sorry for the noise. |
Just the Focal amd64 build fails, so to have a package ASAP for this, too, how about disabling the test just for this build? (if that's possible) To not merge this in a rush.. |
humbly requesting @fwcd opinion on this refactoring. |
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.
Some quick notes from glancing over the changes, I'll see if I can do a more thorough review over the next few days
I haven't dug into the test log, so I am not sure if I understand the problem this fixes yet, but if there is some unsafe reference in there, could we perhaps fix the bug in isolation before refactoring it? |
OK, I went a head and disabled the test in a18b0b9 as a direct 2.4 commit. Now all PPA builds are succeeding: https://launchpadlibrarian.net/673323201/buildlog_ubuntu-focal-amd64.mixxx_2.4~beta~26~ga18b0b9269-1~focal_BUILDING.txt.gz |
OK, due to disabling the test the pressure is gone and we may go for a refactoring. The original root cause for the crash was that the IMHO this solution is now on a pragmatic middle ground with a function call utilizing the already existing pointer after a null check. |
How does this happen? Do members in C++ not initialize (deterministically) before methods can be called or does the test framework do some magic there that breaks this? mixxx/src/test/itunesxmlimportertest.cpp Line 30 in a5ae80a
My understanding was that this would (safely) initialize |
I have also no explanation why it is not initialized during tests. |
Apparently thats legal, even though many compilers still initialized it. https://stackoverflow.com/questions/36320008/whats-the-default-value-for-a-stdatomic |
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. Should be good now after the build issues are fixed.
Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
Use a function call with a null check instead.
The failing test has happened on Launchpad:
https://launchpadlibrarian.net/672913729/buildlog_ubuntu-focal-amd64.mixxx_2.4~beta~22~ge7bb02f7a5-1~focal_BUILDING.txt.gz