Nafrondel is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

That awkward moment when ya spend a week chasing down bugs only to find the only bug was in the garbage collector.

@Nafrondel i have never encountered a problem with the garbage collector. What happened? Are you using the default one?

Nafrondel @Nafrondel

@Gnubeutel I was getting unexplained, unlogged java.exe crashes from heap corruption. Everywhere.
The only thing that doesn’t log and should touch the heap is the gc.
Turns out, some idiot stuck a JNI call to free memory in a finalize block. Memory that hadn't been allocated.
So there was a timebomb set up early in the code, and it would silently kill everything when the gc ran.
Tl;Dr: Corporal punishment should be reinstated for anyone who uses finalize.

· Web · 0 · 0