core icon indicating copy to clipboard operation
core copied to clipboard

The built exe file fails to open on Windows 11

Open karlio66 opened this issue 7 months ago • 2 comments

Describe the bug

I build the hello world project on Windows 11, the built exe file can't open window only create a process, but it runs normally on Windows 10.

How to reproduce

Windows version: windows 11 ltsc 2024 cogentcore version: 0.3.11 w64devkit version: 2.0.0 go version: 1.23.9 vulkaninfo: vulkaninfo.txt webgpuinfo: webgpuinfo.txt

Example code

package main

import "cogentcore.org/core/core"

func main() {
    // Create a new body (root container)
    b := core.NewBody()
    
    // Add a button with text
    core.NewButton(b).SetText("Hello, World!")
    
    // Run the main window
    b.RunMainWindow()
}

Relevant output


Platform

Windows

karlio66 avatar May 26 '25 10:05 karlio66

Thanks for filing this issue. From the webgpuinfo output, it looks like it is using a CPU backend for rendering instead of the correct GPU d3d12 backend. Can you try setting the GPU_DEVICE env variable through export GPU_DEVICE=1 and then see if it works? If so, then we need to adjust the logic for device selection.

Also, is it crashing when you run it on Windows 11, or is it just silently failing? If there is any output from the command, can you please share that?

kkoreilly avatar May 30 '25 19:05 kkoreilly

Thanks for filing this issue. From the webgpuinfo output, it looks like it is using a CPU backend for rendering instead of the correct GPU d3d12 backend. Can you try setting the GPU_DEVICE env variable through export GPU_DEVICE=1 and then see if it works? If so, then we need to adjust the logic for device selection.

Also, is it crashing when you run it on Windows 11, or is it just silently failing? If there is any output from the command, can you please share that?

@kkoreilly I added GPU_DEVICE=1 to system variable, but it still crashes. crash log: crash_2025-06-02_21-22-17.txt

karlio66 avatar Jun 02 '25 13:06 karlio66