João Costa @JD557@blog.joaocosta.eu Follow

Portuguese software engineer at Kevel.

My instance is running on a small server so please #nobot

Web

https://www.joaocosta.eu/

GitHub

https://github.com/JD557

Twitter

https://twitter.com/JD557

Itch.io

https://jd557.itch.io

  • Notes
  • Articles 6
  • Followers 41
  • Following 57
João Costa's avatar
João Costa
@JD557@blog.joaocosta.eu

This was quite the Heisenbug: https://github.com/JD557/minart/pull/474

Some sound files were corrupted, but only when loaded from the Java resources on a specific application. When I loaded them on unit tests or Scala CLI scripts they would work fine. Even something as simple as loading them from a file (instead of a Java resource) would work 😰 .

Turns out sometimes InputStream.read(bytes) does not read all the bytes (duh, that's why it returns the number of bytes read) and I was not handling that... not sure how I didn't hit this earlier 😅 .

Fix resource loading by JD557 · Pull Request #474 · JD557/minart GitHub
  • permalink
  • interact from your instance
  • 1 year, 3 months ago
Powered by microblog.pub 2.0.0+dev (source code) and the ActivityPub protocol. Admin.