-
Notifications
You must be signed in to change notification settings - Fork 28
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
Deus Ex: The Fall (258180) crashes SamRewritten #86
Comments
Hey sorry for delay here. Are you launching with launch.sh? It looks as though the YAJL library encoded without errors, but couldn't do the decode. |
Yes.
Yes, normal umlauts are correctly displayed from other games. Their encoding of these characters is wrong as they show up as a question mark everywhere - even in Steam itself. The bug is that these bad characters are crashing SamRewritten.
I haven't tried it. Does involving another compatibility layer (WINE) helps in debugging? |
I'm not sure if using something like Wine would help.. To be fair I encountered a lot of issues with yajl, and it seems to be aimed towards high-performance "backend only" workloads. I think it was a mistake to go with it in the first place. One way to tackle the issue would be to reimplement the serialization part with something more modern & flexible like this: https://github.com/Tencent/rapidjson/ . Regarding this issue, I know that this crash exists, but I just don't have time to contribute to SAMrewritten anymore. I'm really sad to say this, but I don't think I will be contributing to this project again before a long time. However, contributions are still welcome, and I'd be happy to help anyone wanting to contribute. Sadly, unless @wgpierce wants to submit a fix, I have to say the best solution to all the current issues would be to find new contributors. I'll always be watching for anything new happening :) |
I wasn't proposing using WINE. I just wanted to see if the original Steam Achievement Manager is fine with these encodings. Windows .NET has a lot of support for different character encodings. Although the rest of SamRewritten seems just fine. The problem just seems to be in the decode step after the encode worked just fine. I see this happens because the encode step doesn't need to do parsing, just the decode step. YAJL has an option to ignore the invalid UTF8 in parsing, but it's not exposed in the top-level yajl_tree_parse we use to do easy decodes :/. The easy option is
|
I poked around some more. Some options are (1) reimplement yajl_tree.c just to get that flag, (2) convert it to utf8 ourselves in C++, or (3) just use glib's g_utf8_make_valid, which works out well since we're using Gnome. Also the name and desc which may have invalid UTF8 are not used for sending anything back to Steam, so we're fine to modify it. @Lucki Here's a patch for (3), can you see if this works? Note I hope yajl isn't complaining about the Unicode replacement character (U+FFFD) itself because that's what utf8_make_valid will replace invalid UTF8 sequences with. Also,
All good Paul, I can and will maintain this repo! 😃 |
Thanks a lot @wgpierce , you rock 🤘 |
So that works as a workaround for specific cases. but it generally slows down achievement retrieval even when it's not needed. I could implement a commandline parameter to do this checking (less code, less generic), or I could go back and do (1) reimplement yajl_tree.c just to get that flag (more code, more generic) if the rest of GTK is ok with invalid UTF-8 characters. |
Do as you prefer, though as I said above I think the "best fix" would be to change the JSON library entierly. I also think it would be great to use conan as a package manager for dependencies, there are plenty of JSON libraries there (eg https://conan.io/center/rapidjson). I know it's a huge load of work, but it could be interesting. This seems like something I'd like to do myself, but I don't want to reinstall Steam and all on my machine. I'll see if LXC can be an answer to this, I've never used it. By the way, GTK4 is out! |
I think the problem is that the german description contains some badly encoded characters, displayed as
�
even on the steam website. They should probably be umlauts (Ää
,Öö
,Üü
,ẞß
) but something has gone wrong on their end.Parsing error.
https://steamcommunity.com/my/stats/258180/achievements/
Terminal output
The text was updated successfully, but these errors were encountered: