Blinue / Magpie

An all-purpose window upscaler for Windows 10/11.
GNU General Public License v3.0
9.76k stars 496 forks source link

In-game overlay crashes Magpie (localization bug) #649

Closed MuscularPuky closed 9 months ago

MuscularPuky commented 1 year ago

Magpie version 程序版本

from 0.10.3.0

Windows version 系统版本

Windows vNext NT 10.0.25381.1200 ~ 10.0.25387.1

Related screenshot (optional) 相关截图(可选)

https://github.com/Blinue/Magpie/assets/93962018/40cb63e8-eecf-4a57-b23a-c07d03428fe1

I wanna reproduce more but I spent each language 2 times so now all language crashes when open in-game overlay :( sad

Reproduction steps 复现步骤

This bug occures "second" time I open in-game overlay for each language. Once it crashes, in-game overlay keeps crashing ever within that language.

very very minor bug caused by above:

  1. window becomes square in win11 (still fullscreen mode)
  2. "Adjust cursor speed while scaled" corrupts mouse sensitivity (because of abnormal exit)

I suspect in-game overlay localization strongly.

Log files 日志文件

magpie.log

Blinue commented 1 year ago

It looks like a font cache error, but the log didn’t record any errors (as usual). Can you send me the cache folder?

MuscularPuky commented 1 year ago

oh there's several.

fonts_.zip

I deleted fonts_uk and fonts_zns then didn't crash in 3 langs. you're right it was cache problem.

MuscularPuky commented 1 year ago

Lanczos_1cfc88f88f10091e3.txt +default scaling mode cache. erase .txt

Blinue commented 1 year ago

The cache files are fine, I can’t reproduce the crash. As a temporary workaround, you can disable font caching in the developer options. I’m still investigating.

Blinue commented 1 year ago

I have tested it in a VM and I can’t reproduce this error, so this is a compatibility issue. I don’t know which configuration or software causes it.

oxideNeko233 commented 10 months ago

@Blinue

Opening the in-game overlay twice while in '3D game mode' crashes Magpie. It works fine if '3D game mode' is turned off.

Log ``` log 2024-01-30 13:18:58.152|info|XamlApp.cpp:bool __cdecl Magpie::XamlApp::Initialize(struct HINSTANCE__ *,const wchar_t *)|程序启动 版本:v0.10.5 管理员:否 2024-01-30 13:18:58.197|info|AppSettings.cpp:bool __cdecl winrt::Magpie::App::AppSettings::Initialize(void)|便携模式:否 2024-01-30 13:19:10.715|info|ShortcutService.cpp:auto __cdecl winrt::Magpie::App::ShortcutService::_LowLevelKeyboardProc::::()::::operator ()(void) const|热键 Scale 激活(Keyboard Hook) 2024-01-30 13:19:10.720|info|MagApp.cpp:bool __cdecl Magpie::Core::MagApp::_CreateHostWnd(void)|缩放窗口尺寸:2560x1600 2024-01-30 13:19:10.721|info|DeviceResources.cpp:bool __cdecl Magpie::Core::DeviceResources::Initialize(void)|可变刷新率支持:是 2024-01-30 13:19:10.745|info|DeviceResources.cpp:bool __cdecl Magpie::Core::DeviceResources::_TryCreateD3DDevice(struct IDXGIAdapter1 *) noexcept|已创建 D3D Device 功能级别:11.1 2024-01-30 13:19:10.745|info|DeviceResources.cpp:void __cdecl Magpie::Core::LogAdapter(const struct DXGI_ADAPTER_DESC1 &)|当前图形适配器: VendorId:0x10de DeviceId:0x28e0 描述:NVIDIA GeForce RTX 4060 Laptop GPU 2024-01-30 13:19:10.757|info|DeviceResources.cpp:bool __cdecl Magpie::Core::DeviceResources::_CreateSwapChain(void)|Hardware Composition 支持:是 2024-01-30 13:19:10.757|info|DeviceResources.cpp:bool __cdecl Magpie::Core::DeviceResources::_CreateSwapChain(void)|Multiplane Overlay 支持:是 2024-01-30 13:19:10.757|info|MagApp.cpp:bool __cdecl Magpie::Core::MagApp::_InitFrameSource(void)|当前捕获模式:Graphics Capture 2024-01-30 13:19:10.757|info|FrameSourceBase.cpp:bool __cdecl Magpie::Core::FrameSourceBase::Initialize(void)|已禁用窗口圆角 2024-01-30 13:19:10.835|info|GraphicsCaptureFrameSource.cpp:bool __cdecl Magpie::Core::GraphicsCaptureFrameSource::Initialize(void)|GraphicsCaptureFrameSource 初始化完成 2024-01-30 13:19:10.835|info|MagApp.cpp:bool __cdecl Magpie::Core::MagApp::_InitFrameSource(void)|源窗口尺寸:2263x1194 2024-01-30 13:19:10.836|info|Win32Utils.cpp:bool __cdecl Win32Utils::ReadFile(const wchar_t *,class std::vector > &)|读取文件:cache\Lanczos_1cfc88f88f10091e3 2024-01-30 13:19:10.836|info|EffectCacheManager.cpp:bool __cdecl Magpie::Core::EffectCacheManager::Load(class std::basic_string_view >,class std::basic_string_view >,struct Magpie::Core::EffectDesc &)|已读取缓存 cache\Lanczos_1cfc88f88f10091e3 2024-01-30 13:19:10.836|info|Renderer.cpp:bool __cdecl Magpie::Core::CompileEffect(bool,const struct Magpie::Core::EffectOption &,struct Magpie::Core::EffectDesc &)|编译 Lanczos.hlsl 用时 0.208 毫秒 2024-01-30 13:19:10.836|info|CursorManager.cpp:bool __cdecl Magpie::Core::CursorManager::Initialize(void)|CursorManager 初始化完成 2024-01-30 13:19:10.849|info|CursorManager.cpp:bool __cdecl Magpie::Core::CursorManager::GetCursorTexture(struct ID3D11Texture2D **,enum Magpie::Core::CursorManager::CursorType &)|已解析光标:0x10003 类型:Color 2024-01-30 13:19:10.854|info|CursorManager.cpp:bool __cdecl Magpie::Core::CursorManager::GetCursorTexture(struct ID3D11Texture2D **,enum Magpie::Core::CursorManager::CursorType &)|已解析光标:0x1001f 类型:Color 2024-01-30 13:19:42.375|info|ShortcutService.cpp:auto __cdecl winrt::Magpie::App::ShortcutService::_LowLevelKeyboardProc::::()::::operator ()(void) const|热键 Overlay 激活(Keyboard Hook) 2024-01-30 13:19:42.375|info|Win32Utils.cpp:bool __cdecl Win32Utils::ReadFile(const wchar_t *,class std::vector > &)|读取文件:cache\fonts_zh-hans 2024-01-30 13:19:42.383|info|OverlayDrawer.cpp:void __cdecl Magpie::Core::OverlayDrawer::SetUIVisibility(bool) noexcept|已开启覆盖层 ```
Config ``` json { "version": 1, "language": "", "theme": 2, "windowPos": { "centerX": 901.5, "centerY": 648.0, "width": 980.0, "height": 690.2857055664063, "maximized": false }, "shortcuts": { "scale": 2369, "overlay": 2372 }, "autoRestore": false, "countdownSeconds": 3, "developerMode": false, "debugMode": false, "disableEffectCache": false, "disableFontCache": false, "saveEffectSources": false, "warningsAreErrors": false, "allowScalingMaximized": false, "simulateExclusiveFullscreen": false, "alwaysRunAsAdmin": false, "showTrayIcon": false, "inlineParams": false, "autoCheckForUpdates": true, "checkForPreviewUpdates": false, "updateCheckDate": 17065919071225504, "downscalingEffect": { "name": "Bicubic", "parameters": { "paramB": 0.0, "paramC": 0.5 } }, "scalingModes": [ { "name": "Lanczos", "effects": [ { "name": "Lanczos", "scalingType": 1, "scale": { "x": 1.0, "y": 1.0 } } ] }, { "name": "FSR", "effects": [ { "name": "FSR\\FSR_EASU", "scalingType": 1, "scale": { "x": 1.0, "y": 1.0 } }, { "name": "FSR\\FSR_RCAS", "parameters": { "sharpness": 0.8700000047683716 } } ] }, { "name": "FSRCNNX", "effects": [ { "name": "FSRCNNX\\FSRCNNX" } ] }, { "name": "ACNet", "effects": [ { "name": "ACNet" } ] }, { "name": "Anime4K", "effects": [ { "name": "Anime4K\\Anime4K_Upscale_Denoise_L" } ] }, { "name": "CRT-Geom", "effects": [ { "name": "CRT\\CRT_Geom", "scalingType": 1, "scale": { "x": 1.0, "y": 1.0 }, "parameters": { "monitorGamma": 2.200000047683716, "cornerSize": 0.0010000000474974513, "curvature": 0.0, "interlace": 0.0, "CRTGamma": 1.5 } } ] }, { "name": "Integer Scale 2x", "effects": [ { "name": "Nearest", "scalingType": 0, "scale": { "x": 2.0, "y": 2.0 } } ] } ], "profiles": [ { "scalingMode": 0, "captureMethod": 0, "multiMonitorUsage": 0, "graphicsCard": -1, "disableWindowResizing": false, "3DGameMode": true, "showFPS": false, "VSync": true, "tripleBuffering": false, "captureTitleBar": false, "adjustCursorSpeed": true, "drawCursor": true, "disableDirectFlip": false, "cursorScaling": 2, "customCursorScaling": 1.0, "cursorInterpolationMode": 0, "croppingEnabled": false, "cropping": { "left": 0.0, "top": 0.0, "right": 0.0, "bottom": 0.0 } } ] } ```
Blinue commented 10 months ago

Opening the in-game overlay twice while in '3D game mode' crashes Magpie. It works fine if '3D game mode' is turned off.

This helps a lot, thank you!