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

failed to create texture from image #194

Open
RedHoodsDream opened this issue Jan 1, 2025 · 17 comments
Open

failed to create texture from image #194

RedHoodsDream opened this issue Jan 1, 2025 · 17 comments

Comments

@RedHoodsDream
Copy link

RedHoodsDream commented Jan 1, 2025

INF | 2025-01-01 | 18:40:06.316 | INF | 2025-01-01 | 18:40:06.316 | ERR | 2025-01-01 | 18:40:06.316 | failed to create texture from image
[github.com/ddkwork/unison.(*imageRef).contextImg] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/image.go:271
[github.com/ddkwork/unison.(*Canvas).DrawImageRectInRect] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/canvas.go:175
[github.com/ddkwork/unison.(*Canvas).DrawImageInRect] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/canvas.go:169
[github.com/ddkwork/unison.(*Image).DrawInRect] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/image.go:167
[github.com/ddkwork/unison.(*SizedDrawable).DrawInRect] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/drawable.go:36
[github.com/ddkwork/unison.DrawLabel] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/label.go:194
[github.com/ddkwork/unison.(*Button).DefaultDraw] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/button.go:202
[github.com/ddkwork/unison.(*Panel).Draw] C:/Users/admin/go/pkg/mod/github.com/ddkwork/[email protected]/panel.go:436

image

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

我的机器上是正常的,我再把那个库刷新一下,稍等一会

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

再试一波

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

或者清除构建缓存试试,实在不行我现在有空远程看看,或者让它在指定机器上复现。

@RedHoodsDream
Copy link
Author

RedHoodsDream commented Jan 1, 2025 via email

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

再刷新下提交试试
b7a0f06

@RedHoodsDream
Copy link
Author

RedHoodsDream commented Jan 1, 2025

image
似乎此处图片渲染存在问题

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

就是工具栏图标加载失败是吧?

@RedHoodsDream
Copy link
Author

RedHoodsDream commented Jan 1, 2025 via email

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

go clean -modcache
这个是清除模块缓存不是构建缓存,找到go-build目录 delete试试

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

所有图标除了windows窗口左上角的图标都加载失败


发件人: ddkwork @.>
发送时间: 2025年1月1日 21:49
收件人: HyperDbg/gui @.
>
抄送: PCRepairMan @.>; Author @.>
主题: Re: [HyperDbg/gui] failed to create texture from image (Issue #194)

就是工具栏图标加载失败是吧?


Reply to this email directly, view it on GitHub#194 (comment), or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6NOE5Z7QIZHNQP436B7VWD2IPW5RAVCNFSM6AAAAABUOQKONCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRXGAYTOMRSGE.
You are receiving this because you authored the thread.

检查下图标目录,应该是有图片文件的,不会是漏了吧?不可能啊,一直以来都没有类似的问题

@RedHoodsDream
Copy link
Author

image

图片资源都在D:\gui\ux\asserts文件夹下
image
但是在程序中没有类似上面的图片

image
我将go-build、原项目、模块缓存都删除然后重新clone了一份编译,依然有这个问题

另外我发现模块中有这样的SVG,同样没有加载过

image

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

来试下这个在你机器上编译是否正常
go run github.com/ddkwork/ux/demo

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

这真是个悬而未决的问题,遗憾的是我无法在我的机器上复现它。那么你只能自己调试代码了。

@RedHoodsDream
Copy link
Author

PS D:\gui> go run github.com/ddkwork/ux/demo
no required module provides package github.com/ddkwork/ux/demo; to add it:
go get github.com/ddkwork/ux/demo

PS D:\gui> go get github.com/ddkwork/ux/demo
go: github.com/ddkwork/ux/demo imports
github.com/ddkwork/keygen: cannot find module providing package github.com/ddkwork/keygen

或者可能是go的版本问题吗,确实是个奇特的问题,麻烦你了

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

等我刷新一下

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

两个仓库都刷新了依赖,两个仓库都试一下最新提交,说不定两个都正常了。

@ddkwork
Copy link
Contributor

ddkwork commented Jan 1, 2025

PS D:\gui> go run github.com/ddkwork/ux/demo
no required module provides package github.com/ddkwork/ux/demo; to add it:
go get github.com/ddkwork/ux/demo

PS D:\gui> go get github.com/ddkwork/ux/demo
go: github.com/ddkwork/ux/demo imports
github.com/ddkwork/keygen: cannot find module providing package github.com/ddkwork/keygen

或者可能是go的版本问题吗,确实是个奇特的问题,麻烦你了

应该不是go版本的问题,直接的原因可能是我使用工作区管理所有模块导致依赖刷新不同步造成的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants