-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Segmentation violation using the gclip tool on Fedora #27
Comments
Thanks for the report. Unfortunately, we do not have a fedora system to test this issue. We would have to rely on the community to tackle this issue. Contributions are welcome. |
this might depend by two things, either P_XOpenDisplay is NULL but doesn't get checked before being used here, or the $DISPLAY environment variable is not set (if the argument of XOpenDisplay is NULL as in this case, $DISPLAY is used instead). |
Just did a quick test and if the function pointer is correctly initialized, it shouldn't crash even if $DISPLAY is not set ... so there's a good chance that this SIGSEGV is caused by the function pointer being NULL (also hinted by that addr=0x0 pc=0x0). I suggest to check for those pointers in the initX11 function and return 1 only if they are all set. Also what's the point of looping 42 times? :D |
@changkun I confirm this bug is not specifically related to Fedora. |
@zangarmarsh Thanks for confirming the issue. Could you maybe share more details on how to reproduce the issue? More specifically, which environment, in which steps that you did? |
@changkun It occurs in Ubuntu X11. I also tried in wayland and it works correctly. |
@zangarmarsh Is the problem occurring on the latest commit? |
@changkun I updated it to version 0.6.3 and it works! Thank you. |
I have been using clipboard to build a small personal application as a replacement for xclip. The first time I built and tested the application, it threw this error:
I thought it was an issue with my code, but the
gclip
reference tool throws the same error, so I must assume that the issue lies with theclipboard
library. My /etc/os-release file (unsure if this helps):The text was updated successfully, but these errors were encountered: