Flutter 1.9.1+hotfix.1 • channel beta • https://github.com/flutter/flutter
Framework • revision a1fb3fabec (27 hours ago) • 2019-09-03 18:07:52 -0700
Engine • revision cc88fa45db
Tools • Dart 2.5.0
v0.29.0
But v0.28.0 work.
go version go1.13 windows/amd64
Windows 10 1903
hover: Using engine from cache
go: finding github.com/go-gl/glfw latest
go: finding github.com/go-gl/gl latest
creating glfw window: VersionUnavailable: WGL: Failed to create OpenGL context
hover: app 'xx' exited with error: exit status 1
hover run
#219 Set OpenGL version 4.1.
does your project works with hover run -b '@gl-3.3'
@zephylac @nzlov can you check if the https://github.com/go-flutter-desktop/examples/tree/master/texture_tutorial example works on your OS (MacOS, and Windows) using hover run -b '@gl-3.3'
@Drakirus I'll try ASAP
@Drakirus My project is working, but https://github.com/go-flutter-desktop/examples/tree/master/texture_tutorial is not, Because dependencies required to run on Windows are simply too complex。
@nzlov can you check to texture_tutorial with the following go/cmd/options.go file.
package main
import (
"github.com/go-flutter-desktop/go-flutter"
"github.com/go-flutter-desktop/plugins/go-texture-example/example_image"
)
var options = []flutter.Option{
flutter.WindowInitialDimensions(1200, 500),
// flutter.AddPlugin(&example_video.VideoPlugin{}),
flutter.AddPlugin(&example_image.ImagePlugin{}),
}
(no additional dependencies required)
Keep using: hover run -b '@gl-3.3' :wink:
first run is ending up like this:
hover: Using engine from cache
hover: Cleaning the build directory
hover: Bundling flutter app
hover: Checking available release on Github
hover: Compiling 'go-flutter' and plugins
hover: build finished, starting app...
hover: Running texture_tutorial in debug mode
go-flutter: WARNING error creating the resource window: VersionUnavailable: NSGL: Failed to create OpenGL context
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(95)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(95)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter: Observatory listening on http://127.0.0.1:50300/tlUg_gCvhuE=/
texture_tutorial: Start video
go-flutter: no handler found for channel flutter/isolate
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]
runtime stack:
runtime.throw(0x4216017, 0x2a)
/usr/local/go/src/runtime/panic.go:617 +0x72
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:374 +0x4a9
runtime.asmcgocall(0x7000076de3b8, 0x4052f43)
/usr/local/go/src/runtime/asm_amd64.s:639 +0x70
goroutine 17 [syscall, locked to thread]:
runtime.cgocall(0x416e740, 0xc000056d50, 0x0)
/usr/local/go/src/runtime/cgocall.go:128 +0x5b fp=0xc000056d20 sp=0xc000056ce8 pc=0x400561b
github.com/go-gl/gl/v4.6-core/gl._Cfunc_glowGenTextures(0x0, 0x1, 0xc0000fcb38)
_cgo_gotypes.go:7670 +0x45 fp=0xc000056d50 sp=0xc000056d20 pc=0x4116c85
github.com/go-gl/gl/v4.6-core/gl.GenTextures(...)
.../go/pkg/mod/github.com/go-gl/[email protected]/v4.6-core/gl/package.go:9715
github.com/go-flutter-desktop/go-flutter.(*TextureRegistry).handleExternalTexture(0xc000022240, 0x2, 0x280, 0x168, 0x831f9a0)
.../go/pkg/mod/github.com/go-flutter-desktop/[email protected]/texture-registry.go:121 +0x26c fp=0xc000056de8 sp=0xc000056d50 pc=0x4147bfc
github.com/go-flutter-desktop/go-flutter.(*TextureRegistry).handleExternalTexture-fm(0x2, 0x280, 0x168, 0xc000056e70)
.../go/pkg/mod/github.com/go-flutter-desktop/[email protected]/texture-registry.go:94 +0x48 fp=0xc000056e20 sp=0xc000056de8 pc=0x4149a28
github.com/go-flutter-desktop/go-flutter/embedder.proxy_gl_external_texture_frame_callback(0xc0000e6018, 0x2, 0x280, 0x168, 0x7000076de540, 0x4055436)
.../go/pkg/mod/github.com/go-flutter-desktop/[email protected]/embedder/embedder_proxy.go:73 +0x4b fp=0xc000056e50 sp=0xc000056e20 pc=0x411444b
github.com/go-flutter-desktop/go-flutter/embedder._cgoexpwrap_84ad20d147fe_proxy_gl_external_texture_frame_callback(0xc0000e6018, 0x2, 0x280, 0x168, 0x7000076de540, 0x42c5648b43b3fc6e)
_cgo_gotypes.go:655 +0x53 fp=0xc000056e90 sp=0xc000056e50 pc=0x4113183
runtime.call64(0x0, 0x7000076de420, 0x7000076de4b0, 0x30)
/usr/local/go/src/runtime/asm_amd64.s:520 +0x3b fp=0xc000056ee0 sp=0xc000056e90 pc=0x40554fb
runtime.cgocallbackg1(0x0)
/usr/local/go/src/runtime/cgocall.go:314 +0x177 fp=0xc000056f58 sp=0xc000056ee0 pc=0x4005987
runtime.cgocallbackg(0x0)
/usr/local/go/src/runtime/cgocall.go:191 +0xc5 fp=0xc000056fc0 sp=0xc000056f58 pc=0x4005775
runtime.cgocallback_gofunc(0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/runtime/asm_amd64.s:773 +0x9b fp=0xc000056fe0 sp=0xc000056fc0 pc=0x4056a4b
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc000056fe8 sp=0xc000056fe0 pc=0x4057171
goroutine 1 [syscall, locked to thread]:
github.com/go-gl/glfw/v3.2/glfw._Cfunc_glfwWaitEventsTimeout(0x3f9999999999999a)
_cgo_gotypes.go:1946 +0x41
github.com/go-gl/glfw/v3.2/glfw.WaitEventsTimeout(0x3f9999999999999a)
.../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/window.go:823 +0x2d
github.com/go-flutter-desktop/go-flutter.(*Application).Run.func9(0x3f9999999999999a)
.../go/pkg/mod/github.com/go-flutter-desktop/[email protected]/application.go:308 +0x2d
github.com/go-flutter-desktop/go-flutter.(*EventLoop).WaitForEvents(0xc0000d0210, 0x4218a78)
.../go/pkg/mod/github.com/go-flutter-desktop/[email protected]/event-loop.go:126 +0x3f8
github.com/go-flutter-desktop/go-flutter.(*Application).Run(0xc0000da000, 0x0, 0x0)
.../go/pkg/mod/github.com/go-flutter-desktop/[email protected]/application.go:307 +0xdbc
github.com/go-flutter-desktop/go-flutter.Run(0xc0000d00f0, 0x5, 0x6, 0x3, 0xc0000c7f78)
.../go/pkg/mod/github.com/go-flutter-desktop/[email protected]/application.go:22 +0x4d
main.main()
.../Documents/devPerso/examples/texture_tutorial/go/cmd/main.go:24 +0x189
goroutine 34 [runnable, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1337 +0x1
goroutine 35 [syscall]:
github.com/3d0c/gmf._Cfunc_avcodec_send_packet(0x8b27e00, 0xc00019d8c0, 0xc000000000)
_cgo_gotypes.go:2434 +0x4d
github.com/3d0c/gmf.(*CodecCtx).Decode.func2(0xc00016a020, 0xc00019d8c0, 0x0)
.../go/pkg/mod/github.com/3d0c/[email protected]/codecCtx_go112.go:566 +0xe2
github.com/3d0c/gmf.(*CodecCtx).Decode(0xc00016a020, 0xc00019d8c0, 0x0, 0x0, 0xffffffffffffffff, 0xc00017c2d8, 0x1)
.../go/pkg/mod/github.com/3d0c/[email protected]/codecCtx_go112.go:566 +0x6d
github.com/go-flutter-desktop/plugins/go-texture-example/example_video.(*ffmpegVideo).Stream(0xc000164040, 0xc00016a060)
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/video/ffmpeg-video.go:132 +0x18b
github.com/go-flutter-desktop/plugins/go-texture-example/example_video.(*VideoPlugin).InitPluginTexture.func2(0xc000012210, 0xc00016a060, 0xc0000fcb10)
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/video/main.go:60 +0xd7
created by github.com/go-flutter-desktop/plugins/go-texture-example/example_video.(*VideoPlugin).InitPluginTexture
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/video/main.go:57 +0xd0
goroutine 36 [sleep]:
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:307
time.Sleep(0x12a05f200)
/usr/local/go/src/runtime/time.go:105 +0x159
github.com/go-flutter-desktop/plugins/go-texture-example/example_image.(*ImagePlugin).InitPluginTexture.func1(0xc0000fcb40)
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/image/main.go:38 +0x34
created by github.com/go-flutter-desktop/plugins/go-texture-example/example_image.(*ImagePlugin).InitPluginTexture
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/image/main.go:37 +0x88
goroutine 20 [sleep]:
runtime.goparkunlock(...)
/usr/local/go/src/runtime/proc.go:307
time.Sleep(0x2625a00)
/usr/local/go/src/runtime/time.go:105 +0x159
github.com/go-flutter-desktop/plugins/go-texture-example/example_video.(*VideoPlugin).InitPluginTexture.func1()
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/video/main.go:51 +0x8d
github.com/go-flutter-desktop/plugins/go-texture-example/example_video.(*ffmpegVideo).Stream.func2(0xc00016a060, 0xc0000ae004)
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/video/ffmpeg-video.go:163 +0x27
created by github.com/go-flutter-desktop/plugins/go-texture-example/example_video.(*ffmpegVideo).Stream
.../Documents/devPerso/examples/texture_tutorial/go-texture-example/video/ffmpeg-video.go:162 +0x35e
hover: app 'texture_tutorial' exited with error: exit status 2
[...] gmf._Cfunc_avcodec_send_packet [....] this is related to gmf (the video plugin.)
In the same manner as my above comment, can you please try to run the example without the VideoPlugin?
@Drakirus
In windows.
use msys2.
$ hover run -b "@gl-3.3"
hover: Using engine from cache
hover: Cleaning the build directory
hover: failed to check your flutter channel: Unrecognized output formathover: Bundling flutter app
hover: Downloading 'go-flutter' @gl-3.3
go: finding github.com/go-flutter-desktop/go-flutter gl-3.3
go: finding github.com/go-gl/gl latest
go: finding github.com/go-gl/glfw latest
hover: 'go-flutter' is on version: v0.29.1-0.20190905111453-b8ad82c389c7
hover: Compiling 'go-flutter' and plugins
# pkg-config --cflags -- libavutil libavformat libavcodec libavcodec libavutil libavcodec libavcodec libavutil libavfilter libavformat libavdevice libavfilter libavcodec libavutil libavcodec libavutil libavutil libavcodec libavutil libavformat libavcodec libswresample libswscale libavcodec libavutil
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavformat was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavfilter was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavfilter.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavfilter' found
Package libavformat was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libavdevice was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavdevice.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavdevice' found
Package libavfilter was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavfilter.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavfilter' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
Package libavformat was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavformat.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavformat' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libswresample was not found in the pkg-config search path.
Perhaps you should add the directory containing `libswresample.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libswresample' found
Package libswscale was not found in the pkg-config search path.
Perhaps you should add the directory containing `libswscale.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libswscale' found
Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found
Package libavutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavutil' found
pkg-config: exit status 1
hover: Go build failed: exit status 2
But run pkg-config --libs libavformat
$ pkg-config --libs libavformat
-L/usr/local/ffmpeg/lib -L/mingw64/lib -L/usr/local/ffmpeg/lib -L/mingw64/lib -L/usr/local/ffmpeg/lib -lavformat -lm -lz -lsecur32 -lws2_32 -lavcodec -lm -lz -lole32 -luser32 -lswresample -lm -lavutil -lm -luser32 -lbcrypt
I shouldn't have ask you to run the texture_example.
I've updated the texture_tutorial, can you please retry?
@Drakirus It's running, but there's no video, no pictures, just white.
I found that the reason for this success is that you annotated the video plug-in code in options.go
@Drakirus It's running, but there's no video, no pictures, just white.
Hummm.
Are you not seeing this image?
Sorry, there was a picture at the beginning, but the warning was not wide enough.
When I widen it, it's just white.
When change the width set in options.go, the image is perfectly displayed, but simply drag the form wide and it disappears
Ok it's working as expected, the image should disappear after 5s of screen time.
OK, thank you.
But how fo fix video plugin ?
well, there is a BIG Disclaimer in the video_player repo..
You might have missed it.
Does your system works with the video-to-goImage gmf example?
Yes, I missed it, it is a problem with gmf.
Reopening this issue since we still need to decide whether or not we downgrade the OpenGL version from 4.1 to 3.3.
hover run -b '@gl-3.3' is only available for testing/debugging
I am running win10 on macos host via Parallels Desktop, and I don't know how it works on win10 host.
In windows. use msys2.
fix pkg-config:
pacman -S mingw-w64-x86_64-pkg-config
Can I build with gl-3.1?
@ykmnkmi can you update your OpenGL driver?
@Drakirus windows driver last update 2011, but works with gl-3.3 on linux.
Trying downgrade go-flutter
For now I want the default OpenGL version to be 3.3. As I'm not a OpenGL specialist, I've gather some information and 3.3 seems to be the 'sweet spot'.
https://www.reddit.com/r/opengl/comments/51htbk/what_is_the_best_opengl_version_to_start_with/
@ykmnkmi I cannot go lower than 3.2:
panic: InvalidValue: Context profiles are only defined for OpenGL version 3.2 and above
OpenGL is only needed for texture plugins (i.e.: video_player).
I'm working on adding hover flag to choose at compile-time whether or not you want to support texture plugins (and thus, having to compile go-flutter with a reference to OpenGL)
the flag will look somethings like this hover run --opengl=none
$ hover build --help
Flags:
--opengl string The OpenGL version specified here is only relevant for external texture plugin (i.e. video_plugin).
If 'none' is provided, texture won't be supported. Note: the Flutter Engine still needs a OpenGL compatible context. (default "3.3")
OpenGL is used in 2 way.
By default, we use GLFW/3.2 and OpenGL-bindings 3.3, so your system must be compatible with those versions (at least OpenGL 3.3 or above).
But if you don't have support for OpenGL 3.3. you could use the --opengl=none flag.
This flag will use OpenGL in one way:
ok thanks for explaining it.
I got this error while run "hover run -b '@gl-3.3'.
go get github.com/go-flutter-desktop/[email protected]: github.com/go-flutter-desktop/[email protected]: invalid version: unknown revision gl-3.3
This branch does not exist anymore,how can I solved this problem now ? thanks.
Well, hover run -b '@gl-3.3 is an older branch, which was deleted, as the error suggest.
Why do you want to use this very old branch?
Sorry,I just didn't know how this works.I just want to solve the problem in Win10 while I run "hover run":
Windows: Failed to create OpenGL context
update your graphic card driver or run
hover run --opengl=none
hover run --opengl=none can run,but not texture,it becames a white screen.My graphic card driver is newest also.
I won't be able to provide you a fix, sorry.
ok,thank U for your help also.