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

Rive file with text crash #337

Closed
1ns4n33 opened this issue Aug 1, 2023 · 4 comments
Closed

Rive file with text crash #337

1ns4n33 opened this issue Aug 1, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@1ns4n33
Copy link

1ns4n33 commented Aug 1, 2023

Hi, i'm using the last version of rive (0.11.8) and last of Flutter/dart.

i tried to to create a project in flutter from scratch and an empty Rive file with only a 'Test' text to verify that is not a problem related to my project, and in both projects it gives me this error when running on chrome:

Error: LateInitializationError: Field '_makeFont' has not been initialized.
dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 288:49 throw
packages/rive_common/src/rive_text_wasm.dart 13:20 get _makeFont
packages/rive_common/src/rive_text_wasm.dart 640:23 decodeFont
packages/rive_common/rive_text.dart 456:12 decode
packages/rive/src/rive_core/assets/font_asset.dart 50:17 parseBytes
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/rive/src/rive_core/assets/font_asset.dart 49:34 parseBytes
packages/rive/src/rive_core/assets/font_asset.dart 46:18 decode
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/rive/src/rive_core/assets/font_asset.dart 45:22 decode
packages/rive/src/core/importers/file_asset_importer.dart 28:17 resolveContents
packages/rive/src/rive_core/assets/file_asset_contents.dart 29:13 import
packages/rive/src/rive_file.dart 222:17 __
packages/rive/src/rive_file.dart 288:21 import
packages/rive/src/rive_file.dart 321:21 asset
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50
dart-sdk/lib/async/zone.dart 1661:54 runUnary
dart-sdk/lib/async/future_impl.dart 147:18 handleValue
dart-sdk/lib/async/future_impl.dart 784:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 813:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 584:5 [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 657:7 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 177:15

i also tried to consult the guide but i didn't find anything about it,
am i doing something wrong? or is it a bug?

@1ns4n33 1ns4n33 added the bug Something isn't working label Aug 1, 2023
@1ns4n33 1ns4n33 closed this as completed Aug 2, 2023
@HayesGordon
Copy link
Contributor

Hi @1ns4n33 , has this issue been resolved for you?

@1ns4n33
Copy link
Author

1ns4n33 commented Aug 2, 2023

Yes, with the latest version, thank you!

@HayesGordon
Copy link
Contributor

HayesGordon commented Aug 7, 2023

Fixed in v0.11.13

Release notes:

  • Initializes Rive's text engine only when necessary when calling any of RiveFile.asset, RiveFile.network, or RiveFile.file.
  • You'll need to manually call RiveFile.initializeText when calling RiveFile.import directly to use text features. You can optionally only call this if you know the file needs the text engine, or you can determine if it needs it by calling RiveFile.needsTextRuntime.

@Saubhagya-dubey
Copy link

This Issue Still Exists for web :

I have Three similar rive assets in a column and text only renders randomly for any one of them .

Any help would be highly appreciated.

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

No branches or pull requests

3 participants