Git Product home page Git Product logo

Comments (8)

awdavies avatar awdavies commented on April 28, 2024

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 and make from linux/?

Thanks

from flutter-desktop-embedding.

alex4o avatar alex4o commented on April 28, 2024

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.

awdavies avatar awdavies commented on April 28, 2024

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.

awdavies avatar awdavies commented on April 28, 2024

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.

stuartmorgan avatar stuartmorgan commented on April 28, 2024

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.

stuartmorgan avatar stuartmorgan commented on April 28, 2024

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.

awdavies avatar awdavies commented on April 28, 2024

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.

stuartmorgan avatar stuartmorgan commented on April 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.