简体   繁体   English

退出状态-3221225477-in-terminal-in-golang

[英]exit-status-3221225477-in-terminal-in-golang

when I am trying to run the following golang code, the output in the terminal is "exit status 3221225477".当我尝试运行以下 golang 代码时,终端中的输出是“退出状态 3221225477”。 and then the program closed.然后程序关闭。 I am using fyne GUI package.我正在使用 fyne GUI 包。 can you please help me with this issue.你能帮我解决这个问题吗? package main包主

import (
"net/url"
"fyne.io/fyne"
"fyne.io/fyne/app"
"fyne.io/fyne/layout"
"fyne.io/fyne/theme"
"fyne.io/fyne/widget"
)

func main() {
app := app.New()
app.Settings().SetTheme(theme.LightTheme())
entry := widget.NewEntry()
entry.SetText("Path")

w := app.NewWindow("Hello")

link, err := url.Parse("https://www.inovatian.com/")
if err != nil {
fyne.LogError("Could not parse URL", err)
}

w.SetContent(widget.NewVBox(
widget.NewLabelWithStyle("Welcome to Inovatian App", 
fyne.TextAlignCenter, fyne.TextStyle{Bold: true}),
layout.NewSpacer(),

widget.NewHyperlinkWithStyle("inovatian", link, fyne.TextAlignCenter, 
fyne.TextStyle{}),
layout.NewSpacer(),

widget.NewGroup("",
    fyne.NewContainerWithLayout(layout.NewGridLayout(2),
        widget.NewButton("Next", func() {
            app.Quit()
        }),
        widget.NewButton("Cancel", func() {
            app.Quit()
        }),
      ),
    ),
))
w.CenterOnScreen()
w.Resize(fyne.NewSize(240, 180))
w.ShowAndRun()
}

Works on ubuntu (screenshot below).适用于 ubuntu(下面的屏幕截图)。

According to this , the return value 3221225477 in hex is 0xC0000005 or STATUS_ACCESS_VIOLATION, which go reports as "invalid memory address or nil pointer dereference". 据此,十六进制的返回值 3221225477 为 0xC0000005 或 STATUS_ACCESS_VIOLATION,报告为“无效内存地址或零指针取消引用”。 So it may be an issue in the windows version of the Fyne GUI library.所以这可能是 Windows 版本的 Fyne GUI 库的问题。

This Fyne issue might be related .这个 Fyne 问题可能与.

应用截图

Your source code works fine on macOS Mojave as well.您的源代码在 macOS Mojave 上也能正常工作。

应用程序

Though, I am getting a warning that 'NSOpenGLContext' has been explicitly marked deprecated in macOS 10.14.不过,我收到一条警告,指出“NSOpenGLContext”已在 macOS 10.14 中明确标记为已弃用。 (This should not come in Windows.) (这不应该出现在 Windows 中。)

NSOpenGLContext 已弃用

As Mark said, the return value 3221225477 in hex is 0xC0000005 ("Access violation"), it indicates that your program has terminated abnormally or crashed.正如马克所说,十六进制的返回值 3221225477 是 0xC0000005(“访问冲突”),它表示您的程序已异常终止或崩溃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM