Closed ddkwork closed 4 months ago
The RenderWindow: doing render: mitmproxy stopped unexpectedly-windowstage
messages indicate that the program is crashing, and then it is recovering from that crash and making a window displaying a crash error message, and it is failing while doing that as well. Can you try doing goosi.HandleRecover = goosi.HandleRecoverPanic
in your program and then tell me whether it still crashes like this or whether it crashes with a different message? That information will help me figure out the problem.
The
RenderWindow: doing render: mitmproxy stopped unexpectedly-windowstage
messages indicate that the program is crashing, and then it is recovering from that crash and making a window displaying a crash error message, and it is failing while doing that as well. Can you try doinggoosi.HandleRecover = goosi.HandleRecoverPanic
in your program and then tell me whether it still crashes like this or whether it crashes with a different message? That information will help me figure out the problem.
Recently about 8 applications crashed stack tracebacks have come here, all the same error, at first I thought it was a recursive writing that caused the heap memory release problem, now I suspect the problem of Vulkan's swap chain to release memory, and I don't understand goosi. HandleRecover = goosi. HandleRecoverPanic' how should this be done? Is it to include this code in an application that is expected to experience this crash?
There are several applications that have this crash: Task Manager, File Manager, Code, some demos that have been core, and some programs that I have made temporarily, unfortunately I can't force this crash, if you need more application crash information, I will store the crash logs of all the applications mentioned above in the subsequent time
goosi.HandleRecover = goosi.HandleRecoverPanic
is not a fix for the issue; it will just help me get more information about it. I can not reproduce this crash, so I need you to put that line in a core program, run it, get it to crash, and then send me the stack trace. Thanks!
goosi.HandleRecover = goosi.HandleRecoverPanic
is not a fix for the issue; it will just help me get more information about it. I can not reproduce this crash, so I need you to put that line in a core program, run it, get it to crash, and then send me the stack trace. Thanks!
Crash log saved in C:\Users\Admin\AppData\Roaming\Cogent Task Manager\crash-logs panic: vulkan error: vulkan error: out of host memory (-1) goroutine 16 [running]: runtime/debug.Stack() C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.6.windows-amd64/src/runtime/debug/stack.go:24 +0x5e cogentcore.org/core/gi.HandleRecover({0x7ff7c8c4f700, 0xc001cdfcb0}) D:/workspace/workspace/core/gi/recover.go:28 +0x52 cogentcore.org/core/gi.(*RenderWin).EventLoop.func1() D:/workspace/workspace/core/gi/renderwin.go:589 +0x24 panic({0x7ff7c8c4f700?, 0xc001cdfcb0?}) C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.6.windows-amd64/src/runtime/panic.go:914 +0x21f cogentcore.org/core/vgpu.IfPanic(...) D:/workspace/workspace/core/vgpu/errors.go:39 cogentcore.org/core/vgpu.(*Surface).ConfigSwapchain(0xc000322630) D:/workspace/workspace/core/vgpu/surface.go:254 +0xa66 cogentcore.org/core/vgpu.(*Surface).ReConfigSwapchain(0xc000322630) D:/workspace/workspace/core/vgpu/surface.go:302 +0x25 cogentcore.org/core/vgpu.(*Surface).AcquireNextImage(0xc000322630) D:/workspace/workspace/core/vgpu/surface.go:347 +0x10b cogentcore.org/core/vgpu/vdraw.(*Drawer).StartDraw(0xc00021c900, 0x7ff7c919a9e0?) D:/workspace/workspace/core/vgpu/vdraw/draw.go:234 +0xa7 cogentcore.org/core/gi.(*RenderWin).DrawScenes(0xc00033c0f0) D:/workspace/workspace/core/gi/renderwin.go:1036 +0x262 cogentcore.org/core/gi.(*RenderWin).RenderWindow(0xc00033c0f0) D:/workspace/workspace/core/gi/renderwin.go:1000 +0x379 cogentcore.org/core/gi.(*RenderWin).HandleWindowEvents(0xc00033c0f0, {0x7ff7c919fd90, 0xc000571880}) D:/workspace/workspace/core/gi/renderwin.go:651 +0x55f cogentcore.org/core/gi.(*RenderWin).HandleEvent(0xc00033c0f0, {0x7ff7c919fd90, 0xc000571880}) D:/workspace/workspace/core/gi/renderwin.go:636 +0xe5 cogentcore.org/core/gi.(*RenderWin).EventLoop(0xc00033c0f0) D:/workspace/workspace/core/gi/renderwin.go:603 +0x125 created by cogentcore.org/core/gi.(*RenderWin).GoStartEventLoop in goroutine 1 D:/workspace/workspace/core/gi/renderwin.go:557 +0xa5
Thanks! I will look into this further.
goosi.HandleRecover = goosi.HandleRecoverPanic
is not a fix for the issue; it will just help me get more information about it. I can not reproduce this crash, so I need you to put that line in a core program, run it, get it to crash, and then send me the stack trace. Thanks!
There were very few crashes today, I crashed more than 10 times the day before yesterday, but I feel like it's a memory leak today, because I didn't observe the process memory usage of the task manager before today. In order to reproduce the memory leak and vulkan's host memory overflow error, I think we can mock the following scenario: create a table widget, and add 50,000 rows to the table in a Ctrip without setting a delay, and force scrolling to the bottom of the table for each additional row.
<<<---------------<<<---------------<<<---------------<<< HTTP/1.1 200 OK Transfer-Encoding: chunked Connection: keep-alive Content-Type: application/x-javascript Date: Wed, 07 Feb 2024 10:22:09 GMT Etag: W/"65a73aee-1ad1" Last-Modified: Wed, 17 Jan 2024 02:26:54 GMT Server: BWS Strict-Transport-Security: max-age=31536000 Tracecode: 25703484672827727114020718 Vary: Accept-Encoding ---------------------------------------------------------------------------------------------------------------------------------------- panic: vulkan error: vulkan error: out of host memory (-1) [recovered] panic: vulkan error: vulkan error: out of host memory (-1) goroutine 39 [running]: cogentcore.org/core/goosi.HandleRecoverPanic({0x7ff6427921a0, 0xc000b63610}) D:/workspace/workspace/core/goosi/recover.go:85 +0x9a cogentcore.org/core/gi.(*RenderWin).EventLoop.func1() D:/workspace/workspace/core/gi/renderwin.go:589 +0x24 panic({0x7ff6427921a0?, 0xc000b63610?}) C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/panic.go:770 +0x132 cogentcore.org/core/vgpu.IfPanic(...) D:/workspace/workspace/core/vgpu/errors.go:39 cogentcore.org/core/vgpu.(*Surface).ConfigSwapchain(0xc0012228f0) D:/workspace/workspace/core/vgpu/surface.go:254 +0x906 cogentcore.org/core/vgpu.(*Surface).ReConfigSwapchain(0xc0012228f0) D:/workspace/workspace/core/vgpu/surface.go:302 +0x25 cogentcore.org/core/vgpu.(*Surface).AcquireNextImage(0xc0012228f0) D:/workspace/workspace/core/vgpu/surface.go:347 +0x105 cogentcore.org/core/vgpu/vdraw.(*Drawer).StartDraw(0xc000286908, 0x0) D:/workspace/workspace/core/vgpu/vdraw/draw.go:234 +0xa7 cogentcore.org/core/gi.(*RenderWin).DrawScenes(0xc00115c000) D:/workspace/workspace/core/gi/renderwin.go:1036 +0x262 cogentcore.org/core/gi.(*RenderWin).RenderWindow(0xc00115c000) D:/workspace/workspace/core/gi/renderwin.go:1000 +0x399 cogentcore.org/core/gi.(*RenderWin).HandleWindowEvents(0xc00115c000, {0x7ff643fa0290, 0xc001151ea0}) D:/workspace/workspace/core/gi/renderwin.go:651 +0x565 cogentcore.org/core/gi.(*RenderWin).HandleEvent(0xc00115c000, {0x7ff643fa0290, 0xc001151ea0}) D:/workspace/workspace/core/gi/renderwin.go:636 +0xe5 cogentcore.org/core/gi.(*RenderWin).EventLoop(0xc00115c000) D:/workspace/workspace/core/gi/renderwin.go:603 +0x125 created by cogentcore.org/core/gi.(*RenderWin).GoStartEventLoop in goroutine 1 D:/workspace/workspace/core/gi/renderwin.go:557 +0xa5 进程 已完成,退出代码为 2
package main
//go:generate core generate
import (
"cogentcore.org/core/gi"
"cogentcore.org/core/giv"
"cogentcore.org/core/icons"
)
type TableStruct struct { //gti:add
Icon icons.Icon
IntField int `default:"2"`
FloatField float32
StrField string
File gi.Filename
}
func main() {
tsttable := make([]*TableStruct, 0)
b := gi.NewBody("leak")
tv := giv.NewTableView(b, "tv")
tv.SetReadOnly(true)
tv.SetSlice(&tsttable)
go func() {
for i := 0; i < 100000; i++ {
tsttable = append(tsttable, &TableStruct{IntField: i, FloatField: float32(i) / 10.0})
tv.SetSlice(&tsttable)
if len(tsttable) > 0 {
tv.ScrollToIdx(len(tsttable) - 1)
}
}
}()
b.RunMainWindow()
}
![Uploading screenshots.gif…]()
GOROOT=C:\Users\Admin\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.22.0.windows-amd64 #gosetup GOPATH=C:\Users\Admin\go #gosetup C:\Users\Admin\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.22.0.windows-amd64\bin\go.exe build -o C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___go_build_github_com_ddkwork_workspace_leak.exe github.com/ddkwork/workspace/leak #gosetup C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___go_build_github_com_ddkwork_workspace_leak.exe panic: vulkan error: vulkan error: out of host memory (-1) ----- START OF STACK TRACE: ----- goroutine 38 [running]: runtime/debug.Stack() C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/debug/stack.go:24 +0x5e cogentcore.org/core/goosi.HandleRecoverBase({0x7ff6714b8560, 0xc002769170}) D:/workspace/workspace/core/goosi/recover.go:50 +0x4b cogentcore.org/core/gi.HandleRecover({0x7ff6714b8560, 0xc002769170}) D:/workspace/workspace/core/gi/recover.go:26 +0x4d cogentcore.org/core/gi.(*RenderWin).EventLoop.func1() D:/workspace/workspace/core/gi/renderwin.go:589 +0x24 panic({0x7ff6714b8560?, 0xc002769170?}) C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/panic.go:770 +0x132 cogentcore.org/core/vgpu.IfPanic(...) D:/workspace/workspace/core/vgpu/errors.go:39 cogentcore.org/core/vgpu.(*Surface).ConfigSwapchain(0xc000221ad0) D:/workspace/workspace/core/vgpu/surface.go:254 +0x906 cogentcore.org/core/vgpu.(*Surface).ReConfigSwapchain(0xc000221ad0) D:/workspace/workspace/core/vgpu/surface.go:302 +0x25 cogentcore.org/core/vgpu.(*Surface).AcquireNextImage(0xc000221ad0) D:/workspace/workspace/core/vgpu/surface.go:347 +0x105 cogentcore.org/core/vgpu/vdraw.(*Drawer).StartDraw(0xc000348008, 0x0) D:/workspace/workspace/core/vgpu/vdraw/draw.go:234 +0xa7 cogentcore.org/core/gi.(*RenderWin).DrawScenes(0xc000380000) D:/workspace/workspace/core/gi/renderwin.go:1036 +0x262 cogentcore.org/core/gi.(*RenderWin).RenderWindow(0xc000380000) D:/workspace/workspace/core/gi/renderwin.go:1000 +0x399 cogentcore.org/core/gi.(*RenderWin).HandleWindowEvents(0xc000380000, {0x7ff671a047e8, 0xc002760ee0}) D:/workspace/workspace/core/gi/renderwin.go:651 +0x565 cogentcore.org/core/gi.(*RenderWin).HandleEvent(0xc000380000, {0x7ff671a047e8, 0xc002760ee0}) D:/workspace/workspace/core/gi/renderwin.go:636 +0xe5 cogentcore.org/core/gi.(*RenderWin).EventLoop(0xc000380000) D:/workspace/workspace/core/gi/renderwin.go:603 +0x125 created by cogentcore.org/core/gi.(*RenderWin).GoStartEventLoop in goroutine 1 D:/workspace/workspace/core/gi/renderwin.go:557 +0xa5 ----- END OF STACK TRACE ----- 2024/02/07 04:44:54 SAVED CRASH LOG TO C:\Users\Admin\AppData\Roaming\leak\crash-logs\crash_2024-02-07_04-44-54 进程 已完成,退出代码为 -1073740940 (0xC0000374)
I've finally found a way to reproduce the bug every time: minimizing the main window. However, I have the impression that in addition to this operation, there are other operations that can also cause this bug, such as not moving the main window for a long time, and then pulling the scroll bar, and there are several other operations that I can't remember clearly, and there seem to be many ways to trigger this bug, but not all of them work. In addition, after a commit, the selected row seems to become stuttering or has a noticeable delay. More test scenarios are to dynamically populate slices, tables, maps, trees and other data collection widgets in Ctrip and refresh or scroll operations, like a task manager, and at the same time can adjust the global theme or something, along with these operations, you will find a lot of panic.
GOROOT=C:\Users\Admin\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.22.0.windows-amd64 #gosetup GOPATH=C:\Users\Admin\go #gosetup C:\Users\Admin\go\pkg\mod\golang.org\toolchain@v0.0.1-go1.22.0.windows-amd64\bin\go.exe build -o C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___go_build_cogentcore_org_cogent_taskmanager.exe cogentcore.org/cogent/taskmanager #gosetup C:\Users\Admin\AppData\Local\JetBrains\GoLand2023.3\tmp\GoLand\___go_build_cogentcore_org_cogent_taskmanager.exe panic: vulkan error: vulkan error: out of host memory (-1) [recovered] panic: vulkan error: vulkan error: out of host memory (-1) goroutine 20 [running]: cogentcore.org/core/goosi.HandleRecoverPanic({0x7ff6857889a0, 0xc0030b8ca0}) D:/workspace/workspace/core/goosi/recover.go:85 +0x9a cogentcore.org/core/gi.(*RenderWin).EventLoop.func1() D:/workspace/workspace/core/gi/renderwin.go:589 +0x24 panic({0x7ff6857889a0?, 0xc0030b8ca0?}) C:/Users/Admin/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.windows-amd64/src/runtime/panic.go:770 +0x132 cogentcore.org/core/vgpu.IfPanic(...) D:/workspace/workspace/core/vgpu/errors.go:39 cogentcore.org/core/vgpu.(*Surface).ConfigSwapchain(0xc00031cbb0) D:/workspace/workspace/core/vgpu/surface.go:254 +0x906 cogentcore.org/core/vgpu.(*Surface).ReConfigSwapchain(0xc00031cbb0) D:/workspace/workspace/core/vgpu/surface.go:302 +0x25 cogentcore.org/core/vgpu.(*Surface).AcquireNextImage(0xc00031cbb0) D:/workspace/workspace/core/vgpu/surface.go:347 +0x105 cogentcore.org/core/vgpu/vdraw.(*Drawer).StartDraw(0xc00036c008, 0x0) D:/workspace/workspace/core/vgpu/vdraw/draw.go:234 +0xa7 cogentcore.org/core/gi.(*RenderWin).DrawScenes(0xc0002ce690) D:/workspace/workspace/core/gi/renderwin.go:1036 +0x262 cogentcore.org/core/gi.(*RenderWin).RenderWindow(0xc0002ce690) D:/workspace/workspace/core/gi/renderwin.go:1000 +0x399 cogentcore.org/core/gi.(*RenderWin).HandleWindowEvents(0xc0002ce690, {0x7ff685cdab50, 0xc0003710a0}) D:/workspace/workspace/core/gi/renderwin.go:651 +0x565 cogentcore.org/core/gi.(*RenderWin).HandleEvent(0xc0002ce690, {0x7ff685cdab50, 0xc0003710a0}) D:/workspace/workspace/core/gi/renderwin.go:636 +0xe5 cogentcore.org/core/gi.(*RenderWin).EventLoop(0xc0002ce690) D:/workspace/workspace/core/gi/renderwin.go:603 +0x125 created by cogentcore.org/core/gi.(*RenderWin).GoStartEventLoop in goroutine 1 D:/workspace/workspace/core/gi/renderwin.go:557 +0xa5 进程 已完成,退出代码为 2
For me, running your example code on macOS results in a different panic, panic: interface conversion: ki.Ki is nil, not *gi.Label
, and minimizing the window causes no problems. I will test this on Windows later today and get back to you then; once I can reproduce the bug, I will work on fixing it.
For me, running your example code on macOS results in a different panic,
panic: interface conversion: ki.Ki is nil, not *gi.Label
, and minimizing the window causes no problems. I will test this on Windows later today and get back to you then; once I can reproduce the bug, I will work on fixing it.
The issue mentioned here was again triggered by the demo https://github.com/cogentcore/core/discussions/858
That issue is a symptom of another problem, and the solution is not to guard every assertion. I will look into this further.
I can not reproduce the vulkan error by using your example code, minimizing the main window, or resizing the window a lot. I can not debug this issue until I can reproduce it, so it would be great if you could find a deterministic way to reproduce it.
I can not reproduce the vulkan error by using your example code, minimizing the main window, or resizing the window a lot. I can not debug this issue until I can reproduce it, so it would be great if you could find a deterministic way to reproduce it.
Please link to my machine via code with me or remote software, this is the only way I can reproduce it every time
Can you go to your Windows settings and copy and paste your device specifications and Windows specifications? Also, can you run vulkaninfo --summary
and then copy and paste the output of that? That information will help me figure out what is going on.
vulkaninfo --summary
Vulkan Instance Version: 1.2.176
VK_EXT_debug_report : extension revision 10 VK_EXT_debug_utils : extension revision 2 VK_EXT_swapchain_colorspace : extension revision 4 VK_KHR_device_group_creation : extension revision 1 VK_KHR_external_fence_capabilities : extension revision 1 VK_KHR_external_memory_capabilities : extension revision 1 VK_KHR_external_semaphore_capabilities : extension revision 1 VK_KHR_get_physical_device_properties2 : extension revision 2 VK_KHR_get_surface_capabilities2 : extension revision 1 VK_KHR_surface : extension revision 25 VK_KHR_win32_surface : extension revision 5
GPU0: apiVersion = 4202690 (1.2.194) driverVersion = 1655787 (0x1943eb) vendorID = 0x8086 deviceID = 0x9a40 deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU deviceName = Intel(R) Iris(R) Xe Graphics driverID = DRIVER_ID_INTEL_PROPRIETARY_WINDOWS driverName = Intel Corporation driverInfo = Intel driver conformanceVersion = 1.2.6.1 GPU1: apiVersion = 4202690 (1.2.194) driverVersion = 1655787 (0x1943eb) vendorID = 0x8086 deviceID = 0x9a40 deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU deviceName = Intel(R) Iris(R) Xe Graphics driverID = DRIVER_ID_INTEL_PROPRIETARY_WINDOWS driverName = Intel Corporation driverInfo = Intel driver conformanceVersion = 1.2.6.1
C:\Users\Admin\Desktop>
Thank you for the information, I will try to reproduce the crash on a Windows computer with an integrated GPU and a lower Vulkan SDK version.
Thank you for the information, I will try to reproduce the crash on a Windows computer with an integrated GPU and a lower Vulkan SDK version.
Device name DESKTOP-QEKGQEC Processor 11th Gen Intel(R) Core(TM) i7-1160G7 @ 1.20GHz 2.11 GHz Installed RAM 16.0 GB (15.8 GB usable) Device ID 39AB8C5A-810D-4404-9128-38EFFAB964CC Product ID 00330-80000-00000-AA310 System type 64-bit operating system, x64-based processor Pen and touch Pen and touch support with 10 touch points
Edition Windows 11 Pro Version 23H2 Installed on 11/6/2023 OS build 22631.2506 Experience Windows Feature Experience Pack 1000.22677.1000.0
If the environment configuration is difficult to reproduce, please use anydesk to link to my machine, this panic happens several times a day on average, I tried to find a way to upgrade Vulkan, but the official website of my tablet does not provide these custom operations, as long as a series of hardware such as unofficial drivers and sound cards are installed, there will be problems
I will consider that after I try the other Windows computer, which I plan to do tomorrow.
I didn't have enough time to try this today, but I will try it tomorrow.
Can you try my new fix for the Vulkan panic that I implemented in fb9da93cb1f97362caa37939348ee49a3f823e8a?
Hello, I did a further judgment on the size of the swap chain in another place, otherwise it will be forced to quit by some mysterious signal from the CGO. Now I don't panic anymore, but the interface doesn't seem to draw anymore after a certain amount of time, maybe you can easily change it, please link to my machine and take a look. 1957149762
---Original--- From: @.> Date: Mon, Feb 19, 2024 02:22 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] panic: vulkan error: vulkan error: out of hostmemory (-1) (Issue #868)
Can you try my new fix for the Vulkan panic that I implemented in fb9da93?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Can you try my new fix for the Vulkan panic that I implemented in fb9da93?
func (sf *Surface) AcquireNextImage() uint32 {
// Read sf.Surface capabilities
var surfaceCapabilities vk.SurfaceCapabilities
IfPanic(NewError(vk.GetPhysicalDeviceSurfaceCapabilities(sf.GPU.GPU, sf.Surface, &surfaceCapabilities)))
surfaceCapabilities.Deref()
dev := sf.Device.Device
for {
vk.WaitForFences(dev, 1, []vk.Fence{sf.RenderFence}, vk.True, vk.MaxUint64)
vk.ResetFences(dev, 1, []vk.Fence{sf.RenderFence})
// Setup swapchain parameters
var swapchainSize vk.Extent2D
surfaceCapabilities.CurrentExtent.Deref()
if surfaceCapabilities.CurrentExtent.Width == vk.MaxUint32 {
w, h := sf.Format.Size32()
swapchainSize.Width = w
swapchainSize.Height = h
} else {
swapchainSize = surfaceCapabilities.CurrentExtent
}
if swapchainSize.Width == 0 || swapchainSize.Height == 0 {
//vk.WaitForFences(dev, 1, []vk.Fence{sf.RenderFence}, vk.True, vk.MaxUint64)
//vk.ResetFences(dev, 1, []vk.Fence{sf.RenderFence})
continue //todo add a chan when window is not mini and continue loop,last it should be working
}
var idx uint32
ret := vk.AcquireNextImage(dev, sf.Swapchain, vk.MaxUint64, sf.ImageAcquired, vk.NullFence, &idx)
switch ret {
case vk.ErrorOutOfDate, vk.Suboptimal:
sf.ReConfigSwapchain()
if Debug {
fmt.Printf("vgpu.Surface.AcquireNextImage, new format: %#v\n", sf.Format)
}
continue // try again
case vk.Success:
return idx
default:
IfPanic(NewError(ret))
return idx
}
}
}
Did you try the latest version first? It may have fixed the CGO signal. If it didn't, then I can debug on your computer soon.
Tried it
---Original--- From: @.> Date: Mon, Feb 19, 2024 09:19 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] panic: vulkan error: vulkan error: out of hostmemory (-1) (Issue #868)
Did you try the latest version first? It may have fixed the CGO signal. If it didn't, then I can debug on your computer soon.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
OK, I will be able to debug this on your computer either later today or tomorrow.
OK, I will be able to debug this on your computer either later today or tomorrow.
Here ret := vk. AcquireNextImage(dev, sf. swap chain, vk.) MaxUint64, sq. ft. ImageAcquired, vk. NullFence, &idx) will cause signal arrived during external code execution, then I have a logic: before this code we determine the size of the Swapchain if it is 0, we assume that the window is minimized or the minimize button is clicked, and in this state an infinite loop occurs: signal arrived during external code execution, I've tried to determine that the Swapchain size is 0 and the same result is to execute continue, then we need to pass a chan outside to tell it if it's minimized, if yes, pause the rendering, but I'm not sure if func (sf *Surface) AcquireNextImage() uint32 is in a separate goroutines, if not if we add select{} code after might make the program freeze, if it is: we just tell it in chan: this is not a minimized behavior, and then proceed to AcquireNextImage. I don't know if this disguised logic is feasible, and I've also observed the log of window events, and features such as minimized flags seem to be passed correctly.
from gpt: Yes, when the window is minimized, it is usually necessary to release the Vulkan swap chain. Swap chains are a mechanism used to display images on the surface of a window, and when the window is minimized, the swap chain usually needs to be released to avoid wasting resources and wasting system performance.
Releasing a swap chain typically requires the following steps:
These steps ensure that when the window is minimized, the swap chain resources are freed up to avoid wasting resources, and that the swap chain can be recreated if needed so that it can render properly when the window is restored.
I will think about this more and work on fixing this tomorrow. The minimization with the -
(minus) button works, right? It is only the taskbar minimization that doesn't work?
I will think about this more and work on fixing this tomorrow. The minimization with the
-
(minus) button works, right? It is only the taskbar minimization that doesn't work?
No, I've tried it several times, and both minimizing the button and minimizing via the taskbar panics
I thought it used to work after my previous fix a week ago?
This is indeed a mysterious panic, and the previous fix has indeed been normal for a week or so
---Original--- From: @.> Date: Mon, Feb 19, 2024 14:37 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] panic: vulkan error: vulkan error: out of hostmemory (-1) (Issue #868)
I thought it used to work after my previous fix a week ago?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
It only panics in the async
example, not the demo, right?
I'm sorry I don't know when I fell asleep, and the demo does, but it's not easy to switch between minimization and restore without stopping, but I managed to make it happen
---Original--- From: @.> Date: Tue, Feb 20, 2024 03:51 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] panic: vulkan error: vulkan error: out of hostmemory (-1) (Issue #868)
It only panics in the async example, not the demo, right?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I am ready to debug this on your computer whenever you are.
yes
---Original--- From: @.> Date: Tue, Feb 20, 2024 08:58 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] panic: vulkan error: vulkan error: out of hostmemory (-1) (Issue #868)
I am ready to debug this on your computer whenever you are.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I am ready to debug this on your computer whenever you are.
1957149762
Can you try the potential fix I implemented in ea3e656?
I finally upgraded vulkan from 1.2x to 1.3 version through the latest version of the graphics card driver, although it is not the latest version, but this is the latest version that comes with the official driver, it is a 681mb installation package, I looked for a long time to find it, because the official website of Huawei tablet did not guide me to the correct link to the official website of Intel, it only provides a computer manager to operate this thing, however it only provides vulkan1.2 version. But after manually upgrading the VK version, the problem is still the same, you can check the VK related information on my computer, then it can't be a bug of the VK driver, I feel, this host memory error is a mysterious error, the other day you said that the example under the goosi package needs additional code to make it work, so you can write it, let the code of that demo be logical, maybe we can see other errors through it, what do you think?
Because installing the graphics driver on the previous Win11 system prompted me to install net7,However, it failed to install,In desperation, I reinstalled the system,After successfully installing net7 and the graphics driver on the new system,The current system and driver are clean environments。
my system iso is from https://windowsxlite.com/micro11/
As I said previously, I now understand what the cause of the issue is, and I should be able to fix it. I am surprised that my previous fix did not work, and I will debug it more on your computer later today. Please do not try to fix it by changing your graphics drivers, as even if that did fix it, I want to fix the underlying cause of the issue so that this does not happen for anyone again.
ok
---Original--- From: @.> Date: Tue, Feb 20, 2024 23:40 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] panic: vulkan error: vulkan error: out of hostmemory (-1) (Issue #868)
As I said previously, I now understand what the cause of the issue is, and I should be able to fix it. I am surprised that my previous fix did not work, and I will debug it more on your computer later today. Please do not try to fix it by changing your graphics drivers, as even if that did fix it, I want to fix the underlying cause of the issue so that this does not happen for anyone again.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I am ready to debug this on your computer whenever you are.
yes 1670379990
---Original--- From: @.> Date: Wed, Feb 21, 2024 07:54 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] panic: vulkan error: vulkan error: out of hostmemory (-1) (Issue #868)
I am ready to debug this on your computer whenever you are.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I am ready.
Hi, please go back to my machine again, it seems that the memory is leaking
Describe the bug
panic: vulkan error: vulkan error: out of host memory (-1)
How to reproduce
It's a bug that has been bothering me for a long time, I can't reproduce it every time, so I can't write a demo, and I've had dozens of crashes with the same error in recent times
Example code
Relevant output
Platform
windows