# \[BUG\] Image Zoom Bug in the Web Viewer

**URL:** <https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226>\
**Category:** Website\
**Created:** [July 26, 2023, 1:22pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226 "2023-07-26T13:22:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![GITNE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gitne/32/70659_2.png) [@GITNE](https://forum.mapillary.com/u/GITNE)\
**Post date:** [July 26, 2023, 1:22pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/1 "2023-07-26T13:22:03Z")

</div>

| `User-Agent` |
| --- |
| Mozilla/5.0 (X11; Ubuntu; Linux x86\_64; rv:128.0) Gecko/20100101 Firefox/128.0 |

There is a bug in the viewer that breaks the viewer after a sequence of inputs.  
How to reproduce:

1. Open a clean Mapillary web viewer session
2. Go to any image ![Any Image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/1/7/17aa742c072c6ed68b0d2f24140e4a6eff355194.jpeg "Any Image")
3. Zoom in with either the `+` key, clicking on the “+” widget, or rolling the mouse wheel ![Image at Zoom Level 1](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/8/7/87447c596ae59b183138667bdf7055d5c79500e0.jpeg "Image at Zoom Level 1")
4. Navigate to another image, either with the sequence widgets or navigation arrows ![and = after Clicking “Next” in the Sequence](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/4/3/4319b08afe5fbb645eb818c9d26ca74a7bdeae52.jpeg "x and y=Infinity after Clicking “Next” in the Sequence")
5. Observe how the projection of the image bounces around until it stabilizes and the `x` and `y` URL query components are set to `Infinity`. After that, the viewer session is broken and can only be restored by something that drops the `x` and `y` URL query components or by reloading the page in the browser.

---

<div class="post-metadata">

**Author:** ![boris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/boris/32/71767_2.png) [@boris](https://forum.mapillary.com/u/boris)\
**Post date:** [July 26, 2023, 1:41pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/2 "2023-07-26T13:41:21Z")

</div>

@nikola are you able to replicate this? I couldn’t seem to.

---

<div class="post-metadata">

**Author:** ![nikola](https://avatars.discourse-cdn.com/v4/letter/n/a88e57/32.png) [@nikola](https://forum.mapillary.com/u/nikola)\
**Post date:** [July 26, 2023, 2:05pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/3 "2023-07-26T14:05:41Z")

</div>

No, @GITNE is this happening for you only in a particular area or everywhere?

---

<div class="post-metadata">

**Author:** ![GITNE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gitne/32/70659_2.png) [@GITNE](https://forum.mapillary.com/u/GITNE)\
**Post date:** [October 9, 2023, 4:45pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/4 "2023-10-09T16:45:42Z")

</div>

I think it happens everywhere, especially when using software rendering. Unfortunately, due to forum constrains, I cannot upload a video demonstrating this behavior because a) the forum does not accept video files b) 4 MB limit quite severely any animated image file format (GIF and MNG turn out way too large in my case).

---

<div class="post-metadata">

**Author:** ![boris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/boris/32/71767_2.png) [@boris](https://forum.mapillary.com/u/boris)\
**Post date:** [October 10, 2023, 9:15am UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/5 "2023-10-10T09:15:49Z")

</div>

@GITNE - maybe you can upload a video to YouTube (or another platform) and share a link?

---

<div class="post-metadata">

**Author:** ![boris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/boris/32/71767_2.png) [@boris](https://forum.mapillary.com/u/boris)\
**Post date:** [October 11, 2023, 8:13am UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/7 "2023-10-11T08:13:35Z")

</div>

Thank you! We tried to reproduce on Chrome and Firefox with or without hardware acceleration, but were unfortunately unable to. Maybe there is a specific linux or browser issue here. Any chance you can see if this replaces on MacOS or Windows?

---

<div class="post-metadata">

**Author:** ![filipc](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/filipc/32/1103_2.png) [@filipc](https://forum.mapillary.com/u/filipc)\
**Post date:** [October 11, 2023, 11:46am UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/8 "2023-10-11T11:46:13Z")

</div>

I don’t have the dual screen but more the jagged center pictures.  
It must be because of my expensive graphic card.  
It is no big nuisance.  
I then just refresh.  
I have always had this problem, I think, with this computer.  
I use Windows and Chrome.  
I think I have the same problem with other browsers.

---

<div class="post-metadata">

**Author:** ![GITNE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gitne/32/70659_2.png) [@GITNE](https://forum.mapillary.com/u/GITNE)\
**Post date:** [October 11, 2023, 12:01pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/9 "2023-10-11T12:01:59Z")

</div>

> Maybe there is a specific linux or browser issue here.

Maybe, but the more I investigate the issue the more I am convinced that this is not the case. Please read more on that below.

> Any chance you can see if this replaces on MacOS or Windows?

No, I do not run any MacOS or Windows machines and I do not want nor have the time to go through the trouble of setting up a Windows (virtual nor physical) machine _just_ to test this bug. Sorry. However, I have experienced this bug on a handful of different x64 and aarch64 machines on various versions of Firefox. However, I may be able to put Opera to the test.

> We tried to reproduce on Chrome and Firefox with or without hardware acceleration, but were unfortunately unable to.

I have observed that the bug becomes more apparent or pronounced when you set the CPU power governor to [`powersave`](https://docs.kernel.org/admin-guide/pm/cpufreq.html#powersave) on Linux (you can set it on the command line or use a GUI app, often a desktop plug‑in or extension). You can do something similar on Windows by setting the maximum and minimum CPU performance to 0% in the active power profile. This basically locks the CPU frequency to a minimum. Please let me know if you can reproduce this bug under these conditions on Windows too.

Another magnifying factor is the size of the view port. The larger the view port is the more apparent the bug becomes. Adversely, the smaller the view port the less apparent the bug becomes, even with the CPU locked to its lowest frequency. The bug may become even unnoticeable should the view port be small enough.

Please note, that none of the above configuration parameters should have an impact on the viewer. In other words, these configuration parameters **do not** cause the bug but help make it visible. The bug exists in the code despite the configuration parameters mentioned above.

---

<div class="post-metadata">

**Author:** ![GITNE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gitne/32/70659_2.png) [@GITNE](https://forum.mapillary.com/u/GITNE)\
**Post date:** [October 11, 2023, 12:46pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/10 "2023-10-11T12:46:55Z")

</div>

> I don’t have the dual screen but more the jagged center pictures.

Garbled vertices may happen when manipulating unsynchronized vertex buffer objects.

I too, did use to get these sporadically, especially on 360° images, but have not experienced any for a long time.

---

<div class="post-metadata">

**Author:** ![GITNE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gitne/32/70659_2.png) [@GITNE](https://forum.mapillary.com/u/GITNE)\
**Post date:** [October 26, 2023, 10:30am UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/11 "2023-10-26T10:30:25Z")

</div>

So @boris, have you guys been able to reproduce this behavior at least to some extent?

---

<div class="post-metadata">

**Author:** ![boris](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/boris/32/71767_2.png) [@boris](https://forum.mapillary.com/u/boris)\
**Post date:** [October 26, 2023, 11:25am UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/12 "2023-10-26T11:25:47Z")

</div>

No, unfortunately not ☹

---

<div class="post-metadata">

**Author:** ![GITNE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/gitne/32/70659_2.png) [@GITNE](https://forum.mapillary.com/u/GITNE)\
**Post date:** [January 1, 2025, 2:57pm UTC](https://forum.mapillary.com/t/bug-image-zoom-bug-in-the-web-viewer/7226/13 "2025-01-01T14:57:58Z")

</div>

@nikola Either way, no URL query component should ever be set to `Infinity`. If anything, `±Infinity` and `NaN` values should be replaced by `0`. By doing so, perhaps you may get a division by zero error but this may also trigger some other error that would enable to find the cause for this.
