Qalculate / libqalculate

Qalculate! library and CLI
https://qalculate.github.io/
GNU General Public License v2.0
1.82k stars 146 forks source link

Crash in Calculator constructor on strdup #4

Closed kbroulik closed 8 years ago

kbroulik commented 8 years ago

I got this downstream KDE bugreport in the KRunner ("Run Command") calculator plugin which uses libqalculate: https://bugs.kde.org/show_bug.cgi?id=365117

hanna-kn commented 8 years ago

I am not able to reproduce the crash using the latest arch packages.

hanscomps commented 8 years ago

Interesting. Having the same problem. Arch fully updated. Pulled libqalculate source and compiled separately. Same issue, crash when executing "qalc".

hanna-kn commented 8 years ago

Does it still crash if you run LC_ALL=C qalc

saidinesh5 commented 8 years ago

@hanna-kn https://github.com/Qalculate/libqalculate/commit/eade7b723a81b4d4b2039da1ed91bac2a5795805#diff-2920795eb5a84823e79c2cfaf6fd7d71R299 commit fixed it for me i think....

hanscomps commented 8 years ago

Fixed, thanks

hanna-kn commented 8 years ago

The cause of this problem is that the locale (specifically LC_NUMERIC) is incorrectly set on the users system. With the commit mentioned above this does not cause a crash with Qalculate! anymore, but the user (or KDE) should still make sure that a valid system locale is set (or at least is left empty).