Crash when opening a directory containing a file with a weird character in its extension
TheEeveeLovers opened this issue ยท comments
Sean commented
What I've done to isolate the issue:
- I added a file named
sequence.๐ฟ
to another folder | ERROR - I added a png to another folder, then appended ๐ฟ to the file extension. I then opened the new folder. | ERROR
- I made the file with ๐ฟ in the filename instead of the extension. | NO ERROR
The exception in question:
Unhandled exception at 0x00007FF83338CF19 in program.exe: Microsoft C++ exception: std::system_error at memory location 0x000000B6F7F0CC38.
Call Stack:
KernelBase.dll!00007ff83338cf19() Unknown
vcruntime140d.dll!00007fffe523b760() Unknown
program.exe!std::_Throw_system_error_from_std_win_error(const __std_win_error _Errno) Line 65 C++
program.exe!std::_Check_convert_result(const __std_fs_convert_result _Result) Line 72 C++
program.exe!std::_Convert_wide_to_narrow<std::char_traits<char>,std::allocator<char>>(const __std_code_page _Code_page, const std::basic_string_view<wchar_t,std::char_traits<wchar_t>> _Input, const std::allocator<char> & _Al) Line 85 C++
program.exe!std::filesystem::_Convert_wide_to<std::char_traits<char>,std::allocator<char>,char>(const std::basic_string_view<wchar_t,std::char_traits<wchar_t>> _Input, const std::allocator<char> & _Al) Line 152 C++
program.exe!std::filesystem::path::string<char,std::char_traits<char>,std::allocator<char>,0>(const std::allocator<char> & _Al) Line 931 C++
program.exe!std::filesystem::path::string() Line 935 C++
program.exe!ImGui::FileBrowser::IsExtensionMatched(const std::filesystem::path & _extension) Line 890 C++
program.exe!ImGui::FileBrowser::Display() Line 515 C++
program.exe!SDL_main(int argc, char * * args) Line 156 C++
program.exe!main_getcmdline() Line 82 C
[External Code]
Looking at the call stack and using context, the problem most likely lies in ImGui::FileBrowser::IsExtensionMatched()
Z Guan commented
Looks like this is caused by windows error 1113
(no mapping for the unicode character exists in the target multi-byte code page) in the implementation of std::filesystem::path::string
. I will fix it soon.
Z Guan commented
Please try the new version
Sean commented
Works fine now!