Skip to content
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

Realsense viewer and librealsense failing with "failed to convert special folder: errno=42" #13513

Open
warmist opened this issue Nov 14, 2024 · 8 comments
Labels

Comments

@warmist
Copy link

warmist commented Nov 14, 2024

Required Info
Camera Model Does not matter
Firmware Version Does not matter
Operating System & Version Windows 10
Platform PC
SDK Version 2.56.2.7411
Language C++/viewer
Segment all

Source of error is this line:

auto error = wcstombs_s( &len, str, path, 1023 );

wcstombs_s returns value 42 which is EILSEQ i.e. it fails to convert wide string to multibyte string.

There are numerous issues closed with this but nobody dug down to the source. It seems that this only happens if your username has unicode characters.

@warmist warmist changed the title Realsense viewer and librealsene failing with "failed to convert special folder: errno=42" Realsense viewer and librealsense failing with "failed to convert special folder: errno=42" Nov 14, 2024
@MartyG-RealSense
Copy link
Collaborator

Hi @warmist Have you visited the advice about the errno=42 error at #13037 please?

#13457 (comment) has instructions for finding on a Windows computer and deleting the realsense-config.json configuration file mentioned in that link.

@warmist
Copy link
Author

warmist commented Nov 14, 2024

Hi @MartyG-RealSense. Thanks for answering.

Yes, i've seen both of them. Also i've looked into all the duplicates.

#13037 does not apply because "problem due to an uninitialized json variable" cannot happen as it's before file loading. It's an error when resolving (and transforming) the path to appdata folder. There is no "realsense-config.json" file anywhere in appdata (also related: apps shouldn't write to appdata and should create a folder).

#13457 (comment) yes, i've looked into hidden files as well. Also you can access the folder faster if you type "%appdata%" into explorer path (i.e. the part where it has "C:\etc...")

I'll try to setup a minimal repro as i feel this issue might be hard to reproduce without setting up a windows machine with username with unicode chars in it.

@warmist
Copy link
Author

warmist commented Nov 18, 2024

Here is minimal reproduction: https://gist.github.com/warmist/e0b1927387864566db2804c50d0cf512

In my environment wcstombs_s fails with error=42. Content of path:
image
(see unicode letter in path)

@warmist
Copy link
Author

warmist commented Nov 18, 2024

Further research shows that wcstombs_s uses current locale and current locale is "en-us" and fails to convert unicode character. It should use _wcstombs_s_l with new locale (i.e. _create_locale(LC_ALL,"");)

@MartyG-RealSense
Copy link
Collaborator

I had a discussion with my Intel RealSense colleagues about the 'failed to convert special folder: errno=42' error earlier in 2024, so I will follow up on it and pass your kindly provided information to them for their consideration.

@MartyG-RealSense
Copy link
Collaborator

Hi @warmist Do you require further assistance with this case, please? Thanks!

@warmist
Copy link
Author

warmist commented Dec 1, 2024

Hi @warmist Do you require further assistance with this case, please? Thanks!

Thank you for asking. I don't need assistance, however i wonder if (and when) this will be fixed?

@MartyG-RealSense
Copy link
Collaborator

I have sent a follow-up message to my Intel RealSense colleagues about this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants