Repository navigation
开机前查出谁还拿着截图共享内存,问题包里也记下来 - #168
Merged
Merged
Conversation
截图共享内存 SHM_videmulator<控制台端口> 只在模拟器共享画面时存在。实例没开时它还在,说明上次那台 模拟器退出后有程序(多半是 MAA 这类用截图的工具)还拿着它。同一端口的下一台模拟器拿回的是这块旧的, 分辨率调高后截图共享就开不起来;修复前的模拟器还会因此卡死、崩溃(ModAVD/ModAVD#210)。 - win.SharedMemoryHolders:读系统句柄表,找出拿着这块共享内存的其他进程。内核地址可见时按对象比; Windows 11 24H2 起看不到地址,就只复制共享内存类型的句柄、按名字比。最多花 3 秒,打不开的进程看不到。 - 开机拉起模拟器之前,发现这块共享内存已经在,就记一条警告,写出拿着它的程序和 pid,开机照常。 - 问题包:没在运行的实例留下的截图共享内存单独一节,写出拿着它的程序;没有就不出这一节。 Refs ModAVD/ModAVD#210
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs ModAVD/ModAVD#210
问题
截图共享内存
SHM_videmulator<控制台端口>只在模拟器共享画面时存在。实例没开时它还在,说明上次那台模拟器退出后,还有程序(多半是 MAA 这类用截图的工具)拿着它。同一端口的下一台模拟器拿回的是这块旧的;分辨率调高以后截图共享开不起来,0.41.0 以前的模拟器还会因此卡死、崩溃。用户只看到「开机后设置期间退出了」,看不出原因。改法
win.SharedMemoryHolders:读系统句柄表,找出拿着这块共享内存的其他进程。测试
go test ./internal/win/ ./internal/emu/ ./internal/report/通过;go vet ./...通过,GOOS=darwin、GOOS=linux下的go vet ./internal/...也通过。python.exe(pid …);