Closed JanezStupar closed 4 years ago
Please run flutter clean
, rm go/build -rf
and rm ~/.cache/hover/engine
and try again. In my experience that fixes it
If that doesn't work please create a new flutter project and add hover to. Then try to run it
I tried all your suggestions from this thread and previous ones. All leads to segfault.
I also created a new flutter project:
➜ tmp flutter create testsefgault
Creating project testsefgault...
testsefgault/.metadata (created)
testsefgault/testsefgault.iml (created)
testsefgault/.idea/runConfigurations/main_dart.xml (created)
testsefgault/.idea/workspace.xml (created)
testsefgault/.idea/modules.xml (created)
testsefgault/.idea/libraries/KotlinJavaRuntime.xml (created)
testsefgault/.idea/libraries/Dart_SDK.xml (created)
testsefgault/android/gradle/wrapper/gradle-wrapper.properties (created)
testsefgault/android/gradle.properties (created)
testsefgault/android/.gitignore (created)
testsefgault/android/app/src/profile/AndroidManifest.xml (created)
testsefgault/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created)
testsefgault/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created)
testsefgault/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created)
testsefgault/android/app/src/main/res/drawable/launch_background.xml (created)
testsefgault/android/app/src/main/res/values/styles.xml (created)
testsefgault/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created)
testsefgault/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created)
testsefgault/android/app/src/main/res/values-night/styles.xml (created)
testsefgault/android/app/src/main/AndroidManifest.xml (created)
testsefgault/android/app/src/debug/AndroidManifest.xml (created)
testsefgault/android/settings.gradle (created)
testsefgault/ios/Runner/Base.lproj/LaunchScreen.storyboard (created)
testsefgault/ios/Runner/Base.lproj/Main.storyboard (created)
testsefgault/ios/Runner/Info.plist (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (created)
testsefgault/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (created)
testsefgault/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created)
testsefgault/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (created)
testsefgault/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created)
testsefgault/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (created)
testsefgault/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created)
testsefgault/ios/Flutter/Debug.xcconfig (created)
testsefgault/ios/Flutter/Release.xcconfig (created)
testsefgault/ios/Flutter/AppFrameworkInfo.plist (created)
testsefgault/ios/Runner.xcworkspace/contents.xcworkspacedata (created)
testsefgault/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
testsefgault/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
testsefgault/ios/.gitignore (created)
testsefgault/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created)
testsefgault/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
testsefgault/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
testsefgault/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
testsefgault/lib/main.dart (created)
testsefgault/pubspec.yaml (created)
testsefgault/android/testsefgault_android.iml (created)
testsefgault/android/app/src/main/kotlin/com/example/testsefgault/MainActivity.kt (created)
testsefgault/android/app/build.gradle (created)
testsefgault/android/build.gradle (created)
testsefgault/ios/Runner/Runner-Bridging-Header.h (created)
testsefgault/ios/Runner/AppDelegate.swift (created)
testsefgault/ios/Runner.xcodeproj/project.pbxproj (created)
testsefgault/.gitignore (created)
testsefgault/README.md (created)
testsefgault/test/widget_test.dart (created)
Running "flutter pub get" in testsefgault... 2.4s
Wrote 72 files.
All done!
You'll need to install additional components before you can run your Flutter app:
[✓] Flutter (Channel beta, 1.23.0-18.1.pre, on Linux, locale en_US.UTF-8)
• Flutter version 1.23.0-18.1.pre at /home/janez/PycharmProjects/tmp/flutter/flutter
• Framework revision 198df796aa (5 days ago), 2020-10-15 12:04:33 -0700
• Engine revision 1d12d82d9c
• Dart version 2.11.0 (build 2.11.0-213.1.beta)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
[✓] IntelliJ IDEA Ultimate Edition (version 2020.2)
• IntelliJ at /opt/intellij-idea-ultimate-edition
• Flutter plugin version 49.0.4
• Dart plugin version 202.6397.47
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
After installing components, run 'flutter doctor' in order to re-validate your setup.
When complete, type 'flutter run' from the 'testsefgault' directory in order to launch your app.
Your application code is in testsefgault/lib/main.dart
And hover run:
➜ testsefgault hover init
go: creating new go.mod: module testsefgault/go
hover: You can add the '/home/janez/PycharmProjects/trackself/tmp/testsefgault/go' directory to git.
go: finding module for package github.com/pkg/errors
go: finding module for package github.com/go-flutter-desktop/go-flutter
go: found github.com/go-flutter-desktop/go-flutter in github.com/go-flutter-desktop/go-flutter v0.42.0
go: found github.com/pkg/errors in github.com/pkg/errors v0.9.1
hover: Available plugin for this project:
➜ testsefgault hover run
hover: Using engine from cache
hover: Cleaning the build directory
hover: Target file "lib/main_desktop.dart" not found.
hover: Let hover add the "lib/main_desktop.dart" file?
hover: [y/N]? y
hover: Target file "lib/main_desktop.dart" has been created.
hover: Depending on your project, you might want to tweak it.
hover: Bundling flutter app
Font subsetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.
hover: Compiling 'go-flutter' and plugins
runtime/cgo
github.com/Xuanwo/go-locale
github.com/go-flutter-desktop/go-flutter/internal/currentthread
github.com/go-flutter-desktop/go-flutter/embedder
github.com/go-gl/glfw/v3.3/glfw
github.com/go-gl/gl/v3.3-core/gl
github.com/go-flutter-desktop/go-flutter/internal/priorityqueue
github.com/go-flutter-desktop/go-flutter/internal/keyboard
github.com/go-flutter-desktop/go-flutter/internal/opengl
github.com/go-flutter-desktop/go-flutter
testsefgault/go/cmd
hover: Successfully compiled executable binary for linux
hover: Build finished, starting app...
hover: Running testsefgault in debug_unopt mode
flutter: Observatory listening on http://127.0.0.1:50300/
hover: Connecting hover to 'testsefgault' for hot reload
go-flutter: calculated pixelRatio limited to a minimum of 1.0. metrics: {"dpi":157.31612903225803,"monitorWidthMm":310,"monitorWidthSc":1920,"mscpi":157.31612903225803,"pixelRatio":0.9832258064516127,"ppsc":1,"windowWidthPx":800,"windowWidthSc":800}
hover: App 'testsefgault' exited with error: signal: segmentation fault (core dumped)
Error connecting to the service protocol: failed to connect to http://127.0.0.1:50300/
Sorry I have no idea. You can try to debug it using gdb and loading the binary manually or try the release mode.
This is what I got with gdb:
Starting program: /home/janez/PycharmProjects/trackself/tmp/testsefgault/go/build/outputs/linux-debug_unopt/testsefgault
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffcd2c4640 (LWP 76588)]
[New Thread 0x7fffccac3640 (LWP 76589)]
[New Thread 0x7fffc7fff640 (LWP 76590)]
[New Thread 0x7fffc77fe640 (LWP 76591)]
[New Thread 0x7fffc6ffd640 (LWP 76592)]
[New Thread 0x7fffc4890640 (LWP 76593)]
[New Thread 0x7fffb64e8640 (LWP 76594)]
[New Thread 0x7fffb5ce7640 (LWP 76595)]
[New Thread 0x7fffb54e6640 (LWP 76596)]
[New Thread 0x7fffaabe4640 (LWP 76599)]
[New Thread 0x7fffaa3e3640 (LWP 76600)]
[New Thread 0x7fffa9be2640 (LWP 76601)]
[New Thread 0x7fffa93e1640 (LWP 76602)]
[New Thread 0x7fffa8be0640 (LWP 76603)]
[New Thread 0x7fff92155640 (LWP 76604)]
[New Thread 0x7fffb43c6640 (LWP 76605)]
[New Thread 0x7fffb413f640 (LWP 76606)]
[New Thread 0x7fff90f7f640 (LWP 76607)]
[New Thread 0x7fff90e7e640 (LWP 76608)]
go-flutter: calculated pixelRatio limited to a minimum of 1.0. metrics: {"dpi":93.78461538461538,"monitorWidthMm":520,"monitorWidthSc":1920,"mscpi":93.78461538461538,"pixelRatio":0.5861538461538461,"ppsc":1,"windowWidthPx":800,"windowWidthSc":800}
flutter: Observatory listening on http://127.0.0.1:50300/
Thread 11 "io.flutter.ui" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffaabe4640 (LWP 76599)]
0x00007ffff7e2597d in ?? () from /home/janez/PycharmProjects/trackself/tmp/testsefgault/go/build/outputs/linux-debug_unopt/libflutter_engine.so
(gdb) continue
Continuing.
[Thread 0x7fff90e7e640 (LWP 76608) exited]
[Thread 0x7fff90f7f640 (LWP 76607) exited]
Thread 11 "io.flutter.ui" received signal SIGSEGV, Segmentation fault.
runtime.raise () at /usr/lib/go/src/runtime/sys_linux_amd64.s:165
165 RET
@jld3103 hover run --release
works fine for the test project and for my actual project.
Is the release
mode used by builds too? Or is this something I need to specify manually?
I would say that this is an okay workaround for the time being - as I am usually working with the flutter run
and only use hover for either wokring on plugin related features or for doing releases.
But I would still like to have the original issue pinpointed and resolved, but its no longer a blocker for me (especially if the fix for pixelRatio is coming soon!).
So build
does the same as run --release
except that it doesn't start the binary. The only thing broken is debug builds right?
Yes, that is correct.
Have the same problem after I reinstalled Linux, Hover worked on the exact same project before
I also ran flutter clean
, rm go/build -rf
andrm ~/.cache/hover/engine
but still doesn't work
if I runhover run --release
it also works for me
On another thread for android studio it was suggested to change the android sdk but this didn't work either
This has nothing to do with android in any way. It's weird that I can't reproduce it at all, but I'll try
On what channel are you? I'm on master so that may be why it works for me. Can you try switching to master and see if that works?
The channel doesn't seem to matter. Tried beta and stable and they both work
I changed to version 0.43.0 and it works fine.
Sry not sure how i can switch the channel.
Sorry I meant the flutter channel
A fix for this issue would be changing back the debug builds to the official engine builds which are used prior to hover 0.44.0. That would also fix another issue with cross-compilation for darwin.
Can you both try https://github.com/go-flutter-desktop/hover/pull/170 ? That should fix everything. Please also verify that release still works.
Sry it still doesn't work.
I hope i did everything correctly hover version
shows Hover (devel)
?
Ah yes you need to clean the engine cache again and the build directory to be sure
It still doesn't run
when i change the --observatory-port
it does work fine
Weird. After I run hover once with another observatory-port i can run it normally even the release version (0.44) works
That's really weird. Doesn't make sense to me at all
Yeah I even created a new Project to test it again and hover 0.44 runs normal even if it uses the old port again
so changing --observatory-port
fix it i guess
anyway thank you for all the help and for hover its a really awesome project
@JanezStupar can you also try that?
Can you both try go-flutter-desktop/hover#170 ? That should fix everything. Please also verify that release still works.
Works fine with channel beta after cleaning the caches.
Also works fine with channel master.
Thank you very much!
WRT build process, linux build works correctly (and they didn't previously - so thats a bonus). Docker builds don't work due to AOT (I hope this gets resolved soon) and I could not test builds on windows and darwin ATM...
Will get back once I set up my new macos environment.
This is the output on Mac for hover run
:
janezstupar@Janezs-iMac desktopapp % hover run
hover: Using engine from cache
hover: Cleaning the build directory
hover: ⚠ The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: ⚠ It's advised to use the beta channel: `flutter channel beta`
hover: Bundling flutter app
Running "flutter pub get" in desktopapp... 1,536ms
Font subsetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.
hover: Compiling 'go-flutter' and plugins
# trackself/go/cmd
ld: warning: dylib (/Users/janezstupar/projects/desktopapp/go/build/outputs/darwin-debug_unopt/FlutterEmbedder.framework/FlutterEmbedder) was built for newer macOS version (10.11) than being linked (10.10)
hover: Successfully compiled executable binary for darwin
hover: Build finished, starting app...
hover: Running trackself in debug_unopt mode
dyld: Library not loaded: @rpath/FlutterEmbedder.framework/Versions/A/FlutterEmbedder
Referenced from: /Users/janezstupar/projects/desktopapp/go/build/outputs/darwin-debug_unopt/trackself
Reason: image not found
hover: App 'trackself' exited with error: signal: abort trap
Release works? I will spin up my MacOS VM and fix it soon
Yes, release works.
BTW... how do you run hover in Macos VM? I am getting OpenGL errors (similar to Windows VM in virtualbox) with my QEMU mac VM.
Or do you use it only for building?
I only use it for building
This is not resolved. The PR didn't land and it has still some errors. I would keep this open until the actual error is fixed
Output of
hover run
. Note that the same process works fine with hover0.43.0