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

fix: content loading related crashes (android) #168

Merged
merged 9 commits into from
Jan 16, 2024

Conversation

leanmendoza
Copy link
Collaborator

@leanmendoza leanmendoza commented Jan 16, 2024

What?

Avoid duplicating to load the same resource more than once, with ContentNotificator applied to the downloads all the shared dependencies awaits the first request.
Use tokio::fs instead of godot::FileAccess (crashing when multiple file handlers in the same file)

  • feat: add content notification to hold futures of downloads
  • fix: move to std::fs/tokio::fs instead of godot FileAccess

Minor

  • fix: now it waits until promises are resolved before take snapshot
  • fix: tooltip when action=any
  • chore: move PackedByteArray conversion from Vec to a bytes module
  • fix: race condition when getUserData is called after onStart but it's not resolved by the async engine
  • chore: remove nop()
  • mock ~system/CommunicationsController::sendBinary
  • fix: remove error message when texture loading failed at first time (before ensuring is fetched)
  • use tokio::fs to wrtie files

@leanmendoza leanmendoza changed the title Feat/add content notificator feat: add content notificator Jan 16, 2024
move memcpy to packed array to helper functions (fast_create_packed_byte_array_from_*)
remove nop()
mock ~system/CommunicationsController::sendBinary
@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2024

Codecov Report

Attention: 93 lines in your changes are missing coverage. Please review.

Comparison is base (8700db5) 46.74% compared to head (ec2bfe3) 47.35%.

Files Patch % Lines
rust/decentraland-godot-lib/src/content/gltf.rs 64.38% 26 Missing ⚠️
rust/decentraland-godot-lib/src/content/audio.rs 0.00% 23 Missing ⚠️
...ntraland-godot-lib/src/content/content_provider.rs 63.88% 13 Missing ⚠️
rust/decentraland-godot-lib/src/content/video.rs 0.00% 6 Missing ⚠️
rust/decentraland-godot-lib/src/dcl/js/mod.rs 71.42% 6 Missing ⚠️
...ust/decentraland-godot-lib/src/content/download.rs 87.50% 5 Missing ⚠️
rust/decentraland-godot-lib/src/content/texture.rs 81.81% 4 Missing ⚠️
...d-godot-lib/src/godot_classes/dcl_ui_background.rs 33.33% 4 Missing ⚠️
...traland-godot-lib/src/content/wearable_entities.rs 84.21% 3 Missing ⚠️
...ntraland-godot-lib/src/auth/dcl_player_identity.rs 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
+ Coverage   46.74%   47.35%   +0.60%     
==========================================
  Files         137      139       +2     
  Lines       16885    16841      -44     
==========================================
+ Hits         7893     7975      +82     
+ Misses       8992     8866     -126     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leanmendoza leanmendoza changed the title feat: add content notificator fix: content loading related crashes (android) Jan 16, 2024
@leanmendoza leanmendoza requested a review from kuruk-mm January 16, 2024 18:15
@kuruk-mm kuruk-mm marked this pull request as ready for review January 16, 2024 18:29
@leanmendoza leanmendoza requested a review from kuruk-mm January 16, 2024 19:18
Copy link
Member

@kuruk-mm kuruk-mm left a comment

Choose a reason for hiding this comment

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

Greatt!! Awesome 🙌

@leanmendoza leanmendoza merged commit fb785e6 into main Jan 16, 2024
3 checks passed
@leanmendoza leanmendoza deleted the feat/add-content-notificator branch January 16, 2024 20:23
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.

3 participants