Skip to content

Various locale settings crash WB on boot #610

@Utumno

Description

@Utumno

Ok this is the number one bug in the whole of wrye bash development.

There, I said it.

It reared its ugly head again here: https://discord.com/channels/537706885965676554/537710082755133460/890610560838823976

Wrye Bash 310.202108251532 CTD when instaled into enderal special edition folder. complete and standalone executable. no antivirus running. tryed in administrator mod. tryed to re-download and reinstall wrye bash. this did not happen before. anything important changed recently?
same crash happen when installed into skyrim se. something about a C++ version mismatch. very small crash log.    """"" ; Traceback (most recent call last):
  File "bash\bash.py", line 273, in main
  File "bash\bash.py", line 449, in _main
  File "bash\basher__init.py", line 4249, in Init
  File "bash\basher__init.py", line 3858, in init
  File "bash\balt.py", line 2189, in init
  File "bash\basher__init__.py", line 3751, in UpdateIconSizes
  File "bash\balt.py", line 2205, in _addButton
  File "bash\basher\app_buttons.py", line 172, in GetBitmapButton
  File "bash\gui\base_components.py", line 502, in GetBitmap
wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(0, 0), "C") == 0" failed at ....\src\common\intl.cpp(1694) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!"""""
was c++ a requirement or is wrye bash just incompatible with window 11 somehow?
the release build for enderal se seem to work fine although.

User managed to produce a bugdump here: https://discord.com/channels/537706885965676554/537710082755133460/893870411782185091

