Skip to content
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

Devour doesn't open when used with multiple files and a wildcard. #20

Open
filipencopav opened this issue Feb 21, 2021 · 2 comments
Open

Comments

@filipencopav
Copy link

filipencopav commented Feb 21, 2021

[~] 0; find pix/screenshots/* | wc -l
36
[~] 0; devour feh pix/screenshots/*

Then it crashes (?)
The terminal goes after the milk and never returns.

All files in that directory are pngs and it doesn't work with other programs, like sxiv, either.

@EmperorPenguin18
Copy link

Have the same issue. Tried with feh and it is 100% reproducible. One file or a wildcard that only has one result both work. If the wildcard has a few results (seemed to be <10 for me) it works. But anything more and nothing opens. The terminal (tested with alacritty) stays open in the background but it seems feh doesn't launch. My images are in a fuse mount if that affects things.

This is the error message when --debug is used:

*** buffer overflow detected ***: terminated

@EmperorPenguin18
Copy link

After further investigation I think I've figured it out. When using the wildcard, the command is expanded to have each result as an argument. This makes for a command that has many more characters than the array can hold (1024). After changing the array size to 99999 it would load everything in the test directory I was using. It was still very fast, but this solution isn't very elegant. It could be a quick fix so that most people won't notice the problem.

I've created what I think is a cleaner solution in #28. My C is a little rough so there is likely a better way to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants