GNOME Bugzilla – Bug 310833
Zoom In button in EOG can get stuck at 99%
Last modified: 2006-02-27 17:14:20 UTC
Please describe the problem: The Zoom In button in eye of gnome can get stuck at 99%. It appears to be a rounding error coupled with one part of the program thinking it's below 100%, so the next step is 100, while another part thinks it's already at 100, so nothing changes. Steps to reproduce: 1. Open a picture. 2. Use the scroll wheel on the mouse to zoom out 6 or more times, then back in. 3. Click the Zoom In button on the toolbar or hit ctrl++. Actual results: When you zoom back in, the status bar shows 99% instead of 100% as it should. When you try to zoom in farther with the toolbar button or the keyboard, nothing happens (the scroll wheel works fine) Expected results: The image should be zoomed back to 100%, not 99%, and the status bar should correctly report that. The Zoom In button should function correctly. Does this happen every time? This happens every time. Other information: Both 2.8.2 and 2.10.0 show the problem, not tested on anything else. Gentoo Linux, nothing strange about the builds.
I can't reproduce this bug with EOG 2.10.0
I cannot reproduce this with EOG 2.13.2.
Thanks for the report. I still cannot reproduce this bug in EOG 2.13.3. It seems this problem is somewhat fixed in latest EOG releases. Closing as obsolete then. Please feel free to reopen this bug if you can add more information (i.e. a valid stack trace) or if you still experience this problem in latest versions.
This still occurs in 2.12.2, which is the latest in Gentoo's portage, although the status bar now says 100% while it's stuck, not 99%. Again, steps to reproduce: 1. Open a picture in eog 2. Zoom out with the scroll wheel 6 times (or more) 3. Zoom in with the scroll wheel 6 times (or as many as above) 4. Click the Zoom In button on the toolbar The zoom in will not happen, but it should. I'm using Gentoo, with Gnome 2.10.1 but eog 2.12.2. My make.conf is as follows: CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j2" USE="gnome gtk2 alsa cdr jack unicode sse sse2 mmx ogg flac speex theora vorbis xvid aac win32codecs ffmpeg -kde -qt -kdexdeltas -arts -oss -evo -dvd -dvdr" Other than that I don't know what information to give. If you make a requst, though, I can try to provide it.
I can confirm it with current HEAD (using Gentoo too though) using the steps in comment #4. You have to start at a zoom level of 100 and zoom out to at least 75% or it won't show up. When zooming in again we don't get the exact same numbers/zoom factors as when zooming out, although the difference is only at the 16th decimal place.
I can trigger this bug for zooming out as well. When I start at 300% and zoom in (with my mouse) to about 402% and then back out to 300% (with mouse as well) I cannot zoom out further with my keyboard or the toolbar button. The problem is exactly the same.
Created attachment 58039 [details] [review] attempt to patch it This patch should fix the problem for both zooming in and out. It simply makes sure that the next zoom level chosen is far enough away (currently 1e-6) from the current level that set_zoom() will actually do something.
Created attachment 58042 [details] [review] improved patch This one is probably better. It removes the in this case unneeded calls to fabs() and integrates itself into the existing zoom checks.
I tried it with current ubuntu dapper (eog 2.13.5/2.13.90). I can reproduce it there too, so it shouldn't be a Gentoo-only problem.
Applied in HEAD and gnome-2-12 branches. Thanks! 2006-02-27 Lucas Rocha <lucasr@gnome.org> * eog-scroll-view.c (eog_scroll_view_zoom_in, eog_scroll_view_zoom_out): correct handling of zoom double precision with mouse wheel (Fixes bug #310833). Patch from Felix Riemann <felix@hsgheli.de>.
*** Bug 332286 has been marked as a duplicate of this bug. ***