Details
localize.py  119 setup_locale: No translation file for language '', falling back to 'en_GB'
localize.py  122 setup_locale: Set wxPython language to 'en_GB'
localize.py  124 setup_locale: Set Wrye Bash language to 'en_GB'
doc_viewer.py   38 <module>: pdfviewer using PyMuPDF (GPL)
bash.py  237 dump_environment: Using Wrye Bash Version 310
bash.py  237 dump_environment: OS info: Windows-10-10.0.22000-SP0, running on AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
bash.py  237 dump_environment: Python version: 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]
bash.py  237 dump_environment: Dependency versions:
bash.py  237 dump_environment:  - chardet: 4.0.0
bash.py  237 dump_environment:  - PyMuPDF: 1.18.16; bundled MuPDF version: 1.18.0
bash.py  237 dump_environment:  - python-lz4: 3.1.3; bundled LZ4 version: 1.9.3
bash.py  237 dump_environment:  - PyYAML: 5.4.1
bash.py  237 dump_environment:  - wxPython: 4.1.1 msw (phoenix) wxWidgets 3.1.5
bash.py  237 dump_environment: Input encoding: None; output encoding: utf-8
bash.py  237 dump_environment: Filesystem encoding: utf-8
bash.py  237 dump_environment: Command line: ['Wrye Bash Launcher.pyw', '-d']
bash.py  486 _import_bush_and_set_game: Searching for game to manage:
bush.py  118 _supportedGames: The following games are supported by this version of Wrye Bash:
bush.py  121 _supportedGames:  Enderal, Enderal Special Edition, Fallout 3, Fallout 4, Fallout 4
bush.py  121 _supportedGames:  (WS), Fallout 4 VR, Fallout New Vegas, Morrowind, Morrowind (WS),
bush.py  121 _supportedGames:  Nehrim, Oblivion, Oblivion (WS), Skyrim, Skyrim Special Edition,
bush.py  121 _supportedGames:  Skyrim Special Edition (WS), Skyrim VR
bush.py  123 _supportedGames: Wrye Bash looked for games in the following places:
bush.py  124 _supportedGames:  1. Windows Registry:
bush.py  126 _supportedGames:   The following installed games were found via the registry:
bush.py   66 _print_found_games:  - Skyrim Special Edition: C:\Games\Steam\steamapps\common\Skyrim Special Edition
bush.py  135 _supportedGames:   Make sure to run the launcher of each game you installed through Steam
bush.py  135 _supportedGames:   once, otherwise Wrye Bash will not be able to find it.
bush.py  136 _supportedGames:  2. Windows Store:
bush.py  142 _supportedGames:   No installed games with modding enabled were found via the Windows Store.
bush.py  147 _supportedGames:   Make sure to enable mods for each Windows Store game you have
bush.py  147 _supportedGames:   installed, otherwise Wrye Bash will not be able to find it.
bush.py  210 _detectGames: Detecting games via the -o argument, bash.ini and relative path:
bush.py  217 _detectGames: Set game mode to Skyrim Special Edition found in parent directory of Mopy:  C:\Games\Steam\steamapps\common\Skyrim Special Edition
bush.py  233 __setGame: Using Skyrim Special Edition game: C:\Games\Steam\steamapps\common\Skyrim Special Edition
initialization.py  161 init_dirs: My Games location set to C:\Users\Denis\Documents\My Games\Skyrim Special Edition
initialization.py  174 init_dirs: LocalAppData location set to C:\Users\Denis\AppData\Local\Skyrim Special Edition
initialization.py  223 init_dirs: Game Mods location set to C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods
initialization.py  228 init_dirs: Bash Mod Data location set to C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Mod Data
initialization.py  232 init_dirs: Installers location set to C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers
initialization.py  234 init_dirs: Installers bash data location set to C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers\Bash
initialization.py  242 init_dirs: Checking if WB directories exist and creating them if needed:
initialization.py  246 init_dirs:  - C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Mod Data
initialization.py  246 init_dirs:  - C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers
initialization.py  246 init_dirs:  - C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers\Bain Converters
initialization.py  246 init_dirs:  - C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers\Bain Converters\--Duplicates
initialization.py  246 init_dirs:  - C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers\Bain Converters\--Corrupt
initialization.py  246 init_dirs:  - C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers\Bash
initialization.py  246 init_dirs:  - C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Installers\Bash\BSA Cache
loot_parser.py   48 <module>: Using LibYAML-based parser
loot_parser.py   83 __init__: Using these LOOT paths:
loot_parser.py   84 __init__:  Masterlist: C:\Users\Denis\AppData\Local\LOOT\Skyrim Special Edition\masterlist.yaml
loot_parser.py   85 __init__:  Userlist: C:\Users\Denis\AppData\Local\LOOT\Skyrim Special Edition\userlist.yaml
loot_parser.py   86 __init__:  Taglist (fallback): C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\taglists\SkyrimSE\taglist.yaml
__init__.py 3617 initBosh: Initialized loot_parser, compatible with libloot v0.16.x
__init__.py 3620 initBosh: Looking for main game INI at C:\Users\Denis\Documents\My Games\Skyrim Special Edition\Skyrim.ini
windows.py  903 testUAC: Testing if game folder is UAC-protected
__init__.py 1531 _initDB: Initializing BSAInfos
__init__.py 1532 _initDB:  store_dir: C:\Games\Steam\steamapps\common\Skyrim Special Edition\Data
__init__.py 1533 _initDB:  bash_dir: C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Mod Data\BSA Data
__init__.py 1531 _initDB: Initializing ModInfos
__init__.py 1532 _initDB:  store_dir: C:\Games\Steam\steamapps\common\Skyrim Special Edition\Data
__init__.py 1533 _initDB:  bash_dir: C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Mod Data
_games_lo.py  662 print_lo_paths: Using the following load order files:
_games_lo.py  664 print_lo_paths:  - Load order and active plugins: C:\Users\Denis\AppData\Local\Skyrim Special Edition\plugins.txt
__init__.py 1531 _initDB: Initializing SaveInfos
__init__.py 1532 _initDB:  store_dir: C:\Users\Denis\Documents\My Games\Skyrim Special Edition\Saves
__init__.py 1533 _initDB:  bash_dir: C:\Users\Denis\Documents\My Games\Skyrim Special Edition\Saves\Bash
__init__.py 1682 refresh: Failed to load Save68_00000000_0_5868697374686965726127646168616C6172_WindhelmHjerim_020548_20211002032754_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Autosave3_EF4B2819_0_5868697374686965726127646168616C6172_WhiterunBelethorsGeneralGoods_010945_20210928044055_36_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save56_EF4B2819_0_5868697374686965726127646168616C6172_WindhelmHjerim_011936_20210929041715_40_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save52_EF4B2819_0_5868697374686965726127646168616C6172_WindhelmWorld_011512_20210928223247_39_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save57_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_012009_20210929233754_40_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load 18 The Fallen.ess: Save game masters size (75) not as expected (75).
__init__.py 1682 refresh: Failed to load Save59_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_012013_20210930014518_40_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save63_EF4B2819_0_5868697374686965726127646168616C6172_WindhelmHjerim_020251_20211001232356_44_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save64_00000000_0_5868697374686965726127646168616C6172_BloodletThrone01_020408_20211002011126_45_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load 04 To Riverwood.ess: Save game masters size (75) not as expected (75).
__init__.py 1682 refresh: Failed to load Save65_00000000_0_5868697374686965726127646168616C6172_Tamriel_020521_20211002030021_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load save 63 edit.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save49_EF4B2819_0_5868697374686965726127646168616C6172_WhiterunBelethorsGeneralGoods_010945_20210928044105_36_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save69_00000000_0_5868697374686965726127646168616C6172_WindhelmHjerim_020611_20211002035059_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load 07 Dragon Rising.ess: Save game masters size (75) not as expected (75).
__init__.py 1682 refresh: Failed to load Autosave2_EF4B2819_0_5868697374686965726127646168616C6172_WhiterunWorld_010940_20210928043550_36_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Autosave1_EF4B2819_0_5868697374686965726127646168616C6172_WhiterunBelethorsGeneralGoods_010939_20210928043446_36_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save48_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_010918_20210928041357_36_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save51_EF4B2819_0_5868697374686965726127646168616C6172_YsgramorsTomb01_011325_20210928204004_39_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save67_00000000_0_5868697374686965726127646168616C6172_WindhelmHjerim_020539_20211002031744_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Autosave3_EF4B2819_0_5868697374686965726127646168616C6172_WindhelmHjerim_020235_20211001230748_44_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save54_EF4B2819_0_5868697374686965726127646168616C6172_Forgottencave01_011820_20210929025535_40_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save60_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_012039_20211001024018_40_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Autosave2_00000000_0_5868697374686965726127646168616C6172_WindhelmWorld_020620_20211002035954_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Autosave3_00000000_0_5868697374686965726127646168616C6172_WindhelmTempleofTalos_020621_20211002040051_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save58_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_012011_20210930005258_40_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Autosave1_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_020214_20211001224621_44_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save62_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_012200_20211001182119_41_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save70_00000000_0_5868697374686965726127646168616C6172_WindhelmTempleofTalos_020622_20211002040213_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save66_00000000_0_5868697374686965726127646168616C6172_WindhelmWorld_020530_20211002030841_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save55_EF4B2819_0_5868697374686965726127646168616C6172_WindhelmHjerim_011933_20210929041447_40_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Autosave1_00000000_0_5868697374686965726127646168616C6172_WindhelmPalaceoftheKings_020620_20211002035936_46_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save61_EF4B2819_0_5868697374686965726127646168616C6172_WindhelmHjerim_012121_20211001032206_41_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Autosave2_EF4B2819_0_5868697374686965726127646168616C6172_Tamriel_020222_20211001225453_44_1.ess: Save game masters size (5055) not as expected (5055).
__init__.py 1682 refresh: Failed to load Save50_EF4B2819_0_5868697374686965726127646168616C6172_YsgramorsTomb01_011325_20210928203957_39_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1682 refresh: Failed to load Save53_EF4B2819_0_5868697374686965726127646168616C6172_WindhelmHjerim_011548_20210928232928_39_1.ess: Save game masters size (5115) not as expected (5115).
__init__.py 1531 _initDB: Initializing INIInfos
__init__.py 1532 _initDB:  store_dir: C:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\INI Tweaks
__init__.py 1533 _initDB:  bash_dir: C:\Games\Steam\steamapps\common\Skyrim Special Edition Mods\Bash Mod Data\INI Data
__init__.py 4262 InitVersion: Version changed, rescanning mergeability
__init__.py 4264 InitVersion: Done rescanning mergeability
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\skyrimse_16.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\docbrowser16.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\modchecker16.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\settingsbutton16.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\help16.png
__init__.py 3611 __init__: Constructing panel 'Installers'
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_grey_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_white_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_white_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_grey_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_white_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_white_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_green_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_grey_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_red_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_white_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_orange_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_yellow_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_green_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_red_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_white_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_orange_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_yellow_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_green_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_grey_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_red_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_white_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_orange_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_yellow_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_green_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_red_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_white_off_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_orange_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\diamond_yellow_inc_wiz.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\red_x.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\arrow_up.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\arrow_down.png
__init__.py 3621 __init__: Panel 'Installers' constructed successfully
__init__.py 3611 __init__: Constructing panel 'Mods'
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_on.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_off.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_inc.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_purple_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_blue_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_green_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_orange_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_yellow_imp.png
base_components.py  502 GetBitmap: Loading bitmap for C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\images\checkbox_red_imp.png
__init__.py 3624 __init__: Fatal error constructing panel 'Mods'.
__init__.py 4120 on_closing: An error occurred while trying to save settings:
Traceback (most recent call last):
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\bash.py", line 273, in main
    _main(opts, wx_locale)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\bash.py", line 449, in _main
    frame = app.Init() # Link.Frame is set here !
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 4215, in Init
    frame = BashFrame() # Link.Frame global set here
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 3845, in __init__
    self.notebook = BashNotebook(self._native_widget)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 3617, in __init__
    item = panel(self)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 2021, in __init__
    super(ModPanel, self).__init__(parent)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 251, in __init__
    self.detailsPanel = self._details_panel_type(self.right, self)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 1482, in __init__
    wx.ArtProvider.GetBitmap(wx.ART_PLUS, size=(16, 16)),
wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(0, 0), "C") == 0" failed at ..\..\src\common\intl.cpp(1694) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 4118, in on_closing
    self.SaveSettings(destroy=True)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 4133, in SaveSettings
    settings[u'bash.page'] = self.notebook.GetSelection()
AttributeError: 'BashFrame' object has no attribute 'notebook'

Wrye Bash encountered an error.
Please post the information below to the official thread at
https://afkmods.com/index.php?/topic/4966-wrye-bash-all-games
or to the Wrye Bash Discord at
https://discord.gg/NwWvAFR

Traceback (most recent call last):
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\bash.py", line 273, in main
    _main(opts, wx_locale)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\bash.py", line 449, in _main
    frame = app.Init() # Link.Frame is set here !
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 4215, in Init
    frame = BashFrame() # Link.Frame global set here
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 3845, in __init__
    self.notebook = BashNotebook(self._native_widget)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 3617, in __init__
    item = panel(self)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 2021, in __init__
    super(ModPanel, self).__init__(parent)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 251, in __init__
    self.detailsPanel = self._details_panel_type(self.right, self)
  File "C:\Games\Steam\steamapps\common\Skyrim Special Edition\Mopy\bash\basher\__init__.py", line 1482, in __init__
    wx.ArtProvider.GetBitmap(wx.ART_PLUS, size=(16, 16)),
wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(0, 0), "C") == 0" failed at ..\..\src\common\intl.cpp(1694) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!

Note it blows somewhere else - still bitmaps code

I fished a change from wxWidgets/Phoenix@040c59f that seems to fix the issue (current version 94605f2). This sets the locale to 'C' on App InitLocale - in the process I fixed some other stuff:

  • initialize the App once. We really do not want to do this several times (right wx?). We do not postpone the App creation as we did - till Headless mode #600 is addressed we are a GUI app, no escape from that, so we might as well instantiate that app
    • this led to some hacky code in MainLoop - it is related to redirecting of input/output streams and needs testing
      • note also we do this redirect a bit later in the code
    • incidentally, this is might have triggered the crash in the first place - turns out the user was presented with the choose game dialog, which did a _wx.App(False) -> InitLocale -> boom?
    • this means we don't probably need all the mumbo jumbo with the ImageWrapper/ImageBundle wrappers - we simply don't do anything before wx.App is instantiated (refactor (read eliminate) balt)
  • setup_locale was refactored to not set the Locale several times - IIUC wx.Locale sets the locale:

    The call of this function has several global side effects which you should understand: first of all, the application locale is changed - note that this will affect many of standard C library functions such as printf() or strftime(). Second, this wx.Locale object becomes the new current global locale for the application and so all subsequent calls to wx.GetTranslation will try to translate the messages using the message catalogs for this locale.

However this leaves a lot to be desired - we don't want to set the locale to 'C', we want to fish the locale the user uses - now there are a lot of details to specify here:

Trying to take this a step further I run into the full problem - see my fork repo: https://github.com/Utumno/wrye-bash/tree/utumno-locale (TODO: clean up branch). This failed (CI):

Details
....
_______ ERROR collecting Mopy/bash/tests/test_bosh/test_loot_parser.py ________
C:\hostedtoolcache\windows\Python\3.9.7\x64\lib\importlib\__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:850: in exec_module
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
Mopy\bash\tests\__init__.py:133: in <module>
    _emulate_startup()
Mopy\bash\tests\__init__.py:127: in _emulate_startup
    localize.setup_locale('en_US', _wx)
Mopy\bash\localize.py:138: in setup_locale
    f"{locale.getlocale()}'")
C:\hostedtoolcache\windows\Python\3.9.7\x64\lib\locale.py:593: in getlocale
    return _parse_localename(localename)
C:\hostedtoolcache\windows\Python\3.9.7\x64\lib\locale.py:501: in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
E   ValueError: unknown locale: en-US
=========================== short test summary info ===========================
ERROR Mopy/bash/tests/test_bolt.py - ValueError: unknown locale: en-US
ERROR Mopy/bash/tests/test_bosh/test_cosaves.py - ValueError: unknown locale:...
ERROR Mopy/bash/tests/test_bosh/test_list_info.py - ValueError: unknown local...
ERROR Mopy/bash/tests/test_bosh/test_loot_parser.py - ValueError: unknown loc...
!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 4 errors in 1.21s ==============================

What?? locale.getlocale() failed while we just set the locale??? (see also https://discord.com/channels/537706885965676554/537710082755133460/880140815429689424 for a similar traceback - note that we set the locale ok then it fails with another locale - which is what probably InitLocale sets via some call of wx.App)

Turns out there is a mismatch between python and wx locale implementations and seems both are buggy in windows, and this explains this mess. Some brave guy posted an analysis on that here: wxWidgets/Phoenix#1616 (comment) along with a module that does a monkey patch in wx.Locale to account for windows LCIDs. I tried to plug this in to bash but I am still getting the CI traceback (I am not on windows so CI is my test environment) - see my fork repo: https://github.com/Utumno/wrye-bash/tree/wx-xxx-locale branch (TODO cleanup branch).

There is another bunch of code here: EventGhost/EventGhost@EventGhost:177be51...kdschlosser:847c3b2 that we might try.

For now, probably we will go with patch for InitLocale and hope for the best.

Blocks #460

Metadata

Metadata

Assignees

Labels

A-bootArea: Early Boot (bash.py, bush.py and initialization.py)A-wxArea: wxPython interactions (the gui package, balt.py and the basher package)C-bugCategory: Bug, an acknowledged defect in the programM-relnotesMisc: Issue should be listed in the version history for its milestone

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions