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

Fixed wrong bitwise operator: & instead of | #7587

Merged
merged 1 commit into from Mar 4, 2021

Conversation

L0uisc
Copy link
Contributor

@L0uisc L0uisc commented Feb 20, 2021

Resolves: (direct link to the issue)

In globals.h, the following enum is declared:

enum TelemetryDataCollectionType : unsigned char {
      COLLECT_NO_DATA = 0,
      COLLECT_CRASH_FREE_DATA = 1,
      COLLECT_INSPECTOR_DATA = 1 << 1,
      COLLECT_SHORTCUT_AND_MENU_DATA = 1 << 2,
      COLLECT_ALL_DATA = COLLECT_CRASH_FREE_DATA & COLLECT_INSPECTOR_DATA & COLLECT_SHORTCUT_AND_MENU_DATA
};

The fifth member (COLLECT_ALL_DATA) will evaluate to 0, duplicating the first member (COLLECT_NO_DATA). This is most probably not what was intended. This fix changes the bitwise operator to | in order to make the last member a bit field with all bits on.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made

@L0uisc
Copy link
Contributor Author

L0uisc commented Feb 20, 2021

Coding rules link gives me 404 not found and I don't know what kind of tests I could create for this.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Feb 21, 2021

@ecstrema
Copy link
Contributor

ecstrema commented Feb 21, 2021

If I remember well, Telemetry has been completely disabled not so long ago, because there was enough reports already. I haven't checked, but this might actually what they used to disable it? Maybe @igorkorsukov would know?

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Feb 21, 2021

Since 18576da (that is 3.5 Alpha) only COLLECT_CRASH_FREE_DATA gets collected.
Funny enough this is also the commit that introduced this bug.

@vpereverzev vpereverzev merged commit 51fb292 into musescore:3.x Mar 4, 2021
@Jojo-Schmitz
Copy link
Contributor

I wonder whether this would need to get ported to master

@L0uisc L0uisc deleted the telemetry-type-fix branch January 25, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants