Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.63k stars 578 forks source link

Error fi.Win10Stealthy.left && fi.Win10Stealthy.right && fi.Win10Stealthy.bottom at ConEmuSize.cpp Line 1680 #2011

Open webstech opened 5 years ago

webstech commented 5 years ago

Versions

ConEmu build: Local Build x64 OS version: Windows Win10 x64 Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): ??? cmd

Problem description

Running a local x64 debug build (cloned yesterday) while researching #1980 coming out of display sleep. There is one monitor. The build was done using VS2019.

  1. ConEmuSize::ReloadMonitorInfo is called. It shows an incorrect monitor size at that point (1600x1200) after enumerating the monitors.

  2. At line 1599, CreateWindowEx causes ::ReloadMonitorInfo to be called again. This time the monitor size is correct after enumerating the monitors.

  3. At line 1540, IsTaskbarAutoHidden causes ::ReloadMonitorInfo to be called again. This is all in the call stack.

  4. On the third invocation, RegisterClassEx fails at line 1597. None of the frame boundaries are set. This causes the assertion failure at line 1680.

Running with -log4 shows the multiple calls. 22:32:06.964 ReloadMonitorInfo 22:32:07.332 Msg007E(126): HWND=x000E0D46, W=x0000000000000020, L=x0000000008700F00 22:32:07.332 ReloadMonitorInfo 22:32:07.573 Msg007E(126): HWND=x000E0D46, W=x0000000000000020, L=x0000000008700F00 22:32:07.573 ReloadMonitorInfo 22:32:07.813 CConEmuMain::UnRegisterHooks() done 22:32:07.825 CEAssert PID=19580 TID=21040:: Assertion in C:\Users\chris\Documents\GitHub\ConEmu\Debug\ConEmu64.exe [191012] fi.Win10Stealthy.left && fi.Win10Stealthy.right && fi.Win10Stealthy.bottom

Documents\GitHub\ConEmu\src\ConEmu\ConEmuSize.cpp: 1680

Steps to reproduce

  1. Build on vs2019 after needed changes to config.
  2. Start ConEmu.
  3. Wait for screen to go blank (set to no screensaver).
  4. Move mouse to wake up screen.

Actual results

Issue subject error box pop-up.

Expected results

Additional files

Settings, screenshots, logs, etc.

webstech commented 5 years ago

Running with a non-debug version shows the three calls in the log. The third call does not show the DWMWA_EXTENDED_FRAME_BOUNDS log message which would indicate the register class call is failing. Going to build a non-debug version to see if this is an uninitialized storage problem. Zapping fi.Win10Stealthy.left to non-zero gets past the problem.

21:54:30.448 Msg007E(126): HWND=x00110FE6, W=x0000000000000020, L=x0000000004B00640 21:54:30.448 ReloadMonitorInfo 21:54:31.431 Msg007E(126): HWND=x00110FE6, W=x0000000000000020, L=x0000000008700F00 21:54:31.431 ReloadMonitorInfo 21:54:31.474 Msg007E(126): HWND=x00110FE6, W=x0000000000000020, L=x0000000008700F00 21:54:31.474 ReloadMonitorInfo 21:54:31.824 0: #00010001 dpi=144; Full: {0,0}-{3840,2160} (3840x2160); Work: {0,0}-{3840,2114} (3840x2114) 21:54:31.824 Caption: 11/4 {11,45}-{11,11}; NoCaption: 10/4 {10,10}-{10,10}; TaskBar: Bottom 21:54:31.824 WM_DISPLAYCHANGED: bpp=32, size={3840,2160} 21:54:31.878 0: #00010001 dpi=144; Full: {0,0}-{3840,2160} (3840x2160); Work: {0,0}-{3840,2114} (3840x2114) 21:54:31.878 Caption: 11/4 {11,45}-{11,11}; NoCaption: 10/4 {10,10}-{10,10}; TaskBar: Bottom 21:54:31.878 WM_DISPLAYCHANGED: bpp=32, size={3840,2160} 21:54:32.405 DWMWA_EXTENDED_FRAME_BOUNDS Visible={970,528}-{2870,1575} Real={960,528}-{2880,1585} Diff={10,0}-{10,10} 21:54:32.664 DWMWA_EXTENDED_FRAME_BOUNDS Visible={969,528}-{2871,1576} Real={960,528}-{2880,1585} Diff={9,0}-{9,9} 21:54:32.666 0: #00010001 dpi=144; Full: {0,0}-{3840,2160} (3840x2160); Work: {0,0}-{3840,2114} (3840x2114) 21:54:32.666 Caption: 11/1 {11,45}-{11,11}; NoCaption: 10/1 {10,10}-{10,10}; TaskBar: Bottom 21:54:32.666 WM_DISPLAYCHANGED: bpp=32, size={1600,1200}

webstech commented 5 years ago

Updated ConEmuSize.cpp after line 1473 to add:

#ifdef _DEBUG mi.noCaption.Win10Stealthy.left = 10; mi.withCaption.Win10Stealthy.left = 10; #endif

This gets around the problem but does not fix the underlying issue. Are the repeated calls expected?