{"id":94,"date":"2021-07-08T13:47:54","date_gmt":"2021-07-08T10:47:54","guid":{"rendered":"https:\/\/ahiru.eu\/blog\/?p=94"},"modified":"2021-07-08T13:47:54","modified_gmt":"2021-07-08T10:47:54","slug":"bug-of-the-day-2021-07-05","status":"publish","type":"post","link":"https:\/\/ahiru.eu\/blog\/2021\/07\/08\/bug-of-the-day-2021-07-05\/","title":{"rendered":"Bug of the day: 2021-07-05"},"content":{"rendered":"\n<p>I was updating the code to the latest version of the GStreamer Rust bindings. I ended up touching A LOT of parts in almost every file, so the diff was huge. The biggest culprit was a change in the timestamps API, and we do a lot of things with timestamps, so everything related needed to be updated.<\/p>\n\n\n\n<p>After finally getting everything to compile, I tried running the automated tests to see what went wrong there. All tests passed, apart from one.<\/p>\n\n\n\n<p>This was a bit tricky. It&#8217;s not like half of them are failing, which would mean that I missed something fundamental. It&#8217;s also not like they&#8217;re all passing, which would mean that everything is fine. It&#8217;s just one test, and it&#8217;s timing out. Timeout means &#8220;I had to do a series of many tasks in the background and they&#8217;re still not done&#8221;, so it&#8217;s not exactly hinting at where exactly the issue is.<\/p>\n\n\n\n<p>Fortunately we have an auto-generated API schema file, which describes all commands, with their parameters, types, and default values. I had a diff in that file and had initially not paid attention to it. So I looked at the diff and saw the problem.<\/p>\n\n\n\n<p>I had missed one single M.<\/p>\n\n\n\n<p>So, instead of having the code buffer for 125 milliseconds by default, it was buffering for 125 seconds.<\/p>\n\n\n\n<p>That&#8217;s the kind of bug that the compiler wouldn&#8217;t possibly catch. I mean, &#8220;buffer for 125 seconds&#8221;, looks legitimate at a first glance, doesn&#8217;t it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was updating the code to the latest version of the GStreamer Rust bindings. I ended up touching A LOT[&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-bug-of-the-day","category-english"],"_links":{"self":[{"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":1,"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahiru.eu\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}