Closed JoseBritto closed 6 months ago
Segfault when locale not setup on system (im not entirely sure how to handle this, working on it atm)
You might have to take a look at libnick
repository, as that is where all the localization happens. But it already handles if no local exists and defaults to en-us.
Segfault when locale not setup on system (im not entirely sure how to handle this, working on it atm)
You might have to take a look at
libnick
repository, as that is where all the localization happens. But it already handles if no local exists and defaults to en-us.
Oh. For me if I unset the locale, Denaro crashes. Basically std::locale("") throws runtime error causing a crash. How would I handle this?
In denaro there are two places that directly call std::locale. In the CurrencyHelpers::getSystemCurrency() method and the MainWindowController::getDebugInformation() method, I tried setting std::locale::global(std::locale("C")) but that doesn't seem to affect anything. I'm kinda lost here. Gtk by default falls back to this and produces an error:
(org.nickvision.money.gnome:27160): Gtk-WARNING **: 23:32:48.436: Locale not supported by C library.
Using the fallback 'C' locale.
Is the correct way to have a small helper method/class that proxies all the calls to get the current locale and handle it there? Or is it better to handle the exception where ever we use std::locale directly?
In denaro there are two places that directly call std::locale. In the CurrencyHelpers::getSystemCurrency() method and the MainWindowController::getDebugInformation() method, I tried setting std::locale::global(std::locale("C")) but that doesn't seem to affect anything. I'm kinda lost here. Gtk by default falls back to this and produces an error:
(org.nickvision.money.gnome:27160): Gtk-WARNING **: 23:32:48.436: Locale not supported by C library. Using the fallback 'C' locale.
Is the correct way to have a small helper method/class that proxies all the calls to get the current locale and handle it there? Or is it better to handle the exception where ever we use std::locale directly?
Handled both separately.
Please let me know if I used the & and * or none at all for variables properly. I still get confused sometimes 😅 Everything worked when I tested.
All done
e777bf7 Added some more logs when opening and removing accounts. Let me know if I went a little overboard there.
e777bf7 Added some more logs when opening and removing accounts. Let me know if I went a little overboard there.
All is fine. Just only removed the Account removed
one that had the account name, because i'd like to keep as little personal information as possible from the logs (at most file paths).
Things handled:
Let me know if there are other things I missed, but these were mostly the problems I faced and having no logs made it harder to debug.