core icon indicating copy to clipboard operation
core copied to clipboard

Problems Encountered When Running Examples

Open qq1792569310 opened this issue 9 months ago • 1 comments

Describe the bug

Error in examples/video Directory

When running the example in the examples/video directory, the following error occurs:

# [pkg-config --cflags  -- libavformat libavcodec libavutil libswresample libavutil libavformat libavcodec libswscale libavutil libavformat libavcodec libswscale libswscale libavformat libavcodec libavutil libswscale libavformat libavcodec libavutil libswscale libavutil libavformat libavcodec libavutil libavutil libavformat libavcodec libswscale libavutil libavformat libavcodec libswscale]
pkg-config: could not find package 'libavformat'

This error likely occurs because the FFmpeg development libraries (containing libavformat, libavcodec, etc.) are not installed or not properly configured in the system. These libraries are typically required for video-related functionality, and pkg-config cannot locate them to generate compiler flags.

Application Crash on Windows 11 When Clicking Taskbar Icon

How to reproduce

1、Run the gpu/examples/phong on Windows 11. 2、Click or double-click the application icon in the Windows taskbar (bottom of the screen) while the program is running.

Example code


Relevant output

thread '<unnamed>' panicked at src\lib.rs:3974:36:
invalid texture
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Exception 0x20474343 0x21fc8b526f0 0x0 0x7ffefb06fe4c
PC=0x7ffefb06fe4c
signal arrived during external code execution

runtime.cgocall(0x7ff620a32846, 0xc000026ec8)
	D:/tool/golang/go1.23.4/src/runtime/cgocall.go:167 +0x3e fp=0xc000026e88 sp=0xc000026e20 pc=0x7ff62084bcbe
github.com/cogentcore/webgpu/wgpu._Cfunc_wgpuTextureGetMipLevelCount(0x0)
	_cgo_gotypes.go:3258 +0x55 fp=0xc000026ec8 sp=0xc000026e88 pc=0x7ff620990235
github.com/cogentcore/webgpu/wgpu.(*Texture).GetMipLevelCount.func1(0xc0005f3bb0)
	D:/tool/golang/gopath/pkg/mod/github.com/cogentcore/[email protected]/wgpu/texture.go:102 +0x53 fp=0xc000026f10 sp=0xc000026ec8 pc=0x7ff6209a53b3
github.com/cogentcore/webgpu/wgpu.(*Texture).GetMipLevelCount(0xc0005f3bb0)
	D:/tool/golang/gopath/pkg/mod/github.com/cogentcore/[email protected]/wgpu/texture.go:102 +0x25 fp=0xc000026f30 sp=0xc000026f10 pc=0x7ff6209a5325
cogentcore.org/core/gpu.(*Surface).GetCurrentTexture(0xc000070008)
	D:/project/core/gpu/surface.go:117 +0x133 fp=0xc000027028 sp=0xc000026f30 pc=0x7ff6209fb253
cogentcore.org/core/gpu.(*GraphicsSystem).beginRenderPass(0xc000114000)
	D:/project/core/gpu/gsystem.go:215 +0x7d fp=0xc0000270f0 sp=0xc000027028 pc=0x7ff6209f6c9d
cogentcore.org/core/gpu.(*GraphicsSystem).BeginRenderPass(0xc000114000)
	D:/project/core/gpu/gsystem.go:234 +0x5c fp=0xc0000271a0 sp=0xc0000270f0 pc=0x7ff6209f6f1c
cogentcore.org/core/gpu/phong.(*Phong).RenderStart(0xc000110008)
	D:/project/core/gpu/phong/phong.go:152 +0x125 fp=0xc000027270 sp=0xc0000271a0 pc=0x7ff620a26be5
main.main.func6()
	D:/project/core/gpu/examples/phong/phong.go:197 +0x13a fp=0xc0000273a8 sp=0xc000027270 pc=0x7ff620a2e4da
main.main()
	D:/project/core/gpu/examples/phong/phong.go:229 +0x21f6 fp=0xc000027f78 sp=0xc0000273a8 pc=0x7ff620a2e2d6
runtime.main()
	D:/tool/golang/go1.23.4/src/runtime/proc.go:272 +0x227 fp=0xc000027fe0 sp=0xc000027f78 pc=0x7ff62081f747
runtime.goexit({})
	D:/tool/golang/go1.23.4/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000027fe8 sp=0xc000027fe0 pc=0x7ff620858661

Platform

Windows

qq1792569310 avatar Apr 17 '25 03:04 qq1792569310

Error When Minimizing examples/demo Window

Reproduction Steps

1、Run the examples/demo. 2、Drag the window's height to the minimum.

this error as the same as the questions two (Application Crash on Windows 11 When Clicking Taskbar Icon)

my environment is windows11 and go1.23.4

qq1792569310 avatar Apr 17 '25 05:04 qq1792569310