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

Notes with color corrupting when opening in 0.15.1 #884

Closed
ZebraVogel94349 opened this issue Aug 24, 2023 · 2 comments
Closed

Notes with color corrupting when opening in 0.15.1 #884

ZebraVogel94349 opened this issue Aug 24, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ZebraVogel94349
Copy link
Contributor

Describe the bug

Colored strokes don't work in Version 0.15.1. All notes containing colored strokes opened in that Version will get corrupted. I think the reason for that is, that the new BSON file format uses int64 instead of int, which is not compatible with the way colors are stored. color = Color(json['c'] ?? defaultColor.value); in stroke_properties.dart raises an exception because of that.

To reproduce

  1. Create a note using colors
  2. Close and reopen the note
  3. It is corrupted

Expected behavior

Not corrupting the note

Saber version

v1.15.1 PlayStore

Device

  • Device: Samsung Galaxy Tab S7 FE
  • OS: Android 13

Anything else?

No response

@ZebraVogel94349 ZebraVogel94349 added the bug Something isn't working label Aug 24, 2023
@ZebraVogel94349
Copy link
Contributor Author

I noticed, that color values stored in old JSON files are greater than 2^32, which is probably the reason for them being Int64. But I don't know, how the values got so big.

@adil192
Copy link
Member

adil192 commented Aug 24, 2023

Thanks for the heads up

adil192 added a commit that referenced this issue Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants