Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on some Windows 10 computers with a built-in graphics card. #4033

Closed
RoyWeasly opened this issue Jul 6, 2023 · 18 comments
Closed
Labels
OS:Windows Tickets affecting only Microsoft Windows unverified A bug that has been reported but not verified

Comments

@RoyWeasly
Copy link

RoyWeasly commented Jul 6, 2023

Checklist

Describe the bug

The driver does not appear to support opengl

This error occurred on computers that use the Windows OS as the main one, and also use the built-in graphics card.
Unfortunately, the problem occurs on every computer that has an integrated video card, as I was able to find out, until 2013. At the same time, all drivers and OS were updated to the latest version. Moreover, on some computers, the OpenGL version was higher than 3.2.
To understand the scale of the problem, out of 10 computers with Windows OS on 4 with a built-in video card, the application did not start. Therefore, when the product is released, for a large part of users, this error will not allow using the application.
The following steps were taken to solve the problem:

  1. Complete system update
  2. Update/replace video card drivers
  3. Replacing opengl.dll libraries in the windows folder
  4. The method described in this thread: https://gist.github.com/rb-dahlb/26f316c5b6089807a139fc44ee69f0d1
  5. All kinds of system settings that are related to graphics
    To analyze the situation, the GPU-Z viewer program was installed, as a result, on several computers, it was found that OpenGL version 4.5 was installed on them, which is higher than the declared one. The screenshots below show the data of two graphics cards.

How to reproduce

Build the EXE file and run it on a Windows computer with an integrated graphics card such as Intel(R) HD Graphics 3000. The result will be the error you are looking for.

Screenshots

photo_2023-07-06_14-20-20
photo_2023-07-06_15-01-36
intel(r)hd

Example code

2023/07/05 08:08:14 Fyne error: window creation error
2023/07/05 08:08:14 Cause: APIUnavailable: WGL: The driver does not appear to support OpenGL

Fyne version

2.3.3

Go compiler version

1.20.4

Operating system and version

Windows 10 22H2

Additional Information

At the moment, I have not found any good solution to this problem that can help in the solution.
Is it possible to solve this error by adding some libraries to the code or installing third-party programs to minimize problems for users?

@RoyWeasly RoyWeasly added the unverified A bug that has been reported but not verified label Jul 6, 2023
@andydotxyz andydotxyz changed the title Fyne does not work on Windows 10 on computers with a built-in graphics card. The driver does not appear to support openGL. not working on some Windows 10 on computers with a built-in graphics card. Jul 6, 2023
@andydotxyz
Copy link
Member

Updated to reflect that it is some built-in graphics.

I have access to 3 windows computers with intel graphics and they work great.

@andydotxyz andydotxyz added the OS:Windows Tickets affecting only Microsoft Windows label Jul 6, 2023
@andydotxyz andydotxyz changed the title not working on some Windows 10 on computers with a built-in graphics card. Not working on some Windows 10 computers with a built-in graphics card. Jul 6, 2023
@RoyWeasly
Copy link
Author

To reproduce the problem, try running an application written using the fyne framework on a computer with a pre-2013 graphics card, such as Intel(R) HD Graphics. And the app won't work, won't even be able to create the main window.

@pedro-git-projects
Copy link

I am facing the same issue on a notebook that has a 2012 Intel® Core™ i5-460M processor and utilizes Intel HD Graphics on Windows 10 Pro. Any program using the framework builds fine but fails to run. Here is the stack trace for reference:

goroutine 20 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc0000abee0 sp=0xc0000abec0 pc=0x7ff70326b6d6
runtime.chanrecv(0xc000088180, 0xc0000abfb0, 0x1)
        C:/Program Files/Go/src/runtime/chan.go:583 +0x49d fp=0xc0000abf70 sp=0xc0000abee0 pc=0x7ff7032381fd
runtime.chanrecv2(0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/chan.go:447 +0x18 fp=0xc0000abf98 sp=0xc0000abf70 pc=0x7ff703237d38
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/common/window.go:34 +0x4d fp=0xc0000abfc8 sp=0xc0000abf98 pc=0x7ff7036eac6d
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1.1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/window.go:946 +0x26 fp=0xc0000abfe0 sp=0xc0000abfc8 pc=0x7ff70383e306
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000abfe8 sp=0xc0000abfe0 pc=0x7ff7032982c1
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/window.go:946 +0x136

goroutine 21 [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc0000adf50 sp=0xc0000adf30 pc=0x7ff70326b6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc0000adfe0 sp=0xc0000adf50 pc=0x7ff70324c7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000adfe8 sp=0xc0000adfe0 pc=0x7ff7032982c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 34 [GC worker (idle)]:
runtime.gopark(0x176775251ad24?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc00048ff50 sp=0xc00048ff30 pc=0x7ff70326b6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc00048ffe0 sp=0xc00048ff50 pc=0x7ff70324c7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00048ffe8 sp=0xc00048ffe0 pc=0x7ff7032982c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 35 [GC worker (idle)]:
runtime.gopark(0x176775251ad24?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000491f50 sp=0xc000491f30 pc=0x7ff70326b6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc000491fe0 sp=0xc000491f50 pc=0x7ff70324c7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000491fe8 sp=0xc000491fe0 pc=0x7ff7032982c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 36 [GC worker (idle)]:
runtime.gopark(0x176775251ad24?, 0xc000492040?, 0x1a?, 0x14?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc00048bf50 sp=0xc00048bf30 pc=0x7ff70326b6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc00048bfe0 sp=0xc00048bf50 pc=0x7ff70324c7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00048bfe8 sp=0xc00048bfe0 pc=0x7ff7032982c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 10 [chan receive]:
runtime.gopark(0xc00048de78?, 0xc00048ded0?, 0xb3?, 0x60?, 0xc00048ded0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc00048dea0 sp=0xc00048de80 pc=0x7ff70326b6d6
runtime.chanrecv(0xc0000894a0, 0xc00048df88, 0x1)
        C:/Program Files/Go/src/runtime/chan.go:583 +0x49d fp=0xc00048df30 sp=0xc00048dea0 pc=0x7ff7032381fd
runtime.chanrecv2(0xc0000894a0?, 0xc00048df98?)
        C:/Program Files/Go/src/runtime/chan.go:447 +0x18 fp=0xc00048df58 sp=0xc00048df30 pc=0x7ff703237d38
fyne.io/fyne/v2/internal/driver/glfw.catchTerm(0x0?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/driver.go:188 +0x8f fp=0xc00048dfc8 sp=0xc00048df58 pc=0x7ff7038333cf
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run.func1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/driver.go:168 +0x26 fp=0xc00048dfe0 sp=0xc00048dfc8 pc=0x7ff7038331e6
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00048dfe8 sp=0xc00048dfe0 pc=0x7ff7032982c1
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/driver.go:168 +0x6b

goroutine 22 [syscall]:
runtime.notetsleepg(0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/lock_sema.go:294 +0x3c fp=0xc000caffa0 sp=0xc000caff58 pc=0x7ff70323d81c
os/signal.signal_recv()
        C:/Program Files/Go/src/runtime/sigqueue.go:152 +0x2f fp=0xc000caffc0 sp=0xc000caffa0 pc=0x7ff703293ccf
os/signal.loop()
        C:/Program Files/Go/src/os/signal/signal_unix.go:23 +0x19 fp=0xc000caffe0 sp=0xc000caffc0 pc=0x7ff7038164b9
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000caffe8 sp=0xc000caffe0 pc=0x7ff7032982c1
created by os/signal.Notify.func1.1
        C:/Program Files/Go/src/os/signal/signal.go:151 +0x2a
rax     0x0
rbx     0xc000913d08
rcx     0x0
rdi     0xc000913d08
rsi     0xc000084000
rbp     0xc000913cd0
rsp     0xd0dadffa68
r8      0x320
r9      0x258
r10     0x0
r11     0x60005fba
r12     0x0
r13     0x0
r14     0xc0000841a0
r15     0x1e
rip     0x0

@andydotxyz
Copy link
Member

Thanks @pedro-git-projects I think the error message is missing from the top of the stack though. It should have 1 or two lines above that point that explain what sort of error was encountered...

@pedro-git-projects
Copy link

pedro-git-projects commented Jul 13, 2023

Apologies for any confusion caused earlier. I have re-run the program and obtained the following stack trace:

2023/07/13 11:04:01 Fyne error:  failed to initialise OpenGL
2023/07/13 11:04:01   Cause: glGetBufferParameteri64v
2023/07/13 11:04:01   At: C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/painter/gl/gl_core.go:69
Exception 0xc0000005 0x8 0x0 0x0
PC=0x0
signal arrived during external code execution

runtime.cgocall(0x7ff7a14f3f00, 0xc000913d08)
        C:/Program Files/Go/src/runtime/cgocall.go:157 +0x4a fp=0xc000913ce0 sp=0xc000913ca8 pc=0x7ff7a0db538a
github.com/go-gl/gl/v3.2-core/gl._Cfunc_glowViewport(0x0, 0x0, 0x0, 0x320, 0x258)
        _cgo_gotypes.go:24339 +0x4e fp=0xc000913d08 sp=0xc000913ce0 pc=0x7ff7a124ab8e
github.com/go-gl/gl/v3.2-core/gl.Viewport(...)
        C:/Users/ruindows/go/pkg/mod/github.com/go-gl/gl@v0.0.0-20211210172815-726fda9656d6/v3.2-core/gl/package.go:13473
fyne.io/fyne/v2/internal/painter/gl.(*coreContext).Viewport(0xc0000b6000?, 0xc000913d28?, 0xc000913d58?, 0x7ff7a1265dd1?, 0xc000913d40?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/painter/gl/gl_core.go:271 +0x34 fp=0xc000913d30 sp=0xc000913d08 pc=0x7ff7a12659f4
fyne.io/fyne/v2/internal/painter/gl.(*painter).SetOutputSize(0xc000a2de00, 0xc0000a4410?, 0x7ff7a1268500?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/painter/gl/painter.go:99 +0x38 fp=0xc000913d68 sp=0xc000913d30 
pc=0x7ff7a1265e58
fyne.io/fyne/v2/internal/driver/glfw.updateGLContext(0xc0000b2000)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/loop.go:274 +0x129 fp=0xc000913db0 sp=0xc000913d68 
pc=0x7ff7a13b5ae9
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).repaintWindow.func1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/loop.go:206 +0x7b fp=0xc000913e00 sp=0xc000913db0 pc=0x7ff7a13b561b
fyne.io/fyne/v2/internal/driver/glfw.(*window).RunWithContext(0xc0003913b0?, 0xc000913e30)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/window.go:907 +0x4f fp=0xc000913e20 sp=0xc000913e00 pc=0x7ff7a13bdd2f
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).repaintWindow(0xc000913e98?, 0xc000480100?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/loop.go:198 +0x4a fp=0xc000913e58 sp=0xc000913e20 pc=0x7ff7a13b556a
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).drawSingleFrame(0xc000913f90?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/loop.go:106 +0x1ac fp=0xc000913ef8 sp=0xc000913e58 
pc=0x7ff7a13b4dcc
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread.func1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/loop.go:254 +0x1a6 fp=0xc000913fe0 sp=0xc000913ef8 
pc=0x7ff7a13b5986
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000913fe8 sp=0xc000913fe0 pc=0x7ff7a0e182c1
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/loop.go:230 +0xea

goroutine 1 [select, locked to thread]:
runtime.gopark(0xc000917e68?, 0x3?, 0x80?, 0x7c?, 0xc000917e02?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000917c38 sp=0xc000917c18 pc=0x7ff7a0deb6d6
runtime.selectgo(0xc000917e68, 0xc000917dfc, 0xc000917db0?, 0x0, 0x7ff7a192d0e0?, 0x1)
        C:/Program Files/Go/src/runtime/select.go:327 +0x7be fp=0xc000917d78 sp=0xc000917c38 pc=0x7ff7a0df9c3e
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).runGL(0xc0003913b0)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/loop.go:125 +0x19f fp=0xc000917ea8 sp=0xc000917d78 
pc=0x7ff7a13b505f
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run(0xc0003913b0)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/driver.go:169 +0x75 fp=0xc000917ec8 sp=0xc000917ea8 pc=0x7ff7a13b3175
fyne.io/fyne/v2/internal/driver/glfw.(*window).ShowAndRun(0xc0000b2000)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/window.go:230 +0x2c fp=0xc000917ee0 sp=0xc000917ec8 pc=0x7ff7a13b8e6c
github.com/pedro-git-projects/toguishi-sharpening/src/gui.(*MainWindow).ShowAndRun(0xc00040a000)
        C:/Users/ruindows/Documents/dev/toguishi-sharpening/src/gui/mainwindow.go:47 +0x9b fp=0xc000917f10 sp=0xc000917ee0 pc=0x7ff7a13e9c7b
main.main()
        C:/Users/ruindows/Documents/dev/toguishi-sharpening/src/main.go:20 +0xd5 fp=0xc000917f80 sp=0xc000917f10 pc=0x7ff7a13ea295  
runtime.main()
        C:/Program Files/Go/src/runtime/proc.go:250 +0x1f7 fp=0xc000917fe0 sp=0xc000917f80 pc=0x7ff7a0deb2b7
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000917fe8 sp=0xc000917fe0 pc=0x7ff7a0e182c1

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc00005dfb0 sp=0xc00005df90 pc=0x7ff7a0deb6d6
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:387
runtime.forcegchelper()
        C:/Program Files/Go/src/runtime/proc.go:305 +0xb2 fp=0xc00005dfe0 sp=0xc00005dfb0 pc=0x7ff7a0deb4f2
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00005dfe8 sp=0xc00005dfe0 pc=0x7ff7a0e182c1
created by runtime.init.6
        C:/Program Files/Go/src/runtime/proc.go:293 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc00005ff80 sp=0xc00005ff60 pc=0x7ff7a0deb6d6
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:387
runtime.bgsweep(0x0?)
        C:/Program Files/Go/src/runtime/mgcsweep.go:319 +0xde fp=0xc00005ffc8 sp=0xc00005ff80 pc=0x7ff7a0dd587e
runtime.gcenable.func1()
        C:/Program Files/Go/src/runtime/mgc.go:178 +0x26 fp=0xc00005ffe0 sp=0xc00005ffc8 pc=0x7ff7a0dcaa46
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00005ffe8 sp=0xc00005ffe0 pc=0x7ff7a0e182c1
created by runtime.gcenable
        C:/Program Files/Go/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc000068000?, 0x7ff7a1a85688?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc00006ff70 sp=0xc00006ff50 pc=0x7ff7a0deb6d6
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:387
runtime.(*scavengerState).park(0x7ff7a1e7f8a0)
        C:/Program Files/Go/src/runtime/mgcscavenge.go:400 +0x53 fp=0xc00006ffa0 sp=0xc00006ff70 pc=0x7ff7a0dd3733
runtime.bgscavenge(0x0?)
        C:/Program Files/Go/src/runtime/mgcscavenge.go:633 +0x65 fp=0xc00006ffc8 sp=0xc00006ffa0 pc=0x7ff7a0dd3d45
runtime.gcenable.func2()
        C:/Program Files/Go/src/runtime/mgc.go:179 +0x26 fp=0xc00006ffe0 sp=0xc00006ffc8 pc=0x7ff7a0dca9e6
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00006ffe8 sp=0xc00006ffe0 pc=0x7ff7a0e182c1
created by runtime.gcenable
        C:/Program Files/Go/src/runtime/mgc.go:179 +0xaa

goroutine 5 [finalizer wait]:
runtime.gopark(0x1a0?, 0x7ff7a1e80380?, 0xa0?, 0xae?, 0xc000061f70?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000061e28 sp=0xc000061e08 pc=0x7ff7a0deb6d6
runtime.runfinq()
        C:/Program Files/Go/src/runtime/mfinal.go:193 +0x107 fp=0xc000061fe0 sp=0xc000061e28 pc=0x7ff7a0dc9aa7
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000061fe8 sp=0xc000061fe0 pc=0x7ff7a0e182c1
created by runtime.createfing
        C:/Program Files/Go/src/runtime/mfinal.go:163 +0x45

goroutine 6 [select]:
runtime.gopark(0xc000071f88?, 0x2?, 0x48?, 0xef?, 0xc000071f84?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000071e10 sp=0xc000071df0 pc=0x7ff7a0deb6d6
runtime.selectgo(0xc000071f88, 0xc000071f80, 0x0?, 0x0, 0x0?, 0x1)
        C:/Program Files/Go/src/runtime/select.go:327 +0x7be fp=0xc000071f50 sp=0xc000071e10 pc=0x7ff7a0df9c3e
database/sql.(*DB).connectionOpener(0xc0000468f0, {0x7ff7a1a8f6c8, 0xc000076730})
        C:/Program Files/Go/src/database/sql/sql.go:1218 +0x8d fp=0xc000071fb8 sp=0xc000071f50 pc=0x7ff7a0ec440d
database/sql.OpenDB.func1()
        C:/Program Files/Go/src/database/sql/sql.go:791 +0x2e fp=0xc000071fe0 sp=0xc000071fb8 pc=0x7ff7a0ec278e
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000071fe8 sp=0xc000071fe0 pc=0x7ff7a0e182c1
created by database/sql.OpenDB
        C:/Program Files/Go/src/database/sql/sql.go:791 +0x18d

goroutine 7 [syscall, locked to thread]:
runtime.cgocall(0x7ff7a0e19c40, 0xc000064ec0)
        C:/Program Files/Go/src/runtime/cgocall.go:157 +0x4a fp=0xc00006bb30 sp=0xc00006baf8 pc=0x7ff7a0db538a
syscall.SyscallN(0xc00006bbb0?, {0xc00006bbc8?, 0xc00005a000?, 0x4?})
        C:/Program Files/Go/src/runtime/syscall_windows.go:557 +0x109 fp=0xc00006bba8 sp=0xc00006bb30 pc=0x7ff7a0e14e29
syscall.Syscall6(0x0?, 0xc000074000?, 0x0?, 0xc00006bc70?, 0x3?, 0xc000353e40?, 0x0?, 0x300000000075c?)
        C:/Program Files/Go/src/runtime/syscall_windows.go:501 +0x50 fp=0xc00006bc08 sp=0xc00006bba8 pc=0x7ff7a0e14ab0
syscall.getQueuedCompletionStatus(0xc00006bcb0?, 0x7ff7a0db6f9d?, 0xc000040660?, 0xc00006be20?, 0xffffffff)
        C:/Program Files/Go/src/syscall/zsyscall_windows.go:836 +0x8a fp=0xc00006bc80 sp=0xc00006bc08 pc=0x7ff7a0e3aeca
syscall.GetQueuedCompletionStatus(0xc000353e40?, 0xc00002e8a0?, 0xc00006bd0c, 0xfff?, 0x0?)
        C:/Program Files/Go/src/syscall/syscall_windows.go:1285 +0x45 fp=0xc00006bcc0 sp=0xc00006bc80 pc=0x7ff7a0e37885
github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc000353e40)
        C:/Users/ruindows/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.4/windows.go:398 +0x7a fp=0xc00006bfc8 sp=0xc00006bcc0 pc=0x7ff7a13c6d1a
github.com/fsnotify/fsnotify.NewWatcher.func1()
        C:/Users/ruindows/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.4/windows.go:48 +0x26 fp=0xc00006bfe0 sp=0xc00006bfc8 pc=0x7ff7a13c5166
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00006bfe8 sp=0xc00006bfe0 pc=0x7ff7a0e182c1
created by github.com/fsnotify/fsnotify.NewWatcher
        C:/Users/ruindows/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.4/windows.go:48 +0x1d6

goroutine 8 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc00006deb0 sp=0xc00006de90 pc=0x7ff7a0deb6d6
runtime.chanrecv(0xc0000743c0, 0xc00006dfb8, 0x1)
        C:/Program Files/Go/src/runtime/chan.go:583 +0x49d fp=0xc00006df40 sp=0xc00006deb0 pc=0x7ff7a0db81fd
runtime.chanrecv2(0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/chan.go:447 +0x18 fp=0xc00006df68 sp=0xc00006df40 pc=0x7ff7a0db7d38
fyne.io/fyne/v2/app.watchFile.func1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/app/settings_desktop.go:43 +0x6c fp=0xc00006dfe0 sp=0xc00006df68 pc=0x7ff7a13cbcac
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00006dfe8 sp=0xc00006dfe0 pc=0x7ff7a0e182c1
created by fyne.io/fyne/v2/app.watchFile
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/app/settings_desktop.go:42 +0x111

goroutine 19 [select]:
runtime.gopark(0xc0000b1f68?, 0x2?, 0x0?, 0x0?, 0xc0000b1f00?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc0000b1d78 sp=0xc0000b1d58 pc=0x7ff7a0deb6d6
runtime.selectgo(0xc0000b1f68, 0xc0000b1efc, 0x0?, 0x0, 0x0?, 0x1)
        C:/Program Files/Go/src/runtime/select.go:327 +0x7be fp=0xc0000b1eb8 sp=0xc0000b1d78 pc=0x7ff7a0df9c3e
fyne.io/fyne/v2/internal/async.(*UnboundedFuncChan).processing(0xc0000920c0)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/async/chan_func.go:45 +0xf1 fp=0xc0000b1fc8 sp=0xc0000b1eb8 pc=0x7ff7a11488f1
fyne.io/fyne/v2/internal/async.NewUnboundedFuncChan.func1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/async/chan_func.go:22 +0x26 fp=0xc0000b1fe0 sp=0xc0000b1fc8 pc=0x7ff7a1148726
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000b1fe8 sp=0xc0000b1fe0 pc=0x7ff7a0e182c1
created by fyne.io/fyne/v2/internal/async.NewUnboundedFuncChan
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/async/chan_func.go:22 +0xf8

goroutine 20 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc0000abee0 sp=0xc0000abec0 pc=0x7ff7a0deb6d6
runtime.chanrecv(0xc000088180, 0xc0000abfb0, 0x1)
        C:/Program Files/Go/src/runtime/chan.go:583 +0x49d fp=0xc0000abf70 sp=0xc0000abee0 pc=0x7ff7a0db81fd
runtime.chanrecv2(0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/chan.go:447 +0x18 fp=0xc0000abf98 sp=0xc0000abf70 pc=0x7ff7a0db7d38
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/common/window.go:34 +0x4d fp=0xc0000abfc8 sp=0xc0000abf98 pc=0x7ff7a126ac6d
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1.1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/window.go:946 +0x26 fp=0xc0000abfe0 sp=0xc0000abfc8 pc=0x7ff7a13be306
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000abfe8 sp=0xc0000abfe0 pc=0x7ff7a0e182c1
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/window.go:946 +0x136

goroutine 21 [GC worker (idle)]:
runtime.gopark(0x1fe1f371878c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc0000adf50 sp=0xc0000adf30 pc=0x7ff7a0deb6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc0000adfe0 sp=0xc0000adf50 pc=0x7ff7a0dcc7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000adfe8 sp=0xc0000adfe0 pc=0x7ff7a0e182c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 34 [GC worker (idle)]:
runtime.gopark(0x7ff7a19ae990?, 0xc00040e020?, 0x1a?, 0x14?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000415f50 sp=0xc000415f30 pc=0x7ff7a0deb6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc000415fe0 sp=0xc000415f50 pc=0x7ff7a0dcc7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000415fe8 sp=0xc000415fe0 pc=0x7ff7a0e182c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 35 [GC worker (idle)]:
runtime.gopark(0x1fe1f371878c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000417f50 sp=0xc000417f30 pc=0x7ff7a0deb6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc000417fe0 sp=0xc000417f50 pc=0x7ff7a0dcc7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000417fe8 sp=0xc000417fe0 pc=0x7ff7a0e182c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 36 [GC worker (idle)]:
runtime.gopark(0x1fe1f371878c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000411f50 sp=0xc000411f30 pc=0x7ff7a0deb6d6
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1275 +0xf1 fp=0xc000411fe0 sp=0xc000411f50 pc=0x7ff7a0dcc7f1
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000411fe8 sp=0xc000411fe0 pc=0x7ff7a0e182c1
created by runtime.gcBgMarkStartWorkers
        C:/Program Files/Go/src/runtime/mgc.go:1199 +0x25

goroutine 10 [chan receive]:
runtime.gopark(0xc000413e78?, 0xc000413ed0?, 0xb3?, 0x60?, 0xc000413ed0?)
        C:/Program Files/Go/src/runtime/proc.go:381 +0xd6 fp=0xc000413ea0 sp=0xc000413e80 pc=0x7ff7a0deb6d6
runtime.chanrecv(0xc0000882a0, 0xc000413f88, 0x1)
        C:/Program Files/Go/src/runtime/chan.go:583 +0x49d fp=0xc000413f30 sp=0xc000413ea0 pc=0x7ff7a0db81fd
runtime.chanrecv2(0xc0000882a0?, 0xc000413f98?)
        C:/Program Files/Go/src/runtime/chan.go:447 +0x18 fp=0xc000413f58 sp=0xc000413f30 pc=0x7ff7a0db7d38
fyne.io/fyne/v2/internal/driver/glfw.catchTerm(0x0?)
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/driver.go:188 +0x8f fp=0xc000413fc8 sp=0xc000413f58 pc=0x7ff7a13b33cf
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run.func1()
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/driver.go:168 +0x26 fp=0xc000413fe0 sp=0xc000413fc8 pc=0x7ff7a13b31e6
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000413fe8 sp=0xc000413fe0 pc=0x7ff7a0e182c1
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run
        C:/Users/ruindows/go/pkg/mod/fyne.io/fyne/v2@v2.3.5/internal/driver/glfw/driver.go:168 +0x6b

goroutine 22 [syscall]:
runtime.notetsleepg(0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/lock_sema.go:294 +0x3c fp=0xc000c3bfa0 sp=0xc000c3bf58 pc=0x7ff7a0dbd81c
os/signal.signal_recv()
        C:/Program Files/Go/src/runtime/sigqueue.go:152 +0x2f fp=0xc000c3bfc0 sp=0xc000c3bfa0 pc=0x7ff7a0e13ccf
os/signal.loop()
        C:/Program Files/Go/src/os/signal/signal_unix.go:23 +0x19 fp=0xc000c3bfe0 sp=0xc000c3bfc0 pc=0x7ff7a13964b9
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000c3bfe8 sp=0xc000c3bfe0 pc=0x7ff7a0e182c1
created by os/signal.Notify.func1.1
        C:/Program Files/Go/src/os/signal/signal.go:151 +0x2a
rax     0x0
rbx     0xc000913d08
rcx     0x0
rdi     0xc000913d08
rsi     0xc000084000
rbp     0xc000913cd0
rsp     0xec3abffe08
r8      0x320
r9      0x258
r10     0x0
r11     0x60003f0c
r12     0x0
r13     0x0
r14     0xc0000841a0
r15     0x4
rip     0x0
rflags  0x10206
cs      0x33
fs      0x53
gs      0x2b
exit status 2

Thus it is also an OpenGL issue.

Note that this is my build recipe:

BJ_NAME = 
LDFLAGS = 
build:
	$(eval OBJ_NAME += toguishi)
	$(eval LDFLAGS += "-w -s -H=windowsgui")
	cd ./src; go build -v -ldflags $(LDFLAGS) -o $(OBJ_NAME); mv $(OBJ_NAME) ../bin

Finally, this program is working fine on another computer running the 6.3.9-arch1-1 kernel on Arch Linux.

@andydotxyz
Copy link
Member

Thanks @pedro-git-projects i think this may be a different issue to the one initially reported. Yours may have been fixed on develop branch already so if you're able to test that it would help.

@pedro-git-projects
Copy link

pedro-git-projects commented Jul 13, 2023

Created a binary using fyne install on the fyne_demo project from the develop branch using the devel version of the cli, however still got the same error. Because I need to deliver this app fast, I will be migrating my project to Gio, however, when I'm done I may comeback to try and help investigating this issue further.

image
image

@andydotxyz
Copy link
Member

I don't know why those functions are being called - they are only present from OpenGL 3.2 onwards - and we only use 2.0.

Is it possible that your GPU doesn't backwards support 2.0, or some other ways has limited gl compatibility?

@andydotxyz
Copy link
Member

Without access to the hardware there isn't much the team can do to resolve this. If anyone can provide remote access or direct hardware we can progress this issue.

@roffe
Copy link
Contributor

roffe commented Jul 27, 2023

Try unzipping the opengl32.dll from https://fdossena.com/?p=mesa/index.frag (32 or 64bit depending on what you are bulding) next to the built application. I distribute this file with some applications I make as some of my users has this exact problem.

This DLL will software emulate opengl with a hit to performance, but at least makes the software work in VM's and on machines with graphics cards with broken / missing opengl support.

Seems it's usually older machines with built in Intel graphics cards having this problem

@Klaus-Tockloth
Copy link

Klaus-Tockloth commented Jul 27, 2023

@roffe: Could you provide more details about the usage / installation of "opengl32.dll"?

Background: My use case is to run a Fyne application on Citrix with a totally outdated OpenGL version 1.1.

@Klaus-Tockloth
Copy link

To answer the question @roffe by myself: The REAME.txt for MESA3D says this:

MESA3D FOR WINDOWS -- http://mesa.fdossena.com

This library provides software rendering capabilities to OpenGL applications.
Note that software rendering is a LOT slower than 3D accelerators, so this library should only be used as a last resort, with old OpenGL games that won't run on newer hardware.

To use Mesa3D, simply extract opengl32.dll in the same directory as the application executable.
(right click the shortcut > Open File Location, this is where you should extract it)

(Great) Test result: The solution works for me on Citrix with "Windows 10 Enterprise" (64 bit).

@andydotxyz
Copy link
Member

Yeah that is a great result when your hardware does not support OpenGL >= 2.0.
What is a mystery on this ticket is why the app cannot connect to OpenGL on a system that reports supporting it.
Would be interesting to know if mesa's opengl32.dll would work though - another data point on a complex problem.

@RoyWeasly
Copy link
Author

The solution proposed by @roffe helped solve this problem. In the future, you can embed this library into your application to solve the problem at the development level.

@navossoc
Copy link

+1 on this, same issue.

@andydotxyz
Copy link
Member

Please test the develop branch as this should have been fixed there.

@navossoc
Copy link

@andydotxyz 2.4.1 don't work, but develop does.

Output from the Hello World example:

OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

attribute vec3 vert;
attribute vec2 vertTexCoord;
varying vec2 fragTexCoord;

void main() {
    fragTexCoord = vertTexCoord;

    gl_Position = vec4(vert, 1);
}
<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

uniform sampler2D tex;

varying vec2 fragTexCoord;

void main() {
    gl_FragColor = texture2D(tex, fragTexCoord);
}

<<< SHADER SOURCE
OpenGL program linking output:
No errors.

OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

attribute vec2 vert;
attribute vec2 normal;

uniform float lineWidth;

varying vec2 delta;

void main() {
    delta = normal * lineWidth;

    gl_Position = vec4(vert + delta, 0, 1);
}

<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

uniform vec4 color;
uniform float lineWidth;
uniform float feather;

varying vec2 delta;

void main() {
    float alpha = color.a;
    float distance = length(delta);

    if (feather == 0.0 || distance <= lineWidth - feather) {
        gl_FragColor = color;
    } else {
        gl_FragColor = vec4(color.r, color.g, color.b, mix(color.a, 0.0, (distance - (lineWidth - feather)) / feather));
    }
}

<<< SHADER SOURCE
OpenGL program linking output:
No errors.

OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

attribute vec2 vert;
attribute vec2 normal;

void main() {
    gl_Position = vec4(vert+normal, 0, 1);
}

<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

/* scaled params */
uniform vec2 frame_size;
uniform vec4 rect_coords; //x1 [0], x2 [1], y1 [2], y2 [3]; coords of the rect_frame
uniform float stroke_width;
/* colors params*/
uniform vec4 fill_color;
uniform vec4 stroke_color;


void main() {

    vec4 color = fill_color;

    if (gl_FragCoord.x >= rect_coords[1] - stroke_width ){
        color = stroke_color;
    } else if (gl_FragCoord.x <= rect_coords[0] + stroke_width){
        color = stroke_color;
    } else if (gl_FragCoord.y <= frame_size.y - rect_coords[3] + stroke_width ){
        color = stroke_color;
    } else if (gl_FragCoord.y >= frame_size.y - rect_coords[2] - stroke_width ){
        color = stroke_color;
    }

    gl_FragColor = color;
}

<<< SHADER SOURCE
OpenGL program linking output:
No errors.

OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

attribute vec2 vert;
attribute vec2 normal;

void main() {
    gl_Position = vec4(vert+normal, 0, 1);
}

<<< SHADER SOURCE
OpenGL shader compilation output:
No errors.

>>> SHADER SOURCE
#version 110

/* scaled params */
uniform vec2 frame_size;
uniform vec4 rect_coords; //x1 [0], x2 [1], y1 [2], y2 [3]; coords of the rect_frame
uniform float stroke_width_half;
uniform vec2 rect_size_half;
uniform float radius;
/* colors params*/
uniform vec4 fill_color;
uniform vec4 stroke_color;

float calc_distance(vec2 p, vec2 b, float r)
{
    vec2 d = abs(p) - b + vec2(r);
        return min(max(d.x, d.y), 0.0) + length(max(d, 0.0)) - r;
}

void main() {

    vec4 frag_rect_coords = vec4(rect_coords[0], rect_coords[1], frame_size.y - rect_coords[3], frame_size.y - rect_coords[2]);
    vec2 vec_centered_pos = (gl_FragCoord.xy - vec2(frag_rect_coords[0] + frag_rect_coords[1], frag_rect_coords[2] + frag_rect_coords[3]) * 0.5);

    float distance = calc_distance(vec_centered_pos, rect_size_half, radius - stroke_width_half);

    vec4 from_color = stroke_color; //Always the border color. If no border, this still should be set
    vec4 to_color = stroke_color; //Outside color

    if (stroke_width_half == 0.0)
    {
        from_color = fill_color;
        to_color = fill_color;
    }
    to_color[3] = 0.0; // blend the fill colour to alpha

    if (distance < 0.0)
    {
        to_color = fill_color;
    }

    distance = abs(distance) - stroke_width_half;

    float blend_amount = smoothstep(-1.0, 1.0, distance);

    // final color
    gl_FragColor = mix(from_color, to_color, blend_amount);
}

<<< SHADER SOURCE
OpenGL program linking output:
No errors.

@andydotxyz
Copy link
Member

Excellent thanks. This fix will be in v2.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS:Windows Tickets affecting only Microsoft Windows unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

6 participants