-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stray floating point characters #78800
Comments
Confirm unable to reproduce on specified version 44b3817. I would guess the wrong var got overwritten the next time the game was saved. For reference, debug log (provided in discord)``` ----------------------------------------- 19:37:20.895 : Starting log. 19:37:20.895 INFO : Cataclysm DDA version 44b3817 19:37:20.896 INFO : [main] C locale set to Portuguese_Brazil.utf8 19:37:20.896 INFO : [main] C++ locale set to 19:37:20.896 INFO : SDL version used during compile is 2.30.10 19:37:20.896 INFO : SDL version used during linking and in runtime is 2.30.10 19:37:20.985 INFO : SDL render devices: direct3d, direct3d11, direct3d12, opengl, opengles2, software 19:37:21.019 INFO : [options] C locale set to en_US.UTF-8 19:37:21.019 INFO : [options] C++ locale set to en_US.UTF-8 19:37:21.019 INFO : Setting language to: 'en' 19:37:21.019 INFO : [i18n] Scanning core translations from lang/mo/ 19:37:21.195 INFO : Active renderer: 1/direct3d11 19:37:21.411 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0 19:37:21.444 INFO : Setting language to: 'en' 19:37:41.012 INFO : Loaded tileset: UltimateCataclysm 19:37:41.150 INFO : Loaded tileset: Larwick Overmap 19:37:55.850 ERROR : (error message will follow backtrace) #0 (dbghelp: debug_write_backtrace+0xb5@00007FF667E77A05[cataclysm-tiles.exe+0x557a05]), #1 (dbghelp: DebugLog+0x2b8@00007FF667E76768[cataclysm-tiles.exe+0x556768]), #2 (dbghelp: realDebugmsg+0x1fd@00007FF667E79ABD[cataclysm-tiles.exe+0x559abd]), #3 (dbghelp: item::get_var+0x3b1@00007FF668711EA1[cataclysm-tiles.exe+0xdf1ea1]), #4 (dbghelp: item::processing_speed+0x120@00007FF6687373D0[cataclysm-tiles.exe+0xe173d0]), #5 (dbghelp: active_item_cache::add+0x1e7@00007FF668FE8267[cataclysm-tiles.exe+0x16c8267]), #6 (dbghelp: vehicle::refresh_active_item_cache+0x415@00007FF6685B2E75[cataclysm-tiles.exe+0xc92e75]), #7 (dbghelp: vehicle::refresh+0x2093@00007FF6685B2983[cataclysm-tiles.exe+0xc92983]), #8 (dbghelp: vehicle::deserialize+0x1102@00007FF66805B322[cataclysm-tiles.exe+0x73b322]), #9 (dbghelp: submap::load+0x24a6@00007FF66806E9C6[cataclysm-tiles.exe+0x74e9c6]), #10 (dbghelp: mapbuffer::deserialize+0xb28@00007FF66854B038[cataclysm-tiles.exe+0xc2b038]), #11 (dbghelp: std::_Func_impl_no_alloc<,void,JsonValue const &>::_Do_call+0x2f@00007FF66854A26F[cataclysm-tiles.exe+0xc2a26f]), #12 (dbghelp: read_from_file_json+0x41@00007FF668090681[cataclysm-tiles.exe+0x770681]), #13 (dbghelp: read_from_file_optional_json+0x42@00007FF668090852[cataclysm-tiles.exe+0x770852]), #14 (dbghelp: mapbuffer::unserialize_submaps+0x4d8@00007FF66854CDA8[cataclysm-tiles.exe+0xc2cda8]), #15 (dbghelp: mapbuffer::submap_exists+0x8c@00007FF66854C6DC[cataclysm-tiles.exe+0xc2c6dc]), #16 (dbghelp: map::generate+0x226@00007FF668C04976[cataclysm-tiles.exe+0x12e4976]), #17 (dbghelp: map::loadn+0x289@00007FF6682C6389[cataclysm-tiles.exe+0x9a6389]), #18 (dbghelp: map::load+0x2b6@00007FF6682C6026[cataclysm-tiles.exe+0x9a6026]), #19 (dbghelp: game::unserialize+0xa55@00007FF668AFEC75[cataclysm-tiles.exe+0x11dec75]), #20 (dbghelp: read_from_file+0x58@00007FF6680905D8[cataclysm-tiles.exe+0x7705d8]), #21 (dbghelp: read_from_file+0x45@00007FF668090565[cataclysm-tiles.exe+0x770565]), #22 (dbghelp: ::operator()+0xf4@00007FF667EDB3E4[cataclysm-tiles.exe+0x5bb3e4]), #23 (dbghelp: game::load+0xe5f@00007FF667F2084F[cataclysm-tiles.exe+0x60084f]), #24 (dbghelp: main_menu::load_game+0x18f@00007FF667FFCC4F[cataclysm-tiles.exe+0x6dcc4f]), #25 (dbghelp: main_menu::load_character_tab+0xa00@00007FF667FFCA70[cataclysm-tiles.exe+0x6dca70]), #26 (dbghelp: main_menu::opening_screen+0x1e43@00007FF668000983[cataclysm-tiles.exe+0x6e0983]), #27 (dbghelp: WinMain+0xdfd@00007FF667CFA6CD[cataclysm-tiles.exe+0x3da6cd]), #28 (dbghelp: __scrt_common_main_seh+0x106@00007FF669528FB6[cataclysm-tiles.exe+0x1c08fb6]), #29 (dbghelp: BaseThreadInitThunk+0x1d@00007FFF667F259D[KERNEL32.DLL+0x1259d]), #30 (dbghelp: RtlUserThreadStart+0x28@00007FFF6742AF38[ntdll.dll+0x5af38]), Backtrace emission took 1 seconds. (continued from above) ERROR : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\item.cpp:1894 [get_var] Stray characters at end of floating point value 0.000000 in item::get_var ```Regardless, I'm not sure this is debuggable without a repro save, unfortunately... |
@CassiLags What language do you play in? I assume Russian? |
I play in English Is the trimmed save not enough? Im putting the full save here. Still the same message in a078529 |
/Confirmed I see this kind of report from time to time loading saves (typically from bug reports). They seem to typically be one offs, i.e. won't repeat after the game has been saved again, and so I haven't bothered with them. When loading this save (the one originally supplied: I didn't need the full one) the debug report is issued by item.cpp operation item::get_var at the end if the if statement (logical, as '.' isn't ','). For whatever reason, strtod returns with end pointing to '.', so it might be that strtod uses the system setting rather than a canonical game one, or does so some times (possibly before something is set internally). According to a quick search, strtod parses according to the locale settings, and thus is unsuitable for usage by the game. There are two calls to it in this operation. Edit: |
I usually get this error when switching languages between Russian and English. And saving in a language other than the language in which the world is created. Although the error itself occurs very rarely. But since you're not changing the language, it's clearly something else. |
I think we may have a more serious issue if JSON math is parsed using the local settings. I don't know if that's the case, but it looks like it may be. |
By the way, is this part of the code that causes the error not related to the output of numeric values in the item description? |
my system settings are in brazillian portuguese, so maybe its only reproductible on machines with non-US locales. |
Describe the bug
The following shows up when loading the save:
DEBUG : Stray characters at end of floating point value 0.000000 in item::get_var
FUNCTION : get_var
FILE : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\item.cpp
LINE : 1894
VERSION : 44b3817
Save was created on stable 0.H and then ported to version 44b3817
Attach save file
Wayside-trimmed.tar.gz
Steps to reproduce
Load the save.
Expected behavior
Not seeing an error.
Screenshots
No response
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Portal Storms Ignore NPCs [personal_portal_storms],
Slowdown Fungal Growth [no_fungal_growth]
]
Additional context
No response
The text was updated successfully, but these errors were encountered: