Open kalirosenkreuz opened 1 year ago
I ran into the same issue on Linux. It looks like the problem only happens when you run the app with flutter run
.
The root of the problem for me was in fft.dart
with creating the DynamicLibrary
to pass to IntifaceEngineFlutterBridgeImpl
. The current code will look in the current working directory of the process. In the release bundles, the application is likely executed in the bundle directory. In this case there is a lib
directory alongside it that will contain the intiface_engine_flutter_bridge
library. When running with flutter run
the cwd is actually the root directory of the project (or wherever you run it from presumably). In this case, the library is not located in the lib
directory as expected.
I fixed this by resolving the directory that the executable is located in and prepending the dylib
path with that. I wasn't sure about windows or android, so on those platforms I just prepended the current working directory to retain the existing behavior.
One other issue I ran into was in intiface_central_app.dart
:buildApp
. There isn't any exception handling and it doesn't seem like FutureBuilder
does anything useful if the future
throws an exception of returns a Future.error
. Not sure what the best fix for this would be. As a debugging patch I wrapped the whole body in a try-catch and logged the exception.
Here's the change to ffi.dart
: https://github.com/orangejuice24/intiface-central/commit/79a1f5d02113c1dba23c8ead2e7e0e42c1edb2f8
On void linux, using latest version. Running any prebuilt binary on the intiface site gives:
Building and running from
flutter run
from the cloned repository gives slightly more info:The application hangs indefinitely after that last line.
The window will open, but stuck on this screen forever: