-
Notifications
You must be signed in to change notification settings - Fork 626
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
[BUG] rofi-calc crashes after typing first character when run from dwm keybind #2088
Comments
Out of curiosity? why is this reported here and not at the plugin? Is this plugin compiled against this version of rofi? |
nevermind. |
Can you generate a backtrace? but I am pretty sure this is a plugin bug, not a rofi bug. |
I'm wild-guessing it's a rofi issue since the plugin works correctly when I run it from the shell. It only seems to crash when running this from a dwm keybind. I could very well be wrong of course.
How can I check that? I compiled the plugin from the latest commit of its repo. |
I don't see how this follows? if it work when you launch rofi from a shell? then how is it being launched from dwm an indication that it is a rofi issue? It is the same rofi (I hope) ... Normally when things work differently when launched from keybinding is that the environment is different. Given that it crashes when the plugin calls qalc? and the crash you report seems to be in something waiting on a subprocess,
I suspect that qalc crashes directly, then taking the plugin with it, that then takes rofi with it. @svenstaro ^^ I think this is a plugin issue, what do you think? |
You're most likely right. Thanks a lot for the pointers and for having a look. Do you prefer I close this issue and move it to the plugin repo? |
No idea why this would fail like this. :/ |
@intael Can you figure this one out:
then try to launch qalc in the environment of 'dwm' keybinding, see if it works. It might be an invalid locale? |
Tried now to switch the keybind to calling static const char *qalc[] = {"/home/intael/.dwm/qalc.sh", NULL}; #!/bin/zsh
echo $(qalc 1 + 1) But it works, I can see this in dwm's logs:
|
you are changing the environment as you do not call it directly. You are launching a shell first (zsh). This is more equivalent to calling it from a terminal (where same shell is launched). |
Good point. Calling the static const char *qalc[] = {"qalc", "1 + 1", NULL}; Works as well regardless of the amount of tokens I pass to qalc: static const char *qalc[] = {"qalc", "1", NULL}; |
odd. thx for testing. |
Rofi version (rofi -v)
Version: 1.7.8-dirty
Configuration
https://gist.github.com/intael/75adaa6d3904c88da89cf7d5bea4389e
Theme
https://gist.github.com/intael/735bc351098e80ab58a5aa8287610152
Timing report
No response
Launch command
rofi -modi calc -show calc -no-show-match -no-sort
Step to reproduce
The issue occurs when using this plugin: https://github.com/svenstaro/rofi-calc
Step 1: Define a dwm keybind like this:
Step 2: Use the keybind. The rofi calc window will shut down after entering the first character.
Expected behavior
When pressing the key the roficalc window correctly appears, but it shuts down after pressing the first character.
Actual behavior
When I press the key, the rofi calc window appears but it shuts down after typing the first character. Looking at dwm's logs I see the following:
Additional information
The command works correctly when running it from the shell (zsh), but doesnt when run from a dwm keybind.
Using rofi-calc via AUR package
rofi-calc-git r201.c54d8e7-1
Using wayland display server protocol
I've checked if the issue exists in the latest stable release
The text was updated successfully, but these errors were encountered: