Comments (8)
I'm having some trouble reproducing this, though I have an idea what might be the issue.
- Please build pqiv with an additional debug line. In function
image_file_updated_callback
, before the lineif(bostree_node_count(file_tree) > 1)
, add a lineprintf("Removed file %s\n", FILE(node)->display_name);
. Does pqiv notice that the file that ought not to be displayed is actually gone? - Are you able to create a minimal example? A set of image URLs, a pqiv call and order/timing for the removal of the files would be ideal.
from pqiv.
I'm struggling to reproduce in a simple fashion, I will keep trying. However the following instructions will cause pqiv to core dump around 25% of the time and I'm hoping it is related.
- Put the below script in a file and run
- The slideshow should start. 1 picture of Einstein and 2 of Darwin
- When a picture of Darwin is displayed, hit "s" to pause
- The script will delete the Darwins, leaving Einstein.
- Around 25% of the time pqiv will then core.
Many thanks for looking into it and I'll continue to try and repro the 1st issue in a simple way.
mkdir ~/pqiv-test
mkdir ~/pqiv-test2
cd ~/pqiv-test
wget http://www3.nd.edu/~networks/HumanDynamics_20Oct05/images/Einstein_1_JPEG.jpg
wget http://www3.nd.edu/~networks/HumanDynamics_20Oct05/images/Darwin_3_jpg.jpg
wget http://www3.nd.edu/~networks/HumanDynamics_20Oct05/images/Darwin_1_jpg.jpg
pqiv -s -f -F -d 10.0 --watch-directories --shuffle ~/pqiv-test &
echo "Pause slideshow when a Darwin picture is displayed"
sleep 20
echo "Deleting photos now"
cp ~/pqiv-test/Darwin_.jpg ~/pqiv-test2
rm ~/pqiv-test/Darwin_.jpg
from pqiv.
Last 2 lines of script should have an asterisk after "Darwin".
Github has removed asterisks!
from pqiv.
Thanks! Please test if the latest commit fixes the segfault for you. (And possibly the other issue as well.)
from pqiv.
Tested and confirmed it fixes segfault. Also, no repeat of the other issue. Many thanks!
from pqiv.
I've got a short use case that can reproduce the original problem. I'm using commit point 7a36426.
The following will start a slideshow on 1 image. We then delete the image and then add in a new one. The result is a slideshow of the 2 images.
Thanks!
mkdir ~/pqiv-test
mkdir ~/pqiv-test2
cd ~/pqiv-test2
wget http://www3.nd.edu/~networks/HumanDynamics_20Oct05/images/Einstein_1_JPEG.jpg
wget http://www3.nd.edu/~networks/HumanDynamics_20Oct05/images/Darwin_1_jpg.jpg
cd ..
cp pqiv-test2/Einstein_1_JPEG.jpg pqiv-test
pqiv -s -f -F -d 10.0 --watch-directories --shuffle ~/pqiv-test &
sleep 20
echo "Deleting photo now"
rm ~/pqiv-test/Einstein_1_JPEG.jpg
sleep 20
echo "Adding photo now"
cp pqiv-test2/Darwin_1_jpg.jpg pqiv-test
echo "Slideshow of 2 photos!"
ls -al ~/pqiv-test
from pqiv.
I see. Thanks, that clarifies a lot. Here's what happened:
If an image that is currently loaded (ie. one of the previous, current and next image) is removed, pqiv decides what to do based on how many images are available: If there is more than one image, it tries to reload the file, triggering the file-not-found mechanism and thus unloading it. If the image was the last one, it skips this entirely to prevent pqiv from exiting due to all images having become unavailable. Since it caches the adjacent images, adding one new image to the directory won't unload the loaded, but deleted, image, and hence it continues to show up in the slideshow. Only once you've added at least 3 new images, pqiv will unload it (Let's call the old image no. 1, and follow with 2, 3, 4. If you view image 3, 2 and 4 are adjacent, and 1 will be unloaded) and try to reload it next time it is to be shown - and then it would finally remove that image from the list.
To fix this, I now mark removed images to be reloaded upon the next attempt to display them. You should still see [2/2] in the info box while Darwin is displayed, but the next attempt to switch to the Einstein picture will fail and leave you with only Darwin.
from pqiv.
Thanks for the explanation and the lightening fast fix. It does the trick. Cheers!
from pqiv.
Related Issues (20)
- Feature Request: save displayed image HOT 2
- Crash with a alignment trap issue when trying to view video files on a raspberry pi 2b HOT 4
- Slideshow interval fine for plain images and pdfs, not so much for animated gif / mp4 movies
- Control content of info box HOT 1
- Fix deprecation warnings HOT 1
- How can I bind a key to move file to a particular folder? HOT 1
- [bug] Sorting by name does not work if input is a directory HOT 2
- Use Command Output as Action Parameter HOT 1
- Release 2.13 HOT 10
- pqiv-2.12, SIGSEGV in bostree_node_count HOT 6
- pqiv doesn't play videos — missing libav.. libraries the reason? HOT 1
- output path of marked images in montage mode HOT 5
- pqiv craches viewing avif images
- --browse breaks file browsers in 2.13
- Scaling for initial image is sometimes incorrect HOT 5
- how to setting no info window at startup etc. HOT 2
- Proper color management with ICC profiles HOT 3
- Montage: previews don't scale up on HiDPI screen in KDE, spill beyond display borders
- pqiv plays video files, how to stop it? HOT 1
- Feature request: Add a command line option to ignore input events?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pqiv.