rive-flutter icon indicating copy to clipboard operation
rive-flutter copied to clipboard

RiveAnimation stopped working post upgrade to 0.13.8

Open nishitsplashmath opened this issue 8 months ago • 1 comments

Description

Post upgrading Rive from 0.12.4 to 0.13.8, Rive is not getting initialized properly for android, ios and m-web platforms. DynamicLibrary.lookup is not getting initialized correctly. We've added dart:ffi as dependency in flutter package.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Call RiveFile.network method to get the Rive file with a cdn file Path.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'init': dlsym(RTLD_DEFAULT, init): symbol not found #0 DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33:70) #1 init (package:rive_common/src/rive_text_ffi.dart:527:15) #2 init (package:rive_common/src/rive_text_ffi.dart) #3 initFont (package:rive_common/src/rive_text_ffi.dart:836:3) #4 Font.initialize (package:rive_common/rive_text.dart:477:7) #5 RiveFile.initializeText (package:rive/src/rive_file.dart:365:33) #6 RiveFile._initTextAndImport (package:rive/src/rive_file.dart:381:13) #7 RiveFile.network (package:rive/src/rive_file.dart:436:12) #8 MethodChannelContextPlugin.getRiveFile (package:context_plugin_platform_interface/src/method_channel_context_plugin.dart:187:14) #9 SplashlearnRiveVm._loadRiveFile (package:flutter_app/utilities/splash_companion/splashlearn_rive_vm.dart:202:20) #10 SplashlearnRiveVm.init (package:flutter_app/utilities/splash_companion/splashlearn_rive_vm.dart:162:9)


Expected behavior

RiveFile should be returned.

Device & Versions (please complete the following information)

  • Android Emulator, iOS Simulator, Android Phone, iOS devices, M-web devices (Android Chrome, iOS safari, Chrome)
  • Flutter Version: Flutter 3.22.2 e.g.:
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (2 weeks ago) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3

Additional context

  1. There was no text initialization happening in 0.12.4
  2. When building from source instead of flutter package, we noticed that the initFont() in rive_text_ffi.dart is causing the crash.

nishitsplashmath avatar Jun 20 '24 10:06 nishitsplashmath