Crash of KiCAD programs on any start after KiCAD was closed on secondary display (located left to primary display)

Description

KiCAD programs (eeschema, pcbnew, 3d view) crash at every start after kicad was closed while the respective programs were located on a secondary display that is left to the primary display. In my case, in the aforementioned scenario window -> pos_x in the settings file (e. g. eeschema.json) becomes less than zero, which leads to a reproducible crash on start.

GPU: NVIDIA RTX 3070 with current studio driver 516.59

As far as I know the only option to recover from this is to either change the json file or delete it, since a uninstall seems to preserve the settings.

Steps to reproduce

  1. Configure the displays, so that the secondary display is left.
  2. Start KiCAD on move eeschema (or potentially any other program) to a secondary display that is left to the primary display
  3. Close KiCAD via main windows
  4. Start eeschema

It might be possible to achieve the same result by simply replacing pos_x by a negative number.

KiCad Version

Application: KiCad (64-bit)

Version: (6.0.6), release build

Libraries:
	wxWidgets 3.1.6
	libcurl/7.82.0-DEV Schannel zlib/1.2.12

Platform: Windows 11 (build 22000), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
	Date: Jun 26 2022 02:39:06
	wxWidgets: 3.1.6 (wchar_t,wx containers)
	Boost: 1.79.0
	OCC: 7.6.0
	Curl: 7.82.0-DEV
	ngspice: 37
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

Note: Same behaviour with 6.0.5.

Edited by sbstnh