A rare case in which a problem with a web application crashing in Chrome was found to be caused by ``a single GIF animation image''



An engineer who encountered a problem where the browser crashes when using Chrome, although there is no problem with Safari or Firefox, has published the whole story until he found out the problem on his blog.

The Weirdest Bug I've Seen Yet

https://engineering.gusto.com/the-weirdest-bug-ive-seen-yet/

The problem started when Amy Lai, an engineer working at Gusto , an American software company that makes human resources tools, received a report from an employee that ``Chrome crashes when using in-house tools.'' did. As a result of this issue, Gusto staff were suddenly unable to view customer account information while responding to customer calls or emails.



Lai and his team, which began investigating the issue, said, ``Not all employees were affected,'' ``There is no problem with the customer-facing software,'' and ``The crashes were inconsistent and required reloading the same page.'' I noticed that sometimes it crashes and sometimes it doesn't,' and 'this doesn't happen with other browsers.'

From this point of view, Lai and his colleagues first predicted that the Chrome version was bad. However, even when people who experienced the problem updated their Chrome, it only made the problem less frequent and did not resolve the problem. We also found that it was not due to a particular version of Chrome, as some people had the same crash and some did not, and some people had the same crash even when using different versions.

The next thing that caught my attention was the ``extension functions.'' Indeed, when one of my employees disabled the extension, the crash stopped, but the crash still occurred when I started Chrome with a guest profile without the extension, so the investigation went back to square one. .



Many employees were plagued by a mysterious problem where only Chrome crashed, but as other browsers were used as workarounds, no one except two Turkish engineers cared about it. It's gone.

Despite this, Lai persevered in investigating the cause, and as the investigation progressed, he found that ``The code from a few weeks ago doesn't fix it, so recent changes aren't the cause.'' ``

The static HTML version of the crashing page doesn't cause the crash.'' I noticed that ``the crash does not occur when using open source Chromium instead of Chrome'' and ``Deleting page-specific content or disabling in-house fonts does not resolve the problem.''

Additionally, an engineer in Denver reported that the desktop app for the correction tool 'Grammarly' crashes when used. So, when Mr. Lai actually downloaded Grammarly, he was finally able to confirm the reproducibility of the crash. We also found that other employees who reported issues were also using Grammarly.



Mr. Lai, who was gradually grasping the true nature of the bug, realized that ``deleting page-specific content does not solve the problem,'' so he focused on the navigation bar that is attached to every page and modified the navigation bar code. I started commenting out line by line to see if it would crash.

Then, I found that if I deleted the section called 'My History', the crash no longer occurred. Specifically, it is as follows.

dropdown 'My History', [], turbo: true, src: '/navigation/my_history'



This section is different from the others in that it shows recently visited pages for each user. We also found that just hovering over this section can cause Chrome to crash instantly, even after the page has loaded successfully.

Lai thought that this might be the cause because the section in question contained a gem called

Turbo , which is a Ruby library that speeds up the Rails application, but Turbo was introduced before the crash occurred. So it turned out to be a mistake.

However, when I consulted an engineer familiar with Rails with this as a clue, it turned out that the code in question references a GIF animation called 'loader-spinner.gif' that rotates during loading. After removing this GIF animation, the crash no longer occurs.



Since I can't see the code in Chrome or Grammarly, it remains a mystery why loading 'loader-spinner.gif' in Chrome crashes when Grammarly is installed.

Lai said, ``I never imagined that the treasure I would find at the end of my debugging journey would be a GIF animation.The priority of this bug decreased over time, and workarounds were found, but in the end Curiosity won out. No one had all the knowledge needed to solve this bug, but with persistence and collaboration, we were able to solve it.' .

in Software, Posted by log1l_ks