Comments (8)
So that change down there is causing the engine not to run in snapshot mode. (there's another discussion about snapshot in #20 ).
Your error is coming from the engine, but I haven't seen it before, though the fact that it runs when you point to lib/main.dart
suggests there might be some sort of mismatch in either the engine or the flutter version.
Could you:
- Try again calling
CreateFlutterWindow
like so, and copy the logs here:
auto window = CreateFlutterWindow(
640, 480, flutter_example_root + "/lib/main.dart",
flutter_example_root + "/build/flutter_assets",
flutter_example_root + "/.packages",
flutter_git_root + "/bin/cache/artifacts/engine/linux-x64/icudtl.dat",
arg_count, const_cast<char **>(args_arr));
- Copy the output of
make clean
andmake
fromlinux/
?
Thanks
from flutter-desktop-embedding.
It runs when it is not in snapshot mode. But I am not getting any logs in the console or in observatory:
The output of make clean
make -C library clean
make -C example clean
make[1]: Entering directory '/home/alex4o/Code/flutter-desktop-embedding/linux/example'
rm -f flutter_embedder_example; \
cd ../../example_flutter; \
/opt/flutter/bin/flutter clean
make[1]: Entering directory '/home/alex4o/Code/flutter-desktop-embedding/linux/library'
rm -f libflutter_embedder.so
make[1]: Leaving directory '/home/alex4o/Code/flutter-desktop-embedding/linux/library'
Deleting 'build/'.
make[1]: Leaving directory '/home/alex4o/Code/flutter-desktop-embedding/linux/example'
The output of make
the first time gives an error
make -C library
make -C example
make[1]: Entering directory '/home/alex4o/Code/flutter-desktop-embedding/linux/example'
cd ../../example_flutter; \
/opt/flutter/bin/flutter build flx \
--local-engine-src-path=../../flutter/engine/src \
--local-engine=host_debug_unopt;
make[1]: *** No rule to make target '/home/alex4o/Code/flutter-desktop-embedding/linux/example/../library/libflutter_embedder.so', needed by 'flutter_embedder_example'. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: Entering directory '/home/alex4o/Code/flutter-desktop-embedding/linux/library'
g++ -std=c++0x -Wall -Werror -shared -fPIC flutter_embedder.cc -L/home/alex4o/Code/flutter-desktop-embedding/linux/library -lglfw -lGL -lflutter_engine -Wl,-rpath=/home/alex4o/Code/flutter-desktop-embedding/linux/library -o libflutter_embedder.so
make[1]: Leaving directory '/home/alex4o/Code/flutter-desktop-embedding/linux/library'
make[1]: Leaving directory '/home/alex4o/Code/flutter-desktop-embedding/linux/example'
make: *** [Makefile:19: example] Error 2
But if i run it again the second time
make -C library
make -C example
make[1]: Entering directory '/home/alex4o/Code/flutter-desktop-embedding/linux/example'
g++ -std=c++0x -Wall -Werror -I/home/alex4o/Code/flutter-desktop-embedding/linux/example/../library/include flutter_embedder_example.cc -L/home/alex4o/Code/flutter-desktop-embedding/linux/example/../library/ -lglfw -lGL -lflutter_embedder -Wl,-rpath=/home/alex4o/Code/flutter-desktop-embedding/linux/example/../library/ -o flutter_embedder_example
make[1]: Entering directory '/home/alex4o/Code/flutter-desktop-embedding/linux/library'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/alex4o/Code/flutter-desktop-embedding/linux/library'
make[1]: Leaving directory '/home/alex4o/Code/flutter-desktop-embedding/linux/example'
from flutter-desktop-embedding.
Hmmm, looks like I might need to add an order-only declaration in the Makefile. It shouldn't be building the library and the example code in parallel (that's why it only works the second time).
from flutter-desktop-embedding.
So in the linked issue I was able to reproduce the issue after updating and building a more recent version of the engine.
from flutter-desktop-embedding.
I can repro this on macOS if I build a local engine that has the fix for #33. Could still potentially be a Flutter/engine mismatch though.
from flutter-desktop-embedding.
My repro was a user error; I accidentally build an old engine (since I forgot my checkout was using my out-of-date fork's master, rather than upstream/master). Rebuilding with ToT engine resolved it.
That does strongly suggest a version mismatch. What are the hashes of your Flutter checkout and Flutter engine checkout?
from flutter-desktop-embedding.
I've confirmed that running the latest checkout of the engine gets rid of this error in kernel mode (was previously snapshot mode even though I don't think they're totally analogous), but now running in source mode causes a segfault:
Observatory listening on http://127.0.0.1:35285/
../../third_party/dart/runtime/vm/kernel_binary.cc: 34: error: Invalid magic identifier
Dumping native stack trace for thread 3e135
[0x00007fcbff95b317] Unknown symbol
[0x00007fcbff95b317] Unknown symbol
[0x00007fcbffb5a531] Unknown symbol
-- End of DumpStackTrace
[1] 254257 abort ./example/flutter_embedder_example
from flutter-desktop-embedding.
Closing due to lack of response; the likely explanation is that this was a version mismatch, and without that information we can't investigate further.
from flutter-desktop-embedding.
Related Issues (20)
- window_size null-safety HOT 1
- Flutter launch error HOT 7
- setInitialRoute for Windows flutter::FlutterViewController HOT 1
- Window size is not correct when i first lunch the app unless i drag it HOT 3
- can't set window size. HOT 4
- App crashes if first minimize the window and then call setWindowVisibility(visible: true) HOT 1
- Throws MissingPluginException during test HOT 2
- setWindowMinSize and setWindowMaxSize not working in Flutter 2.8.0 on Windows 11 HOT 2
- Could not find a file named "plugins/file_chooser/pubspec.yaml HOT 4
- File Description HOT 1
- Linux on ARM: window_size causes "pub get" to hang HOT 3
- [menubar] 'MenuItem' is imported from both 'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:menubar/src/menu_item.dart' HOT 1
- [window_size] Window size cause GitHub timeout during flutter pub get HOT 1
- [menubar] Add "disabled" boolean on NativeMenuItem HOT 1
- Auto-Update flutter desktop app like Discord and Telegram desktop apps HOT 2
- DPI scale reactor needed HOT 1
- Git error. Command: `git clone --mirror git://github.com/google/flutter-desktop-embedding.git HOT 1
- [window_size] setWindowMinSize calculates window size without using DPI on some Windows version HOT 1
- is there in Flutter itself already ? HOT 1
- Run Flutter app in windows 32 bit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-desktop-embedding.