-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Rofi calc crashes when trying to use any function with libqalculate 5 #117
Comments
Can reproduce. Sadly I have absolutely no idea why this happens all of a sudden. Do you have some time to dive into this perhaps? I'm not sure when I'll have time. |
Same here. I've tried to git bisect, but I haven't found a good commit all the way back to v2.0.0. Probably something happened upstream. |
Unfortunately, I am not familiar with C, so I won't be much help. I can tell you that it was probably a recent package update that broke it, but I had a large amount of updates (122) during my last upgrade, so I may not be able to track it down. |
managed to get some insight into it with GDB (really tricky to do considering how rofi works) and the error in calc appears to be happening here, but the traceback is less-than-ideal |
one thing I did notice is that libqalculate on arch recently-ish updated, and appears to return the same exit code (1) as rofi-calc said the subprocess was returning when given an illegal expression (in my case 70p), is this taken into account? |
I downgraded my libqalculate to version 4.9.0, and that seems to have fixed the issue. |
Somethings fucky with libqalculate 5 then. I don't really have time to dive into the specifics currently. I'd be very happy if someone could look into this. I'd be happy to review/merge/release. |
so, I took the simplest test ( |
built libqalculate v4.9.0 from source, when pointing rofi-calc to that it works properly ...and as I suspected, v4.9.0, when given an invalid expression returns an exit code of 0, while v5 returns an exit code of 1 the program needs to be changed to properly handle the qalc-binary returning a non-zero exit code |
here's a temporary workaround: create a new script named
|
Also experiencing this. If I type
I also get this crash when I type
Distro: Arch |
same issue on NixOS unstable # Add this to configuration.nix
nixpkgs.overlays = [
(final: prev: {
# see https://github.com/svenstaro/rofi-calc/issues/117
libqalculate = prev.libqalculate.overrideAttrs (_: rec {
pname = "libqalculate";
version = "4.8.1";
src = pkgs.fetchFromGitHub {
owner = "qalculate";
repo = "libqalculate";
rev = "v${version}";
sha256 = "sha256-4WqKlwVf4/ixVr98lPFVfNL6EOIfHHfL55xLsYqxkhY=";
};
});
})
]; |
Fixed by cc6cd37. |
Version
Version: 1.7.5+wayland2-1-gff2338c3 (makepkg)
Distro
Archcraft x86_64
Command
rofi -show calc -modi calc -no-show-match -no-sort
This problem started after a system upgrade, this command did not change
Steps to reproduce
Expected Behavior
Rofi calc shouldn't crash when using functions
Core dump
The text was updated successfully, but these errors were encountered